aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_history.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2014-06-18 19:51:42 +0000
committerrvelices <rv-github@modusoptimus.com>2014-06-18 19:51:42 +0000
commit3c13387dfd965afe5c3b2d9bd0e31303599d8784 (patch)
treebb516e9903da31323f9876f5540dac3ef4ca4d0f /admin/include/functions_history.inc.php
parentf894f1208c0ccbd1945baf5c1cf05adb61535caf (diff)
since number of accepted args not required for add_event_handler, simplify calls
git-svn-id: http://piwigo.org/svn/trunk@28714 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include/functions_history.inc.php')
-rw-r--r--admin/include/functions_history.inc.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/admin/include/functions_history.inc.php b/admin/include/functions_history.inc.php
index 6c6bddef7..e2bcc4d62 100644
--- a/admin/include/functions_history.inc.php
+++ b/admin/include/functions_history.inc.php
@@ -71,9 +71,9 @@ SELECT
;';
$search['image_ids'] = array_from_query($query, 'id');
}
-
+
// echo '<pre>'; print_r($search); echo '</pre>';
-
+
$clauses = array();
if (isset($search['fields']['date-after']))
@@ -89,7 +89,7 @@ SELECT
if (isset($search['fields']['types']))
{
$local_clauses = array();
-
+
foreach ($types as $type) {
if (in_array($type, $search['fields']['types'])) {
$clause = 'image_type ';
@@ -101,11 +101,11 @@ SELECT
{
$clause.= "= '".$type."'";
}
-
+
$local_clauses[] = $clause;
}
}
-
+
if (count($local_clauses) > 0)
{
$clauses[] = implode(' OR ', $local_clauses);
@@ -122,7 +122,7 @@ SELECT
{
$clauses[] = 'image_id = '.$search['fields']['image_id'];
}
-
+
if (isset($search['fields']['filename']))
{
if (count($search['image_ids']) == 0)
@@ -140,7 +140,7 @@ SELECT
{
$clauses[] = 'IP LIKE "'.$search['fields']['ip'].'"';
}
-
+
$clauses = prepend_append_array_items($clauses, '(', ')');
$where_separator =
@@ -148,7 +148,7 @@ SELECT
"\n AND ",
$clauses
);
-
+
$query = '
SELECT
date,
@@ -176,7 +176,7 @@ SELECT
return $data;
}
-add_event_handler('get_history', 'get_history', EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
+add_event_handler('get_history', 'get_history');
trigger_notify('functions_history_included');
?> \ No newline at end of file