Permalink
Browse files

remove php4-style object reference passing #2

  • Loading branch information...
1 parent fc4c79d commit 85e2ccd942fc67944c9324e71097f426abf75a01 @cweiske committed Mar 20, 2013
@@ -25,13 +25,13 @@
$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);
@@ -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) {
?>
@@ -14,8 +14,8 @@
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) {
?>
@@ -10,7 +10,7 @@
$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) {
?>
@@ -129,9 +129,9 @@ public function testAddBookmarkUnification()
$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']);
}*/
View
@@ -70,7 +70,7 @@
}
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 @@
}
$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);
?>
View
@@ -63,8 +63,8 @@
$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)) {
@@ -36,7 +36,7 @@
$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.
@@ -61,7 +61,7 @@
<?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): ?>
@@ -19,7 +19,7 @@
$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";
@@ -20,7 +20,7 @@
$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";
@@ -13,7 +13,7 @@
// 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";
View
@@ -100,7 +100,7 @@
$templateservice->loadTemplate('error.404.tpl', $tplVars);
exit();
} else {
- $userid =& $userinfo['uId'];
+ $userid = $userinfo['uId'];
}
}
$pagetitle .= ': '. $user;
@@ -173,7 +173,7 @@
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 @@
//$tplVars['sidebar_blocks'][] = 'popular';
$tplVars['userid'] = $userid;
- $tplVars['userinfo'] =& $userinfo;
+ $tplVars['userinfo'] = $userinfo;
$tplVars['user'] = $user;
$tplVars['range'] = 'user';
@@ -296,9 +296,9 @@
$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) {
View
@@ -108,7 +108,7 @@
}
$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;
View
@@ -55,17 +55,17 @@
$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;
$tplVars['page'] = $page;
$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');
View
@@ -100,7 +100,7 @@
$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;
View
@@ -61,7 +61,7 @@
}
$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)) {
View
@@ -56,7 +56,7 @@
$templateservice->loadTemplate('error.404.tpl', $tplVars);
exit();
} else {
- $userid =& $userinfo->getId();
+ $userid = $userinfo->getId();
}
}
} else {
View
@@ -82,7 +82,7 @@
$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) {
View
@@ -115,7 +115,7 @@
}
}
-$bookmarks =& $bookmarkservice->getBookmarks(
+$bookmarks = $bookmarkservice->getBookmarks(
$start, $perpage, $s_user, NULL, $terms, getSortOrder(),
$s_watchlist, $s_start, $s_end
);
@@ -147,7 +147,7 @@
$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');
View
@@ -109,9 +109,9 @@
$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');
View
@@ -49,7 +49,7 @@
$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');
View
@@ -62,7 +62,7 @@
$templateservice->loadTemplate('error.404.tpl', $tplVars);
exit();
} else {
- $userid =& $userinfo->getId();
+ $userid = $userinfo->getId();
}
}
}
@@ -73,7 +73,7 @@
if ($user) {
$tplVars['user'] = $user;
$tplVars['userid'] = $userid;
- $tplVars['userinfo'] =& $userinfo;
+ $tplVars['userinfo'] = $userinfo;
// Pagination
$perpage = getPerPageCount($currentUser);
@@ -91,12 +91,12 @@
$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');

0 comments on commit 85e2ccd

Please sign in to comment.