Ignore:
Timestamp:
Jan 11, 2014, 2:08:26 PM (10 years ago)
Author:
mistic100
Message:

add two triggers and user_list_backend.php and don't fail on unknown column

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/user_list_backend.php

    r26461 r26618  
    3737 */
    3838$aColumns = array('id', 'username', 'status', 'mail_address', 'registration_date');
     39$aColumns = trigger_change('user_list_columns', $aColumns);
    3940       
    4041/* Indexed column (used for fast and accurate table cardinality) */
     
    104105for ( $i=0 ; $i<count($aColumns) ; $i++ )
    105106{
    106   if ( $_REQUEST['bSearchable_'.$i] == "true" && $_REQUEST['sSearch_'.$i] != '' )
     107  if (isset($_REQUEST['bSearchable_'.$i]) && isset($_REQUEST['sSearch_'.$i])
     108      &&$_REQUEST['bSearchable_'.$i] == "true" && $_REQUEST['sSearch_'.$i] != ''
     109    )
    107110  {
    108111    if ( $sWhere == "" )
     
    133136       
    134137/* Data set length after filtering */
    135 $sQuery = "
    136                 SELECT FOUND_ROWS()
    137         ";
    138 $rResultFilterTotal = pwg_query($sQuery);
    139 $aResultFilterTotal = pwg_db_fetch_array($rResultFilterTotal);
    140 $iFilteredTotal = $aResultFilterTotal[0];
     138$rResultFilterTotal = pwg_query('SELECT FOUND_ROWS();');
     139list($iFilteredTotal) = pwg_db_fetch_row($rResultFilterTotal);
    141140       
    142141/* Total data set length */
     
    177176  $output['aaData'][] = $row;
    178177}
     178
     179$output = trigger_change('after_render_user_list', $output);
    179180       
    180181echo json_encode( $output );
Note: See TracChangeset for help on using the changeset viewer.