Index: trunk/extensions/ExtensionDistributor/ExtensionDistributor_body.php |
— | — | @@ -227,9 +227,12 @@ |
228 | 228 | // Does the tar file need ExtensionFunctions.php? |
229 | 229 | $dir = "$wgExtDistWorkingCopy/$version/extensions/$extension"; |
230 | 230 | $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 | + } |
234 | 237 | |
235 | 238 | // Create the archive. |
236 | 239 | $cmd = 'tar -czf ' . wfEscapeShellArg( $tarFile ) . |