r113367 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113366‎ | r113367 | r113368 >
Date:16:33, 8 March 2012
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Bug 27246 - Downloading trunk version of ExtensionDistributor gives error

Only attempt to include ExtensionFunctions.php if it exists in this extension source tree AND it's used!
Modified paths:
  • /trunk/extensions/ExtensionDistributor/ExtensionDistributor_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ExtensionDistributor/ExtensionDistributor_body.php
@@ -227,9 +227,12 @@
228228 // Does the tar file need ExtensionFunctions.php?
229229 $dir = "$wgExtDistWorkingCopy/$version/extensions/$extension";
230230 $retval = - 1;
231 - $files = call_user_func_array( 'wfEscapeShellArg', glob( "$dir/*.php" ) );
232 - wfShellExec( "grep -q '\bExtensionFunctions' " . $files, $retval );
233 - $needEF = !$retval;
 231+ $needEF = false;
 232+ if ( file_exists( 'ExtensionFunctions.php' ) ) {
 233+ $files = call_user_func_array( 'wfEscapeShellArg', glob( "$dir/*.php" ) );
 234+ wfShellExec( "grep -q '\bExtensionFunctions' " . $files, $retval );
 235+ $needEF = !$retval;
 236+ }
234237
235238 // Create the archive.
236239 $cmd = 'tar -czf ' . wfEscapeShellArg( $tarFile ) .

Follow-up revisions

RevisionCommit summaryAuthorDate
r113368MFT r113367reedy16:34, 8 March 2012

Comments

#Comment by 😂 (talk | contribs)   17:23, 8 March 2012

It makes me sad that we're still dealing with this vestigial file :(

Status & tagging log