From 16dbfc5b6047869ed9c5e7a9c0d11536cff3b3ff Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Thu, 25 Aug 2005 12:36:39 +0000 Subject: [PATCH] set a source addData tag so that plugins know where the event was pushed --- include/functions_entries.inc.php | 4 ++-- include/plugin_internal.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index 6284b16..44e091e 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -222,7 +222,7 @@ function serendipity_fetchEntries($range = null, $full = true, $limit = '', $fet } } - serendipity_plugin_api::hook_event('frontend_fetchentries', $cond, array('noCache' => $noCache, 'noSticky' => $noSticky)); + serendipity_plugin_api::hook_event('frontend_fetchentries', $cond, array('noCache' => $noCache, 'noSticky' => $noSticky, 'source' => 'entries')); if ($serendipity['dbType'] == 'postgres') { $group = ''; @@ -482,7 +482,7 @@ function serendipity_searchEntries($term, $limit = '') { $cond = array(); $cond['and'] = " AND isdraft = 'false' " . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND timestamp <= " . time() : ''); - serendipity_plugin_api::hook_event('frontend_fetchentries', $cond); + serendipity_plugin_api::hook_event('frontend_fetchentries', $cond, array('source' => 'search')); $serendipity['fullCountQuery'] = " FROM diff --git a/include/plugin_internal.inc.php b/include/plugin_internal.inc.php index d032d4f..12588aa 100644 --- a/include/plugin_internal.inc.php +++ b/include/plugin_internal.inc.php @@ -177,7 +177,7 @@ class serendipity_calendar_plugin extends serendipity_plugin { " . (!serendipity_db_bool($serendipity['showFutureEntries']) ? " AND e.timestamp <= " . time() : '') . " AND e.isdraft = 'false'"; - serendipity_plugin_api::hook_event('frontend_fetchentries', $cond, array('noCache' => false, 'noSticky' => false)); + serendipity_plugin_api::hook_event('frontend_fetchentries', $cond, array('noCache' => false, 'noSticky' => false, 'source' => 'calendar')); if (isset($serendipity['GET']['category'])) { $base_query = 'C' . (int)$serendipity['GET']['category']; -- 2.39.5