]> projects.mako.cc - scuttle/blobdiff - templates/sidebar.block.recent.php
initial patch to cause scuttle to work with PHP 8.2
[scuttle] / templates / sidebar.block.recent.php
index f489e49fd13c6e2d4fc8541afb300aa78e6cc3b2..1afcb0dec0ee4af450e086a1ced7f8f339b37fc7 100644 (file)
@@ -1,11 +1,17 @@
 <?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;
+}
+
 $recentTags = $tagservice->getPopularTags($userid, $popCount, $logged_on_userid, $GLOBALS['defaultRecentDays']);
 $recentTags =& $tagservice->tagCloud($recentTags, 5, 90, 225, 'alphabet_asc'); 
 

Benjamin Mako Hill || Want to submit a patch?