1
0

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.
This commit is contained in:
Tim Almdal 2010-01-17 09:27:48 -08:00
parent b98b1391e9
commit 7380d7bc76

View File

@ -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){