]> projects.mako.cc - scuttle/blobdiff - templates/sidebar.block.popular.php
Merge branch 'php8'
[scuttle] / templates / sidebar.block.popular.php
index fc9703d174bd17ac25fd68ea2e41c168dc6dd8a4..05b73ada9e956a6b56f4b134b06043acf21fe631 100644 (file)
@@ -1,11 +1,18 @@
 <?php
-$tagservice =& ServiceFactory::getServiceInstance('TagService');
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$sf = new ServiceFactory();
+$tagservice  =& $sf->getServiceInstance('TagService');
+$userservice =& $sf->getServiceInstance('UserService');
 
 $logged_on_userid = $userservice->getCurrentUserId();
 if ($logged_on_userid === false) {
     $logged_on_userid = NULL;
 }
+if (!isset($userid)) {
+    $userid = NULL;
+}
+if (!isset($user)) {
+    $user = NULL;
+}
 $popularTags =& $tagservice->getPopularTags($userid, $popCount, $logged_on_userid);
 $popularTags =& $tagservice->tagCloud($popularTags, 5, 90, 225, 'alphabet_asc'); 
 

Benjamin Mako Hill || Want to submit a patch?