diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-10 10:32:23 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-10 10:32:23 +0000 |
commit | 76abeb49eb60bdecc39e8298da26f5941f0e9daf (patch) | |
tree | 29484c9aa205cdd450aa6032f99a9419f1a421c1 /engine/lib/sites.php | |
parent | b7ce3e487e8ba99aa8457aa7fcf1665e851b7113 (diff) | |
download | elgg-76abeb49eb60bdecc39e8298da26f5941f0e9daf.tar.gz elgg-76abeb49eb60bdecc39e8298da26f5941f0e9daf.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* Get user sites
git-svn-id: https://code.elgg.org/elgg/trunk@128 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/sites.php')
-rw-r--r-- | engine/lib/sites.php | 16 |
1 files changed, 9 insertions, 7 deletions
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"); } /** |