From 76abeb49eb60bdecc39e8298da26f5941f0e9daf Mon Sep 17 00:00:00 2001 From: icewing Date: Mon, 10 Mar 2008 10:32:23 +0000 Subject: Marcus Povey * Get user sites git-svn-id: https://code.elgg.org/elgg/trunk@128 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/sites.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/sites.php b/engine/lib/sites.php index e310c2c93..32f320f59 100644 --- a/engine/lib/sites.php +++ b/engine/lib/sites.php @@ -259,20 +259,19 @@ } /** - * Enter description here... + * Get sites based on the provided information. * * @param int $user_id * @param string $type - * @param string $metadata_type + * @param string $metadata_name * @param string $metadata_value * @param string $order_by * @param int $limit * @param int $offset */ - function get_sites($user_id = 0, $type = "", $metadata_type = "", $metadata_value = "", $order_by = "created desc", $limit = 10, $offset = 0) + function get_sites($user_id = 0, $type = "", $metadata_name = "", $metadata_value = "", $order_by = "created desc", $limit = 10, $offset = 0) { - // TODO : Writeme - throw new NotImplementedException("Writeme!"); + return get_objects_from_metadatas(0, 'site', $metadata_name, $metadata_value, $user_id, $order_by, $limit, $offset); } /** @@ -317,8 +316,11 @@ */ function get_site_users($site_id, $limit, $offset) { - // TODO : Writeme - throw new NotImplementedException("Writeme!"); + $site_id = (int)$site_id; + $limit = (int)$limit; + $offset = (int)$offset; + + return get_data("SELECT u.* from users u, users_sites s where s.site_id=$site_id and u.id = s.user_id","row_to_elgguser"); } /** -- cgit v1.2.3