public function getCollections($r) { $user = $r->getUser(); //if no collections, redirect to archive admin screen //will force login screen for non-superusers if no collections $c = new Dase_DBO_Collection($this->db); if (!$c->findCount() && $user && $user->is_superuser) { $r->renderRedirect('admin'); } $tpl = new Dase_Template($r); //$feed = Dase_Atom_Feed::retrieve($r->app_root.'/collections.atom'); //$tpl->assign('collections',$feed); $res = Dase_Http::get($r->app_root . '/collections.json'); $collections = Dase_Json::toPhp($res[1]); $tpl->assign('collections', $collections); $r->renderResponse($tpl->fetch('collection/list.tpl')); }