aboutsummaryrefslogtreecommitdiffstats
path: root/admin/user_list_backend.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-01-11 13:08:26 +0000
committermistic100 <mistic@piwigo.org>2014-01-11 13:08:26 +0000
commitbbb59ee3f9576a8e7bb47cfa384287b94ad63e9b (patch)
tree67f9800e5e4d297ff8534923fadaa055d950cf34 /admin/user_list_backend.php
parentbd080506705f500d6019cf38f7aaf1bc41c277c6 (diff)
add two triggers and user_list_backend.php and don't fail on unknown column
git-svn-id: http://piwigo.org/svn/trunk@26618 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/user_list_backend.php15
1 files changed, 8 insertions, 7 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