{{REVISIONID}} when Cite extension is used
* (bug 6622) Removed deprecated function image::newFromTitle
* (bug 6627) Fix regression in Special:Ipblocklist with table prefix
+* Removed forced dereferencements (new() returns a reference in PHP5)
== Languages updated ==
# Native PHP diff
$ota = explode( "\n", $wgContLang->segmentForDiff( $otext ) );
$nta = explode( "\n", $wgContLang->segmentForDiff( $ntext ) );
- $diffs =& new Diff( $ota, $nta );
- $formatter =& new TableDiffFormatter();
+ $diffs = new Diff( $ota, $nta );
+ $formatter = new TableDiffFormatter();
return $wgContLang->unsegmentForDiff( $formatter->format( $diffs ) );
}
$line = $this->img->nextHistoryLine();
if ( $line ) {
- $list =& new ImageHistoryList( $sk );
+ $list = new ImageHistoryList( $sk );
$s = $list->beginImageHistoryList() .
$list->imageHistoryLine( true, wfTimestamp(TS_MW, $line->img_timestamp),
$this->mTitle->getDBkey(), $line->img_user,
$className = 'SkinStandard';
require_once( "{$wgStyleDirectory}/Standard.php" );
}
- $skin =& new $className;
+ $skin = new $className;
return $skin;
}
*/
function wfSpecialLog( $par = '' ) {
global $wgRequest;
- $logReader =& new LogReader( $wgRequest );
+ $logReader = new LogReader( $wgRequest );
if( $wgRequest->getVal( 'type' ) == '' && $par != '' ) {
$logReader->limitType( $par );
}
- $logViewer =& new LogViewer( $logReader );
+ $logViewer = new LogViewer( $logReader );
$logViewer->show();
}
if(!preg_match("/[0-9]{14}/",$timestamp)) return 0;
- $archive =& new PageArchive( $this->mTargetObj );
+ $archive = new PageArchive( $this->mTargetObj );
$text = $archive->getRevisionText( $timestamp );
$wgOut->setPagetitle( wfMsg( "undeletepage" ) );
# Show relevant lines from the deletion log:
$wgOut->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" );
require_once( 'SpecialLog.php' );
- $logViewer =& new LogViewer(
+ $logViewer = new LogViewer(
new LogReader(
new FauxRequest(
array( 'page' => $this->mTargetObj->getPrefixedText(),
require_once( 'templates/Userlogin.php' );
if ( $this->mType == 'signup' ) {
- $template =& new UsercreateTemplate();
+ $template = new UsercreateTemplate();
$q = 'action=submitlogin&type=signup';
$linkq = 'type=login';
$linkmsg = 'gotaccount';
} else {
- $template =& new UserloginTemplate();
+ $template = new UserloginTemplate();
$q = 'action=submitlogin&type=login';
$linkq = 'type=signup';
$linkmsg = 'nologin';
*/
$filteredText = Sanitizer::decodeCharReferences( $text );
- $t =& new Title();
+ $t = new Title();
$t->mDbkeyform = str_replace( ' ', '_', $filteredText );
$t->mDefaultNamespace = $defaultNamespace;
* @access public
*/
public static function &makeTitle( $ns, $title ) {
- $t =& new Title();
+ $t = new Title();
$t->mInterwiki = '';
$t->mFragment = '';
$t->mNamespace = intval( $ns );
}
-$suite =& new PHPUnit_TestSuite( 'CleanUpTest' );
+$suite = new PHPUnit_TestSuite( 'CleanUpTest' );
$result = PHPUnit::run( $suite );
echo $result->toString();
$ota = explode( "\n", str_replace( "\r\n", "\n", $a ) );
$nta = explode( "\n", str_replace( "\r\n", "\n", $b ) );
- $diffs =& new Diff( $ota, $nta );
- $formatter =& new TableDiffFormatter();
+ $diffs = new Diff( $ota, $nta );
+ $formatter = new TableDiffFormatter();
$funky = $formatter->format( $diffs );
preg_match_all( '/<span class="diffchange">(.*?)<\/span>/', $funky, $matches );
foreach( $matches[1] as $bit ) {
$norm = '';
}
-?>
\ No newline at end of file
+?>
function &newConnection() {
global $wgDBadminuser, $wgDBadminpassword;
global $wgDBserver, $wgDBname;
- $db =& new Database( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
+ $db = new Database( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
return $db;
}
global $wgDBadminuser, $wgDBadminpassword;
global $wgDBname, $wgDebugDumpSql;
$flags = ($wgDebugDumpSql ? DBO_DEBUG : 0) | DBO_DEFAULT; // god-damn hack
- $db =& new Database( $this->backupServer(), $wgDBadminuser, $wgDBadminpassword, $wgDBname, false, $flags );
+ $db = new Database( $this->backupServer(), $wgDBadminuser, $wgDBadminpassword, $wgDBname, false, $flags );
$timeout = 3600 * 24;
$db->query( "SET net_read_timeout=$timeout" );
$db->query( "SET net_write_timeout=$timeout" );
}
/** parsertest is used to do differences */
-$myParserTest =& new ParserTest();
+$myParserTest = new ParserTest();
# Get all references messages and check if they exist in the tested language
$i = 0;
$this->setupGlobals($opts);
- $user =& new User();
+ $user = new User();
$options = ParserOptions::newFromUser( $user );
if (preg_match('/\\bmath\\b/i', $opts)) {
$noxml = (bool)preg_match( '~\\b noxml \\b~x', $opts );
- $parser =& new Parser();
+ $parser = new Parser();
foreach( $this->hooks as $tag => $callback ) {
$parser->setHook( $tag, $callback );
}
# refer to $wgTitle directly, but instead use the title
# passed to it.
$wgTitle = Title::newFromText( 'Parser test script do not use' );
-$tester =& new ParserTest();
+$tester = new ParserTest();
if( isset( $options['file'] ) ) {
$file = $options['file'];
}
function setUp() {
- $this->db =& new Database();
+ $this->db = new Database();
}
function tearDown() {
}
-?>
\ No newline at end of file
+?>
function &buildTestDatabase( $serverType, $tables ) {
global $testOptions, $wgDBprefix;
$wgDBprefix = 'parsertest';
- $db =& new Database(
+ $db = new Database(
$testOptions[$serverType]['server'],
$testOptions[$serverType]['user'],
$testOptions[$serverType]['password'],
if( $this->db ) {
$this->insertSearchData();
}
- $this->search =& new SearchMySQL4( $this->db );
+ $this->search = new SearchMySQL4( $this->db );
}
function tearDown() {
}
-?>
\ No newline at end of file
+?>