Change require to require_once in commandLine.inc
Make eval.php require an absolute path rather than just one in itself
Simplify if statement
}
/**
- * Creates and formats the creidts for a single extension and returns this.
+ * Creates and formats the credits for a single extension and returns this.
*
* @param $extension Array
*
* @ingroup Maintenance
*/
-require( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
global $optionsWithArgs;
if ( !isset( $optionsWithArgs ) ) {
$optionsWithArgs = array( 'd' );
/** */
-require_once( "commandLine.inc" );
+require_once( dirname( __FILE__ ) . "/commandLine.inc" );
if ( isset( $options['d'] ) ) {
$d = $options['d'];
}
}
-if ( function_exists( 'readline_add_history' )
- && Maintenance::posix_isatty( 0 /*STDIN*/ ) )
-{
- $useReadline = true;
-} else {
- $useReadline = false;
-}
+$useReadline = function_exists( 'readline_add_history' )
+ && Maintenance::posix_isatty( 0 /*STDIN*/ );
if ( $useReadline ) {
$historyFile = isset( $_ENV['HOME'] ) ?