diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-10-06 16:32:39 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-10-06 16:32:39 +0000 |
commit | 31357f2766d9e1de3da857ef2013dbef661cc1a8 (patch) | |
tree | 174554e75e0505ee937f567d8f5d82ff249c3b4e | |
parent | fa1f6d7454edcb8e30b9b0bdb14f1ec040546715 (diff) | |
download | elgg-31357f2766d9e1de3da857ef2013dbef661cc1a8.tar.gz elgg-31357f2766d9e1de3da857ef2013dbef661cc1a8.tar.bz2 |
Deleted old gumpf refs #402 and #407
git-svn-id: https://code.elgg.org/elgg/trunk@2195 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/river.php | 181 |
1 files changed, 0 insertions, 181 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php index e6ae1ca59..310845843 100644 --- a/engine/lib/river.php +++ b/engine/lib/river.php @@ -318,187 +318,6 @@ return $river; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Construct query - /* - // Events and objects - $n = 0; - $obj_query = ""; - foreach ($river_events as $object => $events) - { - $object = sanitise_string($object); - - if ($n>0) $obj_query .= " or "; - - $obj_query .= "( sl.object_class='$object' and sl.event in ('".implode("','", $events)."') )"; - - $n++; - } - - // User - $user = "sl.performed_by_guid in (".implode(',', $by_user).")"; - - // Relationship - $relationship_query = ""; - $relationship_join = ""; - if ($relationship) - { - $relationship_join = " join {$CONFIG->dbprefix}entity_relationships r on sl.performed_by_guid=r.entity_guid "; - $relationship_query = "r.relationship = '$relationship'"; - } - - $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"; - - - - - - - // set start limit and offset - $cnt = $limit; - $off = $offset;
-
- if (is_array($by_user) && sizeof($by_user) > 0) {// Didn' cast to int here deliberately
- foreach($by_user as $key => $val) {
- $by_user[$key] = (int) $val;
- }
- } else {
- $by_user = (int)$by_user;
- }
-
- $exit = false; - - // River objects - $river = array(); - - do - { - //$log_events = get_data($query); - $log_events = get_system_log($by_user, "","", $cnt, $off); - - if (!$log_events) - $exit = true; - else - { - - foreach ($log_events as $log) - { - // See if we have access to the object we're talking about - $event = $log->event; - $class = $log->object_class; - $tmp = new $class(); - $object = $tmp->getObjectFromID($log->object_id); - - // Exists and we have access to it - // if (is_a($object, $class))
- if ($object instanceof $class) - { - // If no relationship defined or it matches $relationship - if ( - (!$relationship) || - ( - ($relationship) && - (check_entity_relationship($by_user, $relationship, $tmp->getObjectOwnerGUID())) - ) - ) - { - // See if anything can handle it - $tam = ""; - - // Construct the statement - $by_user_obj = get_entity($log->performed_by_guid); - $statement_object = $object; - if ($object instanceof ElggRelationship) { - - $statement_object = array( - 'subject' => get_entity($object->guid_one), - 'relationship' => $object->relationship,// Didn' cast to int here deliberately - 'object' => get_entity($object->guid_two) - ); - } else if ($object instanceof ElggExtender) { - $statement_object = array( - 'subject' => $object, - 'object' => get_entity($object->entity_guid) - ); - } - $statement = new ElggRiverStatement($by_user_obj, $event, $statement_object); -
-
- if ($object instanceof ElggEntity) {
- $subtype = $object->getSubtype();
- } else {
- $subtype = "";
- }
- if ($subtype == "widget") {
- $subtype = "widget/" . $object->handler;
- }
-
- if (!empty($subtype) && elgg_view_exists("river/{$subtype}/{$event}")) {
- $tam = elgg_view("river/{$subtype}/$event", array( - 'statement' => $statement
- ));
- } else if (elgg_view_exists("river/$class/$event")) { - $tam = elgg_view("river/$class/$event", array( - 'statement' => $statement - ));
- }
-
- if (!empty($tam)) {
- $tam = elgg_view("river/wrapper",array(
- 'entry' => $tam, - 'time' => $log->time_created, - 'event' => $event, - 'statement' => $statement - ));
- } - - if ($tam) - { - $river[] = $tam; - $cnt--; - } - } - } - - // Increase offset - $off++; - } - } - - } while ( - ($cnt > 0) && - (!$exit) - ); - - return $river;*/ } /** |