https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113367
Revision: 113367
Author: reedy
Date: 2012-03-08 16:33:04 +0000 (Thu, 08 Mar 2012)
Log Message:
-----------
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: trunk/extensions/ExtensionDistributor/ExtensionDistributor_body.php
===================================================================
--- trunk/extensions/ExtensionDistributor/ExtensionDistributor_body.php
2012-03-08 14:24:04 UTC (rev 113366)
+++ trunk/extensions/ExtensionDistributor/ExtensionDistributor_body.php
2012-03-08 16:33:04 UTC (rev 113367)
@@ -227,9 +227,12 @@
// Does the tar file need ExtensionFunctions.php?
$dir =
"$wgExtDistWorkingCopy/$version/extensions/$extension";
$retval = - 1;
- $files = call_user_func_array( 'wfEscapeShellArg',
glob( "$dir/*.php" ) );
- wfShellExec( "grep -q '\bExtensionFunctions' " .
$files, $retval );
- $needEF = !$retval;
+ $needEF = false;
+ if ( file_exists( 'ExtensionFunctions.php' ) ) {
+ $files = call_user_func_array(
'wfEscapeShellArg', glob( "$dir/*.php" ) );
+ wfShellExec( "grep -q '\bExtensionFunctions' "
. $files, $retval );
+ $needEF = !$retval;
+ }
// Create the archive.
$cmd = 'tar -czf ' . wfEscapeShellArg( $tarFile ) .
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs