diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-10-13 15:35:47 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-10-13 15:35:47 +0000 |
commit | 4a69d27cfa15dd7d5e073970dd407b56c607d8b9 (patch) | |
tree | 166dc48a29a65e4986ddc700ca7ca25a1728ef34 /engine | |
parent | 8dd86dd4c8e3556d1898c17dddb34b1b14e096fb (diff) | |
download | elgg-4a69d27cfa15dd7d5e073970dd407b56c607d8b9.tar.gz elgg-4a69d27cfa15dd7d5e073970dd407b56c607d8b9.tar.bz2 |
Refs #431: Belts and braces added to river view
git-svn-id: https://code.elgg.org/elgg/trunk@2249 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/river.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php index 10f202256..a446886d8 100644 --- a/engine/lib/river.php +++ b/engine/lib/river.php @@ -214,15 +214,18 @@ foreach ($river_events as $details) { // Get what we're talking about - if ($n>0) $obj_query .= " or "; if ($details['subtype'] == 'default') $details['subtype'] = ''; - $obj_query .= "( sl.object_type='{$details['type']}' and sl.object_subtype='{$details['subtype']}' and sl.event='{$details['event']}' )"; - - $n++; - } + if (($details['type']) && ($details['event'])) { + if ($n>0) $obj_query .= " or "; + + $obj_query .= "( sl.object_type='{$details['type']}' and sl.object_subtype='{$details['subtype']}' and sl.event='{$details['event']}' )"; + + $n++; + } + } // User $user = "sl.performed_by_guid in (".implode(',', $by_user).")"; @@ -238,7 +241,7 @@ $query = "SELECT sl.* from {$CONFIG->dbprefix}system_log sl $relationship_join where $user and $relationship_query ($obj_query) order by sl.time_created desc limit $offset, $limit"; - + // fetch data from system log (needs optimisation) $log_data = get_data($query); |