From 88d7463ce22c242b805c281206001d60cd5bf2c5 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 12 Jun 2004 03:17:39 +0000 Subject: [PATCH] The ampersand for references is unnecessary when the function is declared to accept references as parameters. Further, it produces a warning on some PHP versions (such as the 4.3.6 that comes with Fedora Core 2). Removing... --- includes/ObjectCache.php | 2 +- includes/Skin.php | 2 +- includes/SkinPHPTal.php | 44 ++++++++++++++++++++-------------------- includes/Title.php | 2 +- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/includes/ObjectCache.php b/includes/ObjectCache.php index 4ccf30a6ee..ce511ff37b 100644 --- a/includes/ObjectCache.php +++ b/includes/ObjectCache.php @@ -213,7 +213,7 @@ class /* abstract */ SqlBagOStuff extends BagOStuff { $this->delete( $key ); $this->_query( "INSERT INTO $0 (keyname,value,exptime) VALUES('$1','$2','$exp')", - $key, serialize(&$value)); + $key, serialize($value)); return true; /* ? */ } diff --git a/includes/Skin.php b/includes/Skin.php index 7b097b4313..bc460590f5 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -402,7 +402,7 @@ class Skin { if($wgUseCategoryBrowser) { $s .= '

'; $catstack = array(); - $s.= $wgTitle->getAllParentCategories(&$catstack); + $s.= $wgTitle->getAllParentCategories($catstack); } return $s; diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index c8c6ec9ffe..53e33ad6bf 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -90,7 +90,7 @@ $tpl->set( "title", $wgOut->getPageTitle() ); $tpl->set( "pagetitle", $wgOut->getHTMLTitle() ); - $tpl->setRef( "thispage", &$this->thispage ); + $tpl->setRef( "thispage", $this->thispage ); $subpagestr = $this->subPageSubtitle(); $tpl->set( "subtitle", !empty($subpagestr)? @@ -114,13 +114,13 @@ 'ttip' => wfMsg('tooltip-'.$format) ); } - $tpl->setRef( 'feeds', &$feeds ); + $tpl->setRef( 'feeds', $feeds ); } - $tpl->setRef( 'mimetype', &$wgMimeType ); - $tpl->setRef( 'charset', &$wgOutputEncoding ); + $tpl->setRef( 'mimetype', $wgMimeType ); + $tpl->setRef( 'charset', $wgOutputEncoding ); $tpl->set( 'headlinks', $out->getHeadLinks() ); - $tpl->setRef( 'skinname', &$this->skinname ); - $tpl->setRef( "loggedin", &$this->loggedin ); + $tpl->setRef( 'skinname', $this->skinname ); + $tpl->setRef( "loggedin", $this->loggedin ); $tpl->set('nsclass', 'ns-'.$wgTitle->getNamespace()); /* XXX currently unused, might get useful later $tpl->set( "editable", ($wgTitle->getNamespace() != NS_SPECIAL ) ); @@ -131,18 +131,18 @@ $tpl->set( "sysop", $wgUser->isSysop() ); */ $tpl->set( "searchaction", $this->escapeSearchLink() ); - $tpl->setRef( "stylepath", &$wgStylePath ); - $tpl->setRef( "logopath", &$wgLogo ); - $tpl->setRef( "lang", &$wgLanguageCode ); + $tpl->setRef( "stylepath", $wgStylePath ); + $tpl->setRef( "logopath", $wgLogo ); + $tpl->setRef( "lang", $wgLanguageCode ); $tpl->set( "dir", $wgLang->isRTL() ? "rtl" : "ltr" ); $tpl->set( "rtl", $wgLang->isRTL() ); $tpl->set( "langname", $wgLang->getLanguageName( $wgLanguageCode ) ); - $tpl->setRef( "username", &$this->username ); - $tpl->setRef( "userpage", &$this->userpage); - $tpl->setRef( "userpageurl", &$this->userpageUrlDetails['href']); - $tpl->setRef( "usercss", &$this->usercss); - $tpl->setRef( "userjs", &$this->userjs); - $tpl->setRef( "userjsprev", &$this->userjsprev); + $tpl->setRef( "username", $this->username ); + $tpl->setRef( "userpage", $this->userpage); + $tpl->setRef( "userpageurl", $this->userpageUrlDetails['href']); + $tpl->setRef( "usercss", $this->usercss); + $tpl->setRef( "userjs", $this->userjs); + $tpl->setRef( "userjsprev", $this->userjsprev); if($this->loggedin) { $tpl->set( "jsvarurl", $this->makeUrl('-','action=raw&gen=js&smaxage=0') ); } else { @@ -164,8 +164,8 @@ $ntl = ""; } - $tpl->setRef( "newtalk", &$ntl ); - $tpl->setRef( "skin", &$this); + $tpl->setRef( "newtalk", $ntl ); + $tpl->setRef( "skin", $this); $tpl->set( "logo", $this->logoText() ); if ( $wgOut->isArticle() and (!isset( $oldid ) or isset( $diff )) and 0 != $wgArticle->getID() ) { if ( !$wgDisableCounters ) { @@ -182,11 +182,11 @@ $tpl->set( "disclaimer", $this->disclaimerLink() ); $tpl->set( "about", $this->aboutLink() ); - $tpl->setRef( "debug", &$out->mDebugtext ); + $tpl->setRef( "debug", $out->mDebugtext ); $tpl->set( "reporttime", $out->reportTime() ); $tpl->set( "sitenotice", $wgSiteNotice ); - $tpl->setRef( "bodytext", &$out->mBodytext ); + $tpl->setRef( "bodytext", $out->mBodytext ); $language_urls = array(); foreach( $wgOut->getLanguageLinks() as $l ) { @@ -196,13 +196,13 @@ 'class' => $wgLang->isRTL() ? 'rtl' : 'ltr'); } if(count($language_urls)) { - $tpl->setRef( 'language_urls', &$language_urls); + $tpl->setRef( 'language_urls', $language_urls); } else { $tpl->set('language_urls', false); } $tpl->set('personal_urls', $this->buildPersonalUrls()); $content_actions = $this->buildContentActionUrls(); - $tpl->setRef('content_actions', &$content_actions); + $tpl->setRef('content_actions', $content_actions); // XXX: attach this from javascript, same with section editing if($this->iseditable && $wgUser->getOption("editondblclick") ) { @@ -305,7 +305,7 @@ $talk_class = (Namespace::isTalk( $wgTitle->getNamespace()) ? 'selected' : false); $talktitle = Title::newFromText( $this->titletxt ); $talktitle = $talktitle->getTalkPage(); - $this->checkTitle(&$talktitle, &$this->titletxt); + $this->checkTitle($talktitle, $this->titletxt); if($talktitle->getArticleId() != 0) { $content_actions['talk'] = array( 'class' => $talk_class, diff --git a/includes/Title.php b/includes/Title.php index cba6d53c6f..2b6603ac73 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1243,7 +1243,7 @@ class Title { # add it to the stack $stack[$this->getText()] = $tpar->getText(); # grab its parents - $result .= $tpar->getAllParentCategories(&$stack); + $result .= $tpar->getAllParentCategories($stack); } } -- 2.20.1