Apparently for certain (API) requests $this->getTitle() doesn't return a valid Title.
[lhc/web/wiklou.git] / maintenance / deleteArchivedFiles.inc
index 792ee6c..33da666 100644 (file)
@@ -42,16 +42,20 @@ class DeleteArchivedFilesImplementation {
                        $group = $row->fa_storage_group;
                        $id = $row->fa_id;
                        $path = $repo->getZonePath( 'deleted' ) . '/' . $repo->getDeletedHashPath( $key ) . $key;
-                       if( isset( $row->fa_sha1 ) ) {
+                       if ( isset( $row->fa_sha1 ) ) {
                                $sha1 = $row->fa_sha1;
                        } else {
                                // old row, populate from key
                                $sha1 = LocalRepo::getHashFromKey( $key );
                        }
                        // Check if the file is used anywhere...
-                       $inuse = $dbw->selectField( 'oldimage', '1',
-                               array( 'oi_sha1' => $sha1,
-                               'oi_deleted & ' . File::DELETED_FILE => File::DELETED_FILE ),
+                       $inuse = $dbw->selectField(
+                               'oldimage',
+                               '1',
+                               array(
+                                       'oi_sha1' => $sha1,
+                                       'oi_deleted & ' . File::DELETED_FILE => File::DELETED_FILE
+                               ),
                                __METHOD__,
                                array( 'FOR UPDATE' )
                        );