aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_history.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/include/functions_history.inc.php38
1 files changed, 10 insertions, 28 deletions
diff --git a/admin/include/functions_history.inc.php b/admin/include/functions_history.inc.php
index 2b18547dc..fec287263 100644
--- a/admin/include/functions_history.inc.php
+++ b/admin/include/functions_history.inc.php
@@ -58,18 +58,12 @@ SELECT
if (isset($search['fields']['date-after']))
{
- array_push(
- $clauses,
- "date >= '".$search['fields']['date-after']."'"
- );
+ $clauses[] = "date >= '".$search['fields']['date-after']."'";
}
if (isset($search['fields']['date-before']))
{
- array_push(
- $clauses,
- "date <= '".$search['fields']['date-before']."'"
- );
+ $clauses[] = "date <= '".$search['fields']['date-before']."'";
}
if (isset($search['fields']['types']))
@@ -88,34 +82,25 @@ SELECT
$clause.= "= '".$type."'";
}
- array_push($local_clauses, $clause);
+ $local_clauses[] = $clause;
}
}
if (count($local_clauses) > 0)
{
- array_push(
- $clauses,
- implode(' OR ', $local_clauses)
- );
+ $clauses[] = implode(' OR ', $local_clauses);
}
}
if (isset($search['fields']['user'])
and $search['fields']['user'] != -1)
{
- array_push(
- $clauses,
- 'user_id = '.$search['fields']['user']
- );
+ $clauses[] = 'user_id = '.$search['fields']['user'];
}
if (isset($search['fields']['image_id']))
{
- array_push(
- $clauses,
- 'image_id = '.$search['fields']['image_id']
- );
+ $clauses[] = 'image_id = '.$search['fields']['image_id'];
}
if (isset($search['fields']['filename']))
@@ -123,14 +108,11 @@ SELECT
if (count($search['image_ids']) == 0)
{
// a clause that is always false
- array_push($clauses, '1 = 2 ');
+ $clauses[] = '1 = 2 ';
}
else
{
- array_push(
- $clauses,
- 'image_id IN ('.implode(', ', $search['image_ids']).')'
- );
+ $clauses[] = 'image_id IN ('.implode(', ', $search['image_ids']).')';
}
}
@@ -168,7 +150,7 @@ SELECT
while ($row = pwg_db_fetch_assoc($result))
{
- array_push($data, $row);
+ $data[] = $row;
}
return $data;
@@ -177,4 +159,4 @@ SELECT
add_event_handler('get_history', 'get_history', EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
trigger_action('functions_history_included');
-?>
+?> \ No newline at end of file