r94107 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94106‎ | r94107 | r94108 >
Date:13:59, 9 August 2011
Author:demon
Status:resolved (Comments)
Tags:
Comment:
(bug 30264) MediaWiki installer uses require, de facto is require_once
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/includes/installer/LocalSettingsGenerator.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -38,6 +38,8 @@
3939 div#bodyContent.
4040 * (bug 30172) The check for posix_isatty() in maintenance scripts did not detect
4141 when the function exists but is disabled. Introduced Maintenance::posix_isatty()
 42+* (bug 30264) Changed installer-generated LocalSettings.php to use require_once()
 43+ instead require() for included extensions.
4244
4345 === API changes in 1.19 ===
4446 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
Index: trunk/phase3/includes/installer/LocalSettingsGenerator.php
@@ -129,7 +129,7 @@
130130
131131 foreach( $this->extensions as $extName ) {
132132 $encExtName = self::escapePhpString( $extName );
133 - $localSettings .= "require( \"extensions/$encExtName/$encExtName.php\" );\n";
 133+ $localSettings .= "require_once( \"extensions/$encExtName/$encExtName.php\" );\n";
134134 }
135135 }
136136

Follow-up revisions

RevisionCommit summaryAuthorDate
r95812Prefix extensions with $IP. Followup r94107 (grumble grumble about people fix...demon20:53, 30 August 2011
r96088MFT to REL1_18...hashar10:53, 2 September 2011
r96559MFT r92422, r93520, r93563, r94107, r94433, r95042, r95332, r95451, r96386...reedy12:49, 8 September 2011

Comments

#Comment by Krinkle (talk | contribs)   20:47, 14 August 2011

Shouldn't we prefix $IP as well ? Seems to be the standard in most documentations (for when LocalSettings is spread over multiple files, such as on wmf or prototype)

#Comment by 😂 (talk | contribs)   20:47, 14 August 2011

Yeah, actually. Plus we can't assume $IP is in the include_path.

#Comment by Hashar (talk | contribs)   11:23, 27 August 2011

Since it needs $IP prefixing, marking 'fixme'

#Comment by Hashar (talk | contribs)   10:36, 2 September 2011

Merging in 1.18. I am not sure the 1.19 release note will still be needed.

Status & tagging log