diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/database.php | 6 | ||||
-rw-r--r-- | engine/lib/entities.php | 4 | ||||
-rw-r--r-- | engine/lib/users.php | 7 |
3 files changed, 9 insertions, 8 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php index 626def70b..379cfbfc0 100644 --- a/engine/lib/database.php +++ b/engine/lib/database.php @@ -125,7 +125,7 @@ * @return array An array of database result objects
*/
- function get_data($query, $callback = "") {
+ function get_data($query, $callback = "", $debug = false) {
global $CONFIG, $dbcalls;
@@ -154,8 +154,8 @@ if (empty($resultarray)) { return false; - } -
+ }
+ if ($debug) var_export($resultarray);
return $resultarray;
}
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index d922a28ce..7bcc9f04e 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -532,7 +532,6 @@ { if (!($row instanceof stdClass)) return $row; - // See if there are any registered subtype handler classes for this type and subtype $classname = get_subtype_class($row->type, $row->subtype); if ($classname!="") @@ -609,7 +608,8 @@ $query .= " $w and "; $query .= " (access_id in {$access} or (access_id = 0 and owner_guid = {$_SESSION['guid']}))"; // Add access controls $query .= " order by $order_by limit $offset, $limit"; // Add order and limit - return get_data($query, "entity_row_to_elggstar"); + $dt = get_data($query, "entity_row_to_elggstar");
+ return $dt; } /** diff --git a/engine/lib/users.php b/engine/lib/users.php index 9ddb3bdf1..cc293c411 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -229,7 +229,7 @@ * @param int $limit Number of results to return
* @param int $offset Any indexing offset
*/
- public function getObjects($subtype="", $limit = 10, $offset = 0) { get_user_objects($this->getGUID(), $subtype, $limit, $offset); }
+ public function getObjects($subtype="", $limit = 10, $offset = 0) { return get_user_objects($this->getGUID(), $subtype, $limit, $offset); }
/**
* Get the collections associated with a user.
@@ -239,7 +239,7 @@ * @param int $offset Any indexing offset
* @return unknown
*/
- public function getCollections($subtype="", $limit = 10, $offset = 0) { get_user_collections($this->getGUID(), $subtype, $limit, $offset); }
+ public function getCollections($subtype="", $limit = 10, $offset = 0) { return get_user_collections($this->getGUID(), $subtype, $limit, $offset); }
}
@@ -395,7 +395,8 @@ * @return false|array An array of ElggObjects or false, depending on success
*/
function get_user_objects($user_guid, $subtype = "", $limit = 10, $offset = 0) {
- return get_entities('object',$subtype, $user_guid, "time_created desc", $limit, $offset);
+ $ntt = get_entities('object',$subtype, $user_guid, "time_created desc", $limit, $offset);
+ return $ntt;
}
/** |