From 027ec56ccf00551af10c7c1f3918c6340fdbb956 Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Tue, 30 Jan 2018 10:33:33 -0500 Subject: Restore lists --- php/cfg/init.php | 1 + php/lib/list.php | 26 -------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/php/cfg/init.php b/php/cfg/init.php index 3e8f6fb..80f545f 100644 --- a/php/cfg/init.php +++ b/php/cfg/init.php @@ -10,6 +10,7 @@ require_once(LIB.'/csv.php'); // util file for random functions (no SQL here) $start = microtime_float(); // start timer require_once(LIB.'/mirror.php'); // user and admin functions for the mirror app (some SQL) require_once(LIB.'/db.php'); // core mysql wrappers used in mirror functions +require_once(LIB.'/list.php'); DB::connect(DBHOST,DBUSER,DBPASS,DBNAME); // open persistent connection to db if (!empty($protect)) { require_once('admin_init.php'); diff --git a/php/lib/list.php b/php/lib/list.php index 5deb5e9..c7e872b 100644 --- a/php/lib/list.php +++ b/php/lib/list.php @@ -363,29 +363,3 @@ function list_edit_ids($name,$form,$q_front,$q_where='1',$dates=null,$datetimes= echo '

You must select a record. Go back.

'; } } - -/** - * Process a submitted list_edit_ids form. - * @param array $name array of primary ids posted from the form, these are vital to the WHERE clause of the UPDATE statements. - * @param string $table name of table being affected - */ -function list_update_ids($name,$table) -{ - $keys=array_keys($_POST[$name]); - foreach ($keys as $index) - { - foreach ($_POST as $key=>$val) - { - if ($key!='submit') - { - $posts[$index][$key]=$val[$index]; - } - } - } - foreach ($posts as $dataset) - { - $query=db_makeupdate($dataset,$table," WHERE $name='".$dataset[$name]."' "); - db_query($query); - } -} -?> -- cgit v1.2.3-65-gdbad