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:
parent
b98b1391e9
commit
7380d7bc76
@ -44,7 +44,7 @@ class Json_Album_Controller extends Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function is_admin() {
|
function is_admin() {
|
||||||
if (user::active()->admin) {
|
if (identity::active_user()->admin) {
|
||||||
print json_encode(array("result" => "success", "csrf" => access::csrf_token()));
|
print json_encode(array("result" => "success", "csrf" => access::csrf_token()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ class Json_Album_Controller extends Controller {
|
|||||||
|
|
||||||
function albums($item_id) {
|
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){
|
function children($item_id){
|
||||||
|
Reference in New Issue
Block a user