From 7380d7bc761d1e1ebdf6652a2b41fb6c85d6906c Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 17 Jan 2010 09:27:48 -0800 Subject: [PATCH] 1) Call identity::active_user instead of user::active() 2) The where clause needs to be passed as array of arrays when filtering for albums. --- modules/gwtorganise/controllers/json_album.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gwtorganise/controllers/json_album.php b/modules/gwtorganise/controllers/json_album.php index 6f7dc97c..da36fd98 100644 --- a/modules/gwtorganise/controllers/json_album.php +++ b/modules/gwtorganise/controllers/json_album.php @@ -44,7 +44,7 @@ class Json_Album_Controller extends Controller { } function is_admin() { - if (user::active()->admin) { + if (identity::active_user()->admin) { print json_encode(array("result" => "success", "csrf" => access::csrf_token())); return; } @@ -54,7 +54,7 @@ class Json_Album_Controller extends Controller { function albums($item_id) { - print $this->child_elements($item_id, array("type", "=", "album")); + print $this->child_elements($item_id, array(array("type", "=", "album"))); } function children($item_id){