]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
remove php4-style object reference passing #2
authorChristian Weiske <cweiske@cweiske.de>
Wed, 20 Mar 2013 19:00:25 +0000 (20:00 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 20 Mar 2013 19:00:25 +0000 (20:00 +0100)
23 files changed:
data/templates/default/dynamictags.inc.php
data/templates/default/sidebar.block.common.php
data/templates/default/sidebar.block.popular.php
data/templates/default/sidebar.block.recent.php
tests/BookmarkTest.php
www/admin.php
www/alltags.php
www/api/export_gcs.php
www/api/export_sioc.php
www/api/posts_all.php
www/api/posts_public.php
www/api/tags_get.php
www/bookmarks.php
www/edit.php
www/history.php
www/index.php
www/populartags.php
www/profile.php
www/rss.php
www/search.php
www/tags.php
www/users.php
www/watchlist.php

index 8cf07c17f04ecd4b0da0b298414cfb01fcce118e..c2ab6d4e05ae3b532e2cb28573abc2ac6207128f 100644 (file)
@@ -25,13 +25,13 @@ $b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
 $logged_on_userid = $userservice->getCurrentUserId();
 
 //tags from current user
-$userPopularTags        =& $b2tservice->getPopularTags($logged_on_userid, 25, $logged_on_userid);
-$userPopularTagsCloud   =& $b2tservice->tagCloud($userPopularTags, 5, 90, 175);
+$userPopularTags        = $b2tservice->getPopularTags($logged_on_userid, 25, $logged_on_userid);
+$userPopularTagsCloud   = $b2tservice->tagCloud($userPopularTags, 5, 90, 175);
 $userPopularTagsCount   = count($userPopularTags);
 
 //tags from all users
-$allPopularTags        =& $b2tservice->getPopularTags(null, 5, $logged_on_userid);
-$allPopularTagsCloud   =& $b2tservice->tagCloud($allPopularTags, 5, 90, 175);
+$allPopularTags        = $b2tservice->getPopularTags(null, 5, $logged_on_userid);
+$allPopularTagsCloud   = $b2tservice->tagCloud($allPopularTags, 5, 90, 175);
 $allPopularTagsCount   = count($allPopularTags);
 
 
index 951ed809eb5b02130c38c2afc96acd8aab467ecb..dfc83efab9481249fad8c4b41f5d260d2966c470 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
-$commonTags =& $b2tservice->getRelatedTagsByHash($hash);
-$commonTags =& $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');
+$commonTags = $b2tservice->getRelatedTagsByHash($hash);
+$commonTags = $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');
 
 if ($commonTags && count($commonTags) > 0) {
        ?>
index 50756c0c5ecd9bddffdb61c19cd3d669a9fa7086..842aa600792710e8824f4f779312f0bee34f072f 100644 (file)
@@ -14,8 +14,8 @@ $logged_on_userid = $userservice->getCurrentUserId();
 if ($logged_on_userid === false) {
     $logged_on_userid = NULL;
 }
-$popularTags =& $b2tservice->getPopularTags($userid, $popCount, $logged_on_userid);
-$popularTags =& $b2tservice->tagCloud($popularTags, 5, 90, 225, 'alphabet_asc'); 
+$popularTags = $b2tservice->getPopularTags($userid, $popCount, $logged_on_userid);
+$popularTags = $b2tservice->tagCloud($popularTags, 5, 90, 225, 'alphabet_asc');
 
 if ($popularTags && count($popularTags) > 0) {
 ?>
index 1ffeb4d414ea8f5d438c620ebc9af7e92aed2b74..80ae71c9c94a43a0b8a3c82bdf8c9911c2a57ff8 100644 (file)
@@ -10,7 +10,7 @@ if ($logged_on_userid === false) {
     $logged_on_userid = NULL;
 }
 $recentTags = $b2tservice->getPopularTags($userid, $popCount, $logged_on_userid, $GLOBALS['defaultRecentDays']);
-$recentTags =& $b2tservice->tagCloud($recentTags, 5, 90, 225, 'alphabet_asc'); 
+$recentTags = $b2tservice->tagCloud($recentTags, 5, 90, 225, 'alphabet_asc');
 
 if ($recentTags && count($recentTags) > 0) {
 ?>
index 44a82d9026d6aeff6d2eb452f1f0f5f4edf77c91..c4368592827092e420610ca289d3a86bdef09164 100644 (file)
@@ -129,9 +129,9 @@ class BookmarkTest extends TestBase
      $bs = $this->bs;
 
      $bs->addBookmark("http://site1.com", "title", "éèüaàê", "status", array('tag1'), null, false, false, 1);
-     $bookmarks =& $bs->getBookmarks(0, NULL, NULL, NULL, $terms = "eeaae"); //void
+     $bookmarks = $bs->getBookmarks(0, NULL, NULL, NULL, $terms = "eeaae"); //void
      $this->assertEquals(0, $bookmarks['total']);
-     $bookmarks =& $bs->getBookmarks(0, NULL, NULL, NULL, $terms = "eeuaae");
+     $bookmarks = $bs->getBookmarks(0, NULL, NULL, NULL, $terms = "eeuaae");
      $this->assertEquals(1, $bookmarks['total']);
      }*/
 
index f9b9b8d8655ad987ee79c9cd9ee61154fb314f09..034872ad48a870ed6d80b15e65add3b2ba139a87 100644 (file)
@@ -70,7 +70,7 @@ if ($action
                        }
                        break;
                case 'checkUrl' :
-                       $bookmarks =& $bookmarkservice->getBookmarks(0, NULL, NULL, NULL, NULL, getSortOrder());
+                       $bookmarks = $bookmarkservice->getBookmarks(0, NULL, NULL, NULL, NULL, getSortOrder());
                        foreach($bookmarks['bookmarks'] as $bookmark) {
                                if(!checkUrl($bookmark['bAddress'])) {
                                        $tplVars['error'].= T_('Problem with ').$bookmark['bAddress'].' ('. $bookmark['username'] .')<br/>';  
@@ -83,13 +83,13 @@ if ($action
 }
 
 $templatename = 'admin.tpl';
-$users =& $userservice->getObjectUsers();
+$users = $userservice->getObjectUsers();
 
 if ( !is_array($users) ) {
        $users = array();
 }
 
-$tplVars['users'] =& $users;
+$tplVars['users'] = $users;
 
 $templateservice->loadTemplate($templatename, $tplVars);
 ?>
index 43ad1cbc0a307cdfc21657c167ba484dc4dcff07..16af7fda5354d2adcdec0395ebfb7ec4785718c9 100644 (file)
@@ -63,8 +63,8 @@ if (isset($user) && $user != '') {
        $userid = NULL;
 }
 
-$tags =& $b2tservice->getTags($userid);
-$tplVars['tags'] =& $b2tservice->tagCloud($tags, 5, 90, 225, getSortOrder());
+$tags = $b2tservice->getTags($userid);
+$tplVars['tags'] = $b2tservice->tagCloud($tags, 5, 90, 225, getSortOrder());
 $tplVars['user'] = $user;
 
 if (isset($userid)) {
index 9c0d85c92040323cf55d25ea29222a525f4dd531..06ab217c68d1f9810ab4dc85425a86ad27cc0023 100644 (file)
@@ -36,7 +36,7 @@ else
 $tag = NULL;
 
 // Get the posts relevant to the passed-in variables.
-$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, NULL, $tag, NULL, getSortOrder());
+$bookmarks = $bookmarkservice->getBookmarks(0, NULL, NULL, $tag, NULL, getSortOrder());
 
 
 // Set up the plain file and output all the posts.
index 47ffc96dabc20a653637196de43380f6d9ee3dd4..45cbf14120202075f78e2913045f74656d4c1512 100644 (file)
@@ -61,7 +61,7 @@ No page for usergroup (users/admin) for the moment
 
 <?php 
 //bookmarks are described using Annotea ontology
-$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, NULL, NULL);
+$bookmarks = $bookmarkservice->getBookmarks(0, NULL, NULL, NULL);
 ?>
 
 <?php foreach($bookmarks['bookmarks'] as $bookmark): ?>
index 2d274f48a9cc7e3afedc3af3294b5661275f20db..7204b605e94b3168c0eb76c2f052eda4479801ce 100644 (file)
@@ -19,7 +19,7 @@ else
     $tag = NULL;
 
 // Get the posts relevant to the passed-in variables.
-$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag);
+$bookmarks = $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag);
 
 // Set up the XML file and output all the posts.
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
index 42585500e1e8fb9392a7a1b20e8d4aac869e738a..0a0918753f1038bf8292572244db7781a8596aa0 100644 (file)
@@ -20,7 +20,7 @@ else
     $tag = NULL;
 
 // Get the posts relevant to the passed-in variables.
-$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, NULL, $tag);
+$bookmarks = $bookmarkservice->getBookmarks(0, NULL, NULL, $tag);
 
 // Set up the XML file and output all the posts.
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
index 06a40d90d9636a4cbefc0b00354589af97cde17e..c0fb83dbf8b5822ca5f28c46eab7f8fc01a0c9f6 100644 (file)
@@ -13,7 +13,7 @@ $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
 
 
 // Get the tags relevant to the passed-in variables.
-$tags =& $b2tservice->getTags($userservice->getCurrentUserId());
+$tags = $b2tservice->getTags($userservice->getCurrentUserId());
 
 // Set up the XML file and output all the tags.
 echo '<?xml version="1.0" standalone="yes" ?'.">\r\n";
index fe123105e34bd8c5801cc048b1e204e78c5a9517..bf06fb6ac430c558e19e05c786f833dda1563255 100644 (file)
@@ -100,7 +100,7 @@ if ($user) {
                        $templateservice->loadTemplate('error.404.tpl', $tplVars);
                        exit();
                } else {
-                       $userid =& $userinfo['uId'];
+                       $userid = $userinfo['uId'];
                }
        }
        $pagetitle .= ': '. $user;
