Don't check namespace in SpecialWantedtemplates
[lhc/web/wiklou.git] / maintenance / importImages.php
index 3dd4a9e..ad385e5 100644 (file)
@@ -88,23 +88,23 @@ if ( isset( $options['check-userblock'] ) ) {
 }
 
 # Get --from
-wfSuppressWarnings();
+MediaWiki\suppressWarnings();
 $from = $options['from'];
-wfRestoreWarnings();
+MediaWiki\restoreWarnings();
 
 # Get sleep time.
-wfSuppressWarnings();
+MediaWiki\suppressWarnings();
 $sleep = $options['sleep'];
-wfRestoreWarnings();
+MediaWiki\restoreWarnings();
 
 if ( $sleep ) {
        $sleep = (int)$sleep;
 }
 
 # Get limit number
-wfSuppressWarnings();
+MediaWiki\suppressWarnings();
 $limit = $options['limit'];
-wfRestoreWarnings();
+MediaWiki\restoreWarnings();
 
 if ( $limit ) {
        $limit = (int)$limit;
@@ -177,7 +177,7 @@ if ( $count > 0 ) {
                        if ( isset( $options['skip-dupes'] ) ) {
                                $repo = $image->getRepo();
                                # XXX: we end up calculating this again when actually uploading. that sucks.
-                               $sha1 = File::sha1Base36( $file );
+                               $sha1 = FSFile::getSha1Base36FromPath( $file );
 
                                $dupes = $repo->findBySha1( $sha1 );