summaryrefslogtreecommitdiff
path: root/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'ajax')
-rw-r--r--ajax/getlinkedtags.php1
-rw-r--r--ajax/gettags.php11
2 files changed, 2 insertions, 10 deletions
diff --git a/ajax/getlinkedtags.php b/ajax/getlinkedtags.php
index feb70ae..24d00fc 100644
--- a/ajax/getlinkedtags.php
+++ b/ajax/getlinkedtags.php
@@ -26,7 +26,6 @@ require_once('../header.inc.php');
/* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
$tagstatservice =& ServiceFactory::getServiceInstance('TagStatService');
/* Managing all possible inputs */
diff --git a/ajax/gettags.php b/ajax/gettags.php
index 167c63d..7b8b33a 100644
--- a/ajax/gettags.php
+++ b/ajax/gettags.php
@@ -23,23 +23,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require_once('../header.inc.php');
+/* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
-
-if ($userservice->isLoggedOn()) {
- $loggedon = true;
- $currentUser = $userservice->getCurrentUser();
- $currentUserID = $userservice->getCurrentUserId();
- $currentUsername = $currentUser[$userservice->getFieldName('username')];
-}
?>
{identifier:"tag",
items: [
<?php
- $listTags = $b2tservice->getPopularTags($currentUserID, 1000, $currentUserID);
+ $listTags = $b2tservice->getPopularTags($userservice->getCurrentUserId(), 1000, $userservice->getCurrentUserId());
foreach($listTags as $t) {
echo "{tag: \"".$t['tag']."\"},";
}