aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/river.php6
-rw-r--r--engine/lib/system_log.php14
2 files changed, 13 insertions, 7 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php
index 9fa93b172..3b69efd1c 100644
--- a/engine/lib/river.php
+++ b/engine/lib/river.php
@@ -410,13 +410,15 @@
* @param int $offset An offset
* @return array of river entities rendered with the appropriate view.
*/
- function get_river_entries_friends($by_user, $limit = 10, $offset = 0) {
+ function get_river_entries_friends($by_user, $limit = 10, $offset = 0) {
+ $friendsarray = "";
if ($friends = get_user_friends($by_user, "", 9999)) {
$friendsarray = array();
foreach($friends as $friend) {
$friendsarray[] = $friend->getGUID();
}
- }
+ }
+
return get_river_entries($friendsarray,"",$limit,$offset);
}
diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php
index de80f09d5..0c382df53 100644
--- a/engine/lib/system_log.php
+++ b/engine/lib/system_log.php
@@ -64,7 +64,8 @@
function get_system_log($by_user = "", $event = "", $class = "", $limit = 10, $offset = 0, $count = false)
{
global $CONFIG;
-
+
+ $by_user_orig = $by_user;
if (is_array($by_user) && sizeof($by_user) > 0) {
foreach($by_user as $key => $val) {
$by_user[$key] = (int) $val;
@@ -79,10 +80,13 @@
$where = array();
- if (is_int($by_user) && $by_user > 0) {
- $where[] = "performed_by_guid=$by_user";
- } else if (is_array($by_user)) {
- $where [] = "performed_by_guid in (". implode(",",$by_user) .")";
+ if ($by_user_orig!=="")
+ {
+ if (is_int($by_user)) {
+ $where[] = "performed_by_guid=$by_user";
+ } else if (is_array($by_user)) {
+ $where [] = "performed_by_guid in (". implode(",",$by_user) .")";
+ }
}
if ($event != "")
$where[] = "event='$event'";