remove php4-style object reference passing #2
This commit is contained in:
parent
fc4c79df8a
commit
85e2ccd942
23 changed files with 43 additions and 43 deletions
|
@ -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);
|
||||
|
||||
|
||||
|
|
|
@ -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 @@ $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) {
|
||||
?>
|
||||
|
|
|
@ -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) {
|
||||
?>
|
||||
|
|
|
@ -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']);
|
||||
}*/
|
||||
|
||||
|
|
|
@ -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);
|
||||
?>
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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): ?>
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -56,7 +56,7 @@ if ($user) {
|
|||
$templateservice->loadTemplate('error.404.tpl', $tplVars);
|
||||
exit();
|
||||
} else {
|
||||
$userid =& $userinfo->getId();
|
||||
$userid = $userinfo->getId();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in a new issue