adjust method comment for Ia19f1011
[lhc/web/wiklou.git] / maintenance / cleanupImages.php
index 581ff2d..687a95c 100644 (file)
@@ -173,7 +173,7 @@ class ImageCleanup extends TableCleanup {
                        if ( !file_exists( $dir ) ) {
                                if ( !wfMkdirParents( $dir, null, __METHOD__ ) ) {
                                        $this->output( "RENAME FAILED, COULD NOT CREATE $dir" );
-                                       $db->rollback();
+                                       $db->rollback( __METHOD__ );
                                        return;
                                }
                        }
@@ -192,9 +192,8 @@ class ImageCleanup extends TableCleanup {
        }
 
        private function buildSafeTitle( $name ) {
-               global $wgLegalTitleChars;
                $x = preg_replace_callback(
-                       "/([^$wgLegalTitleChars]|~)/",
+                       '/([^' . Title::legalChars() . ']|~)/',
                        array( $this, 'hexChar' ),
                        $name );