aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/user_list_backend.php15
-rw-r--r--themes/smartpocket/admin/upgrade.inc.php5
-rw-r--r--tools/triggers_list.php14
3 files changed, 23 insertions, 11 deletions
diff --git a/admin/user_list_backend.php b/admin/user_list_backend.php
index f3963e61f..9d18f270b 100644
--- a/admin/user_list_backend.php
+++ b/admin/user_list_backend.php
@@ -36,6 +36,7 @@ check_status(ACCESS_ADMINISTRATOR);
* you want to insert a non-database field (for example a counter or static image)
*/
$aColumns = array('id', 'username', 'status', 'mail_address', 'registration_date');
+$aColumns = trigger_change('user_list_columns', $aColumns);
/* Indexed column (used for fast and accurate table cardinality) */
$sIndexColumn = "id";
@@ -103,7 +104,9 @@ if ( $_REQUEST['sSearch'] != "" )
/* Individual column filtering */
for ( $i=0 ; $i<count($aColumns) ; $i++ )
{
- if ( $_REQUEST['bSearchable_'.$i] == "true" && $_REQUEST['sSearch_'.$i] != '' )
+ if (isset($_REQUEST['bSearchable_'.$i]) && isset($_REQUEST['sSearch_'.$i])
+ &&$_REQUEST['bSearchable_'.$i] == "true" && $_REQUEST['sSearch_'.$i] != ''
+ )
{
if ( $sWhere == "" )
{
@@ -132,12 +135,8 @@ $sQuery = "
$rResult = pwg_query($sQuery);
/* Data set length after filtering */
-$sQuery = "
- SELECT FOUND_ROWS()
- ";
-$rResultFilterTotal = pwg_query($sQuery);
-$aResultFilterTotal = pwg_db_fetch_array($rResultFilterTotal);
-$iFilteredTotal = $aResultFilterTotal[0];
+$rResultFilterTotal = pwg_query('SELECT FOUND_ROWS();');
+list($iFilteredTotal) = pwg_db_fetch_row($rResultFilterTotal);
/* Total data set length */
$sQuery = "
@@ -176,6 +175,8 @@ while ( $aRow = pwg_db_fetch_array( $rResult ) )
}
$output['aaData'][] = $row;
}
+
+$output = trigger_change('after_render_user_list', $output);
echo json_encode( $output );
?> \ No newline at end of file
diff --git a/themes/smartpocket/admin/upgrade.inc.php b/themes/smartpocket/admin/upgrade.inc.php
index 709cab495..34ab43dcc 100644
--- a/themes/smartpocket/admin/upgrade.inc.php
+++ b/themes/smartpocket/admin/upgrade.inc.php
@@ -10,10 +10,7 @@ if (!isset($conf['smartpocket']))
'loop' => true,//true - false
'autohide' => 5000,//5000 - 0
);
- $query = "
-INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
-VALUES ('smartpocket' , '".pwg_db_real_escape_string(serialize($config))."' , 'loop#autohide');";
- pwg_query($query);
+ conf_update_param('smartpocket', pwg_db_real_escape_string(serialize($config)));
load_conf_from_db();
}
elseif (count(unserialize( $conf['smartpocket'] ))!=2)
diff --git a/tools/triggers_list.php b/tools/triggers_list.php
index 513eddd02..3c421b305 100644
--- a/tools/triggers_list.php
+++ b/tools/triggers_list.php
@@ -809,6 +809,20 @@ array(
'files' => array('include\template.class.php (FileCombiner::process_combinable)'),
'infos' => 'New in 2.6.',
),
+array(
+ 'name' => 'user_list_columns',
+ 'type' => 'trigger_event',
+ 'vars' => array('string[]', 'aColumns'),
+ 'files' => array('admin\user_list_backend.php'),
+ 'infos' => 'New in 2.6.',
+),
+array(
+ 'name' => 'after_render_user_list',
+ 'type' => 'trigger_event',
+ 'vars' => array('array', 'output'),
+ 'files' => array('admin\user_list_backend.php'),
+ 'infos' => 'New in 2.6.',
+),
);
?>
<!DOCTYPE html>