Index: trunk/phase3/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: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -4222,3 +4222,6 @@ |
4223 | 4223 | * Note that this requires JS2 and the script loader. |
4224 | 4224 | */ |
4225 | 4225 | $wgUseAJAXCategories = false; |
| 4226 | + |
| 4227 | +// to disable image delete/restore temporarily |
| 4228 | +$wgUploadMaintenance = false; |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -646,6 +646,11 @@ |
647 | 647 | } |
648 | 648 | } |
649 | 649 | if( $this->mRestore && $this->mAction == "submit" ) { |
| 650 | + global $wgUploadMaintenance; |
| 651 | + if( $wgUploadMaintenance && $this->mTargetObj && $this->mTargetObj->getNamespace() == NS_FILE ) { |
| 652 | + $wgOut->addWikiText('Deletion and restoration of images temporarily disabled during maintenance.' ); |
| 653 | + return; |
| 654 | + } |
650 | 655 | return $this->undelete(); |
651 | 656 | } |
652 | 657 | if( $this->mInvert && $this->mAction == "submit" ) { |