Index: branches/wmf-deployment/includes/ImagePage.php |
— | — | @@ -720,6 +720,13 @@ |
721 | 721 | * Delete the file, or an earlier version of it |
722 | 722 | */ |
723 | 723 | public function delete() { |
| 724 | + global $wgUploadMaintenance; |
| 725 | + if( $wgUploadMaintenance && $this->mTitle && $this->mTitle->getNamespace() == NS_FILE ) { |
| 726 | + global $wgOut; |
| 727 | + $wgOut->addWikiText('Deletion and restoration of images temporarily disabled during maintenance.' ); |
| 728 | + return; |
| 729 | + } |
| 730 | + |
724 | 731 | $this->loadFile(); |
725 | 732 | if( !$this->img->exists() || !$this->img->isLocal() || $this->img->getRedirected() ) { |
726 | 733 | // Standard article deletion |
Index: branches/wmf-deployment/includes/DefaultSettings.php |
— | — | @@ -3863,3 +3863,6 @@ |
3864 | 3864 | * modify the user rights of those users via Special:UserRights |
3865 | 3865 | */ |
3866 | 3866 | $wgUserrightsInterwikiDelimiter = '@'; |
| 3867 | + |
| 3868 | +// to disable image delete/restore temporarily |
| 3869 | +$wgUploadMaintenance = false; |
Index: branches/wmf-deployment/includes/specials/SpecialUndelete.php |
— | — | @@ -633,6 +633,11 @@ |
634 | 634 | } |
635 | 635 | } |
636 | 636 | if( $this->mRestore && $this->mAction == "submit" ) { |
| 637 | + global $wgUploadMaintenance; |
| 638 | + if( $wgUploadMaintenance && $this->mTargetObj && $this->mTargetObj->getNamespace() == NS_FILE ) { |
| 639 | + $wgOut->addWikiText('Deletion and restoration of images temporarily disabled during maintenance.' ); |
| 640 | + return; |
| 641 | + } |
637 | 642 | return $this->undelete(); |
638 | 643 | } |
639 | 644 | if( $this->mInvert && $this->mAction == "submit" ) { |