. * */ // Check if we are a user OCP\User::checkLoggedIn(); OCP\App::checkAppEnabled('bookmarks'); OCP\App::setActiveNavigationEntry( 'bookmarks_index' ); OCP\Util::addscript('bookmarks', 'settings'); OCP\Util::addscript('bookmarks', 'bookmarks'); OCP\Util::addStyle('bookmarks', 'bookmarks'); OCP\Util::addscript('bookmarks', 'addBm'); OCP\Util::addscript('bookmarks/3rdparty', 'tag-it'); OCP\Util::addscript('bookmarks/3rdparty', 'js_tpl'); OCP\Util::addStyle('bookmarks/3rdparty', 'jquery.tagit'); $qtags = OC_Bookmarks_Bookmarks::findTags(); $tags = array(); foreach($qtags as $tag) { $tags[] = $tag['tag']; } $bm = array('title'=> '', 'url'=> '', 'tags'=> array(), 'desc'=>'', 'is_public'=>0, ); $tmpl = new OCP\Template( 'bookmarks', 'list', 'user' ); $tmpl->assign('bookmark', $bm); $tmpl->assign('req_tag', isset($_GET['tag']) ? $_GET['tag'] : ''); $tmpl->assign('tags', json_encode($tags), false); $tmpl->printPage();