r55158 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55157‎ | r55158 | r55159 >
Date:21:48, 16 August 2009
Author:emufarmers
Status:resolved
Tags:
Comment:
Fix compatibility with PHP 5.2.x and below:
Explicitly qualify the class name for preg_replace_callback() instead of using self::
Modified paths:
  • /branches/new-installer/phase3/includes/installer/WebInstaller.php (modified) (history)

Diff [purge]

Index: branches/new-installer/phase3/includes/installer/WebInstaller.php
@@ -1431,8 +1431,8 @@
14321432 function getFileName() { return 'RELEASE-NOTES'; }
14331433 function getFileContents() {
14341434 $text = parent::getFileContents();
1435 - $text = preg_replace_callback('/\(bug (\d+)\)/', 'self::replaceBugLinks', $text );
1436 - $text = preg_replace_callback('/(\$wg[a-z0-9_]+)/i', 'self::replaceConfigLinks', $text );
 1435+ $text = preg_replace_callback('/\(bug (\d+)\)/', 'WebInstaller_ReleaseNotes::replaceBugLinks', $text );
 1436+ $text = preg_replace_callback('/(\$wg[a-z0-9_]+)/i', 'WebInstaller_ReleaseNotes::replaceConfigLinks', $text );
14371437 return $text;
14381438 }
14391439 private static function replaceBugLinks( $matches ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r55160Followup to r55158: Use an ever sillier syntax for compatibility with PHP 5.2...emufarmers01:27, 17 August 2009

Status & tagging log