Add 'whatlinkshere-filters'
[lhc/web/wiklou.git] / maintenance / eval.php
old mode 100755 (executable)
new mode 100644 (file)
index 4e477f4..1545c30
  * To get decent line editing behavior, you should compile PHP with support
  * for GNU readline (pass --with-readline to configure).
  *
- * @package MediaWiki
- * @subpackage Maintenance
+ * @addtogroup Maintenance
  */
 
-$wgForceLoadBalancing = (getenv('MW_BALANCE') ? true : false);
-$wgUseNormalUser = (getenv('MW_WIKIUSER') ? true : false);
-if (getenv('MW_PROFILING')) {
-       define('MW_CMDLINE_CALLBACK', 'wfSetProfiling');
-}
-function wfSetProfiling() { $GLOBALS['wgProfiling'] = true; }
+$wgUseNormalUser = (bool)getenv('MW_WIKIUSER');
 
 $optionsWithArgs = array( 'd' );
 
@@ -34,8 +28,9 @@ if ( isset( $options['d'] ) ) {
                $wgDebugLogFile = '/dev/stdout';
        }
        if ( $d > 1 ) {
-               foreach ( $wgLoadBalancer->mServers as $i => $server ) {
-                       $wgLoadBalancer->mServers[$i]['flags'] |= DBO_DEBUG;
+               $lb = wfGetLB();
+               foreach ( $lb->mServers as $i => $server ) {
+                       $lb->mServers[$i]['flags'] |= DBO_DEBUG;
                }
        }
        if ( $d > 2 ) {
@@ -60,4 +55,4 @@ while ( ( $line = readconsole( '> ' ) ) !== false ) {
 
 print "\n";
 
-?>
+