commit:     8a8cccee7bc2ff11600bf83b684e627feefeb3d6
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 30 15:42:46 2018 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 15:42:46 2018 +0000
URL:        https://gitweb.gentoo.org/proj/bouncer.git/commit/?id=8a8cccee

Remove unused function from the list lib

 php/lib/list.php | 51 +--------------------------------------------------
 1 file changed, 1 insertion(+), 50 deletions(-)

diff --git a/php/lib/list.php b/php/lib/list.php
index c7e872b..9f480bc 100644
--- a/php/lib/list.php
+++ b/php/lib/list.php
@@ -9,7 +9,7 @@
  *     <code>
  *     $orderby=get_order();
  *     $query="SELECT * FROM fic_courses $orderby";
- *     $courses=db_get($query,MYSQL_ASSOC);
+ *     $courses=DB::get($query,PDO::FETCH_ASSOC);
  *     $headers=array(
  *             'course_id'=>'',
  *             'title'=>'Course Title',
@@ -314,52 +314,3 @@ function get_orderby($method='get')
        }
        else return null;
 }
-
-/**
- *     Parses $_POST for ids, shows edit forms for each id with populated data.
- *     <ul>
- *     <li>name will be used to retrieve an _array_ from $_POST of the same 
name</li>
- *             <li>the form will be an include, with $posts[col_name] as the 
default for all values</li>
- *             <li>try to keep your query simple (no crazy sorting, etc.) -- 
we're talking one record at a time here anyway</li>
- *     </ul>
- *     Example:
- *     <code>
- *     list_edit_ids('course_id','../forms/course.php','SELECT * FROM 
fic_courses','1');
- *     </code>
- *     @param string $name name of id field
- *     @param string $form path to form to be used to items
- *     @param string $q_front front half of query
- *     @param string $q_where where statement
- *     @param array $dates array of date field names, so they can be fixed for 
forms
- *     @param array $datetimes array of datetime field names, so they can be 
fixed for forms
- */
-function 
list_edit_ids($name,$form,$q_front,$q_where='1',$dates=null,$datetimes=null)
-{
-       if ( !empty($_SESSION[$name]) && is_array($_SESSION[$name]) )
-       {
-               $ids=implode(',',$_SESSION[$name]);
-               $orderby=get_orderby('session');
-               $query=$q_front.' WHERE '.$q_where." AND $name IN($ids) 
".$orderby;
-               $records=db_get($query);
-               form_start($name);
-               foreach ($records as $record)
-               {
-                       echo "\n".'<div class="record">';
-                       
$record=form_array_fix_dates($dates,$datetimes,2,$record);
-                       foreach ($record as $key=>$val)
-                       {
-                               $posts[$key]=clean_out($val);
-                       }
-                       include($form);
-                       echo "\n".'<div class="record-submit">';
-                       form_submit('submit', '', 'button1');
-                       echo "\n".'</div>';
-                       echo "\n".'</div>';
-               }
-               form_end();
-       }
-       else
-       {
-               echo '<p>You must select a record.  <a 
href="javascript:history.back();">Go back</a>.</p>';
-       }
-}

Reply via email to