allow localization of elements via data-msg-text and data-msg-html
[lhc/web/wiklou.git] / maintenance / eval.php
index 33c9a5d..3bd164f 100644 (file)
  * @ingroup Maintenance
  */
 
-$wgUseNormalUser = (bool)getenv( 'MW_WIKIUSER' );
-
 $optionsWithArgs = array( 'd' );
 
 /** */
-require_once( "commandLine.inc" );
+require_once( dirname( __FILE__ ) . "/commandLine.inc" );
 
 if ( isset( $options['d'] ) ) {
        $d = $options['d'];
@@ -57,13 +55,8 @@ if ( isset( $options['d'] ) ) {
        }
 }
 
-if ( function_exists( 'readline_add_history' )
-       && 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'] ) ?