From f9027385035d8f68ce363e3a17c3a9489934b359 Mon Sep 17 00:00:00 2001 From: addshore Date: Thu, 7 Aug 2014 01:24:45 +0100 Subject: [PATCH] Split UnprotectAction into own file Change-Id: Ibde9dca89631522a25e2f0eef2790c2654a2bbd9 --- includes/AutoLoader.php | 2 +- includes/actions/ProtectAction.php | 18 ------------ includes/actions/UnprotectAction.php | 43 ++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 19 deletions(-) create mode 100644 includes/actions/UnprotectAction.php 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 -- 2.20.1