From: addshore Date: Thu, 7 Aug 2014 00:24:45 +0000 (+0100) Subject: Split UnprotectAction into own file X-Git-Tag: 1.31.0-rc.0~14549 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=f9027385035d8f68ce363e3a17c3a9489934b359;p=lhc%2Fweb%2Fwiklou.git Split UnprotectAction into own file Change-Id: Ibde9dca89631522a25e2f0eef2790c2654a2bbd9 --- diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 083a59690f..d7dda6f4bb 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -216,7 +216,7 @@ $wgAutoloadLocalClasses = array( 'RevisiondeleteAction' => 'includes/actions/RevisiondeleteAction.php', 'RollbackAction' => 'includes/actions/RollbackAction.php', 'SubmitAction' => 'includes/actions/EditAction.php', - 'UnprotectAction' => 'includes/actions/ProtectAction.php', + 'UnprotectAction' => 'includes/actions/UnprotectAction.php', 'UnwatchAction' => 'includes/actions/WatchAction.php', 'ViewAction' => 'includes/actions/ViewAction.php', 'WatchAction' => 'includes/actions/WatchAction.php', diff --git a/includes/actions/ProtectAction.php b/includes/actions/ProtectAction.php index 8b2bfaa983..2c2b4709f5 100644 --- a/includes/actions/ProtectAction.php +++ b/includes/actions/ProtectAction.php @@ -46,21 +46,3 @@ class ProtectAction extends FormlessAction { } } -/** - * Handle page unprotection - * - * This is a wrapper that will call Article::unprotect(). - * - * @ingroup Actions - */ -class UnprotectAction extends ProtectAction { - - public function getName() { - return 'unprotect'; - } - - public function show() { - - $this->page->unprotect(); - } -} diff --git a/includes/actions/UnprotectAction.php b/includes/actions/UnprotectAction.php new file mode 100644 index 0000000000..6234aba4b0 --- /dev/null +++ b/includes/actions/UnprotectAction.php @@ -0,0 +1,43 @@ +page->unprotect(); + } +} \ No newline at end of file