Changeset 26618


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

Location:
trunk
Files:
3 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 );
  • trunk/themes/smartpocket/admin/upgrade.inc.php

    r23718 r26618  
    1111    'autohide'            => 5000,//5000 - 0
    1212  );
    13   $query = "
    14 INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
    15 VALUES ('smartpocket' , '".pwg_db_real_escape_string(serialize($config))."' , 'loop#autohide');";
    16   pwg_query($query);
     13  conf_update_param('smartpocket', pwg_db_real_escape_string(serialize($config)));
    1714  load_conf_from_db();
    1815}
  • trunk/tools/triggers_list.php

    r25505 r26618  
    808808  'vars' => array('Template', 'template', 'Combinable', '$combinable', 'FileCombiner', '$combiner'),
    809809  'files' => array('include\template.class.php (FileCombiner::process_combinable)'),
     810  'infos' => 'New in 2.6.',
     811),
     812array(
     813  'name' => 'user_list_columns',
     814  'type' => 'trigger_event',
     815  'vars' => array('string[]', 'aColumns'),
     816  'files' => array('admin\user_list_backend.php'),
     817  'infos' => 'New in 2.6.',
     818),
     819array(
     820  'name' => 'after_render_user_list',
     821  'type' => 'trigger_event',
     822  'vars' => array('array', 'output'),
     823  'files' => array('admin\user_list_backend.php'),
    810824  'infos' => 'New in 2.6.',
    811825),
Note: See TracChangeset for help on using the changeset viewer.