Merge "Add MediaWikiTestCase convenience method for mocking a logger"
[lhc/web/wiklou.git] / maintenance / cleanupTitles.php
index 07df1b1..1277e83 100644 (file)
@@ -35,7 +35,7 @@ require_once __DIR__ . '/cleanupTable.inc';
 class TitleCleanup extends TableCleanup {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Script to clean up broken, unparseable titles";
+               $this->addDescription( 'Script to clean up broken, unparseable titles' );
        }
 
        /**
@@ -90,7 +90,7 @@ class TitleCleanup extends TableCleanup {
        protected function moveIllegalPage( $row ) {
                $legal = 'A-Za-z0-9_/\\\\-';
                $legalized = preg_replace_callback( "!([^$legal])!",
-                       array( &$this, 'hexChar' ),
+                       array( $this, 'hexChar' ),
                        $row->page_title );
                if ( $legalized == '.' ) {
                        $legalized = '(dot)';