* @author Christian Weiske * @author Eric Dane * @license GPL http://www.gnu.org/licenses/gpl.html * @link http://sourceforge.net/projects/semanticscuttle */ $httpContentType = 'application/json'; require_once '../www-header.php'; $limit = 30; $beginsWith = null; $currentUserId = $userservice->getCurrentUserId(); if (isset($_GET['limit']) && is_numeric($_GET['limit'])) { $limit = (int)$_GET['limit']; } if (isset($_GET['beginsWith']) && strlen(trim($_GET['beginsWith']))) { $beginsWith = trim($_GET['beginsWith']); } $listTags = SemanticScuttle_Service_Factory::get('Bookmark2Tag')->getAdminTags( $limit, $currentUserId, null, $beginsWith ); $tags = array(); foreach ($listTags as $t) { $tags[] = $t['tag']; } echo json_encode($tags); ?>