@@ -173,7 +173,7 @@ if ($userservice->isLoggedOn() && POST_SUBMITTED != '') {
 if (GET_ACTION == "add") {
        // If the bookmark exists already, edit the original
        if ($bookmarkservice->bookmarkExists(stripslashes(GET_ADDRESS), $currentUserID)) {              
-               $bookmark =& $bookmarkservice->getBookmarks(0, NULL, $currentUserID, NULL, NULL, NULL, NULL, NULL, NULL, $bookmarkservice->getHash(stripslashes(GET_ADDRESS)));
+               $bookmark = $bookmarkservice->getBookmarks(0, NULL, $currentUserID, NULL, NULL, NULL, NULL, NULL, NULL, $bookmarkservice->getHash(stripslashes(GET_ADDRESS)));
                $popup = (GET_POPUP!='') ? '?popup=1' : '';
                header('Location: '. createURL('edit', $bookmark['bookmarks'][0]['bId'] . $popup));
                exit();
@@ -250,7 +250,7 @@ if ($templatename == 'editbookmark.tpl') {
        //$tplVars['sidebar_blocks'][] = 'popular';
 
        $tplVars['userid'] = $userid;
-       $tplVars['userinfo'] =& $userinfo;
+       $tplVars['userinfo'] = $userinfo;
        $tplVars['user'] = $user;
        $tplVars['range'] = 'user';
 
@@ -296,9 +296,9 @@ if ($templatename == 'editbookmark.tpl') {
        $tplVars['start'] = $start;
        $tplVars['bookmarkCount'] = $start + 1;
 
-       $bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, $userid, $cat, null, getSortOrder());
+       $bookmarks = $bookmarkservice->getBookmarks($start, $perpage, $userid, $cat, null, getSortOrder());
        $tplVars['total'] = $bookmarks['total'];
-       $tplVars['bookmarks'] =& $bookmarks['bookmarks'];
+       $tplVars['bookmarks'] = $bookmarks['bookmarks'];
        $tplVars['cat_url'] = createURL('bookmarks', '%s/%s');
        $tplVars['nav_url'] = createURL('bookmarks', '%s/%s%s');
        if ($userservice->isLoggedOn() && $user == $currentUsername) {
index cbfa30b160c351aa57b0bafcc78c33c3edf6b7f8..cbdcbccde500d3e668ebd3e8c5cda8fee89df120 100644 (file)
@@ -108,7 +108,7 @@ if (!($row = $bookmarkservice->getBookmark(intval($bookmark), true))) {
     }
 
     $tplVars['popup'] = (GET_POPUP) ? GET_POPUP : null;
-    $tplVars['row'] =& $row;
+    $tplVars['row'] = $row;
     $tplVars['formaction']  = createURL('edit', $bookmark);
     $tplVars['btnsubmit'] = T_('Save Changes');
     $tplVars['showdelete'] = true;
index 489d9322eac067a7978ba7b7ad3a9def4b567419..50cf3ebe0a8a04c90f437cf5003819e87ef65895 100644 (file)
@@ -55,9 +55,9 @@ if (intval(GET_PAGE) > 1) {
     $start = 0;
 }
 
-if ($bookmark =& $bookmarkservice->getBookmarkByHash($hash)) {
+if ($bookmark = $bookmarkservice->getBookmarkByHash($hash)) {
     // Template variables
-    $bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, NULL, NULL, NULL, getSortOrder(), NULL, NULL, NULL, $hash);
+    $bookmarks = $bookmarkservice->getBookmarks($start, $perpage, NULL, NULL, NULL, getSortOrder(), NULL, NULL, NULL, $hash);
     $tplVars['pagetitle'] = T_('History') .': '. $bookmark['bAddress'];
     $tplVars['subtitle'] = sprintf(T_('History for %s'), $bookmark['bAddress']);
     $tplVars['loadjs'] = true;
@@ -65,7 +65,7 @@ if ($bookmark =& $bookmarkservice->getBookmarkByHash($hash)) {
     $tplVars['start'] = $start;
     $tplVars['bookmarkCount'] = $start + 1;
     $tplVars['total'] = $bookmarks['total'];
-    $tplVars['bookmarks'] =& $bookmarks['bookmarks'];
+    $tplVars['bookmarks'] = $bookmarks['bookmarks'];
     $tplVars['hash'] = $hash;
     $tplVars['popCount'] = 50;
     $tplVars['sidebar_blocks'] = array('common');
index 7fbb84c2a0c8fe5f18f7451b60cf2cedf2d76ad3..007aae0288b725c22eb6b465774cea93ace3a181 100644 (file)
@@ -100,7 +100,7 @@ $tplVars['bookmarkCount'] = $start + 1;
 $bookmarks = $bookmarkservice->getBookmarks($start, $perpage, NULL, NULL, NULL, getSortOrder(), NULL, 0, NULL);
 
 $tplVars['total'] = $bookmarks['total'];
-$tplVars['bookmarks'] =& $bookmarks['bookmarks'];
+$tplVars['bookmarks'] = $bookmarks['bookmarks'];
 $tplVars['cat_url'] = createURL('bookmarks', '%1$s/%2$s');
 $tplVars['nav_url'] = createURL('index', '%3$s');
 $tplVars['summarizeLinkedTags'] = true;
index 5b69b866869677229e64fb235d45f9b0be179c78..20b1b53d532b0a5cf37cb132da1549d2afe98dbe 100644 (file)
@@ -61,7 +61,7 @@ if (isset($user) && $user != '') {
 }
 
 $tags = $b2tservice->getPopularTags($userid, 150);
-$tplVars['tags'] =& $b2tservice->tagCloud($tags, 5, 90, 225, getSortOrder('alphabet_asc'));
+$tplVars['tags'] = $b2tservice->tagCloud($tags, 5, 90, 225, getSortOrder('alphabet_asc'));
 $tplVars['user'] = $user;
 
 if (isset($userid)) {
index 63f4da8f93affe380d2c52d1ab69189d7b5e0af0..6a4222e7600ac7d9b2cdc6b8e6e8b33f0f82346d 100644 (file)
@@ -56,7 +56,7 @@ if ($user) {
                        $templateservice->loadTemplate('error.404.tpl', $tplVars);
                        exit();
                } else {
-                       $userid =& $userinfo->getId();
+                       $userid = $userinfo->getId();
                }
        }
 } else {
index 1f8894447b4fb4b9040de3fc6754fbf01a2f49c5..6f376ec1047251aa2413d07813867d855b0288e6 100644 (file)
@@ -82,7 +82,7 @@ if ($user && $user != 'all') {
         $userid = intval($user);
     } else {
         if ($userinfo = $userservice->getUserByUsername($user)) {
-            $userid =& $userinfo[$userservice->getFieldName('primary')];
+            $userid = $userinfo[$userservice->getFieldName('primary')];
             /* if user is not logged in and has valid privateKey */
             if (!$userservice->isLoggedOn()) {
                 if ($privateKey != null) {
index a5c13e3e0bd80c36d5f81df33e624763ddec9d2e..e4977adc75de28389d8fa0e2f7487b089578a3d7 100644 (file)
@@ -115,7 +115,7 @@ if (is_null($terms)) {
 
     }
 }
-$bookmarks =& $bookmarkservice->getBookmarks(
+$bookmarks = $bookmarkservice->getBookmarks(
     $start, $perpage, $s_user, NULL, $terms, getSortOrder(),
     $s_watchlist, $s_start, $s_end
 );
@@ -147,7 +147,7 @@ $tplVars['terms'] = $terms;
 $tplVars['pagetitle'] = T_('Search Bookmarks');
 $tplVars['bookmarkCount'] = $start + 1;
 $tplVars['total'] = $bookmarks['total'];
-$tplVars['bookmarks'] =& $bookmarks['bookmarks'];
+$tplVars['bookmarks'] = $bookmarks['bookmarks'];
 $tplVars['cat_url'] = createURL('tags', '%2$s');
 $tplVars['nav_url'] = createURL('search', $range .'/'. $terms .'/%3$s');
 
index c56b97fd35a3466803db54abbf0ce7039e874269..3e2cd5fec1210cac00420011cbfd4fcd4b911a14 100644 (file)
@@ -109,9 +109,9 @@ $tplVars['currenttag'] = $cat;
 $tplVars['sidebar_blocks'] = array('linked', 'related', 'menu2');//array('linked', 'related', 'popular');
 $tplVars['subtitlehtml'] = $pagetitle;
 $tplVars['bookmarkCount'] = $start + 1;
-$bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, NULL, $cat, NULL, getSortOrder());
+$bookmarks = $bookmarkservice->getBookmarks($start, $perpage, NULL, $cat, NULL, getSortOrder());
 $tplVars['total'] = $bookmarks['total'];
-$tplVars['bookmarks'] =& $bookmarks['bookmarks'];
+$tplVars['bookmarks'] = $bookmarks['bookmarks'];
 $tplVars['cat_url'] = createURL('bookmarks', '%1$s/%2$s');
 $tplVars['nav_url'] = createURL('tags', '%2$s%3$s');
 
index a357b56b1a650c4717da8bf8d44bad20e1a57441..9d6c655386e7ed3c461c2bc7c8bd8d438d730a80 100644 (file)
@@ -49,7 +49,7 @@ $tplVars['loadjs'] = true;
 $tplVars['sidebar_blocks'] = array('recent', 'popular');
 $tplVars['subtitle'] = filter($pagetitle);
 
-$tplVars['users'] =& $userservice->getUsers();
+$tplVars['users'] = $userservice->getUsers();
 //$tplVars['cat_url'] = createURL('tags', '%2$s');
 //$tplVars['nav_url'] = createURL('tags', '%2$s%3$s');
 
index ded67826225fa5d65869a02f2f6f78b7f95c5830..667cbe9dd177888f3cbf0c008ce148e44c8e5d51 100644 (file)
@@ -62,7 +62,7 @@ if ($user) {
             $templateservice->loadTemplate('error.404.tpl', $tplVars);
             exit();
         } else {
-            $userid =& $userinfo->getId();
+            $userid = $userinfo->getId();
         }
     }
 }
@@ -73,7 +73,7 @@ $tplVars['loadjs'] = true;
 if ($user) {
     $tplVars['user'] = $user;
     $tplVars['userid'] = $userid;
-    $tplVars['userinfo'] =& $userinfo;
+    $tplVars['userinfo'] = $userinfo;
 
     // Pagination
     $perpage = getPerPageCount($currentUser);
@@ -91,12 +91,12 @@ if ($user) {
     $tplVars['start'] = $start;
     $tplVars['bookmarkCount'] = $start + 1;
     
-    $bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, $userid, NULL, NULL, getSortOrder(), true);
+    $bookmarks = $bookmarkservice->getBookmarks($start, $perpage, $userid, NULL, NULL, getSortOrder(), true);
 
     $tplVars['sidebar_blocks'] = array('watchlist');
     $tplVars['watched'] = true;
     $tplVars['total'] = $bookmarks['total'];
-    $tplVars['bookmarks'] =& $bookmarks['bookmarks'];
+    $tplVars['bookmarks'] = $bookmarks['bookmarks'];
     $tplVars['cat_url'] = createURL('tags', '%2$s');
     $tplVars['nav_url'] = createURL('watchlist', '%s/%s%s');