diff options
Diffstat (limited to 'h-source/Application/Controllers/HistoryController.php')
-rw-r--r-- | h-source/Application/Controllers/HistoryController.php | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/h-source/Application/Controllers/HistoryController.php b/h-source/Application/Controllers/HistoryController.php index 2154a0e..13d3b3a 100644 --- a/h-source/Application/Controllers/HistoryController.php +++ b/h-source/Application/Controllers/HistoryController.php @@ -104,7 +104,26 @@ class HistoryController extends BaseController 'error_string' => 'Error: the wiki page is already un-blocked', ), - + + 'pagehide' => array( + + 'action' => 'pagehide', + 'check_status' => 'no', + 'to_status' => 'yes', + 'exec_string' => 'The wiki page has been hidden. Just reload the page', + 'error_string' => 'Error: the wiki page is already hidden', + + ), + + 'pageshow' => array( + + 'action' => 'pageshow', + 'check_status' => 'yes', + 'to_status' => 'no', + 'exec_string' => 'The wiki page is no more hidden. Just reload the page', + 'error_string' => 'Error: the wiki page is already visible', + + ), ); protected $types = array( @@ -164,6 +183,7 @@ class HistoryController extends BaseController ), + //page blocked or not 'page' => array( 'clean_type' => 'page', @@ -174,6 +194,18 @@ class HistoryController extends BaseController 'group' => 'admin', ), + + //page deleted or not + 'page_del' => array( + + 'clean_type' => 'page_del', + 'model_name' => 'WikiModel', + 'id_name' => 'id_wiki', + 'field_name' => 'deleted', + 'actions' => array('pagehide','pageshow'), + 'group' => 'admin', + + ), ); public function __construct($model, $controller, $queryString) @@ -224,6 +256,16 @@ class HistoryController extends BaseController { $this->generic($lang, $token, 'pageunblock'); } + + public function pagehide($lang = 'en', $token = '') + { + $this->generic($lang, $token, 'pagehide'); + } + + public function pageshow($lang = 'en', $token = '') + { + $this->generic($lang, $token, 'pageshow'); + } protected function generic($lang = 'en', $token = '', $action = 'hide') { @@ -333,6 +375,10 @@ class HistoryController extends BaseController $data['object'] = 'wiki page'; $data['box_class'] = 'details_of_actions_inner_user'; break; + case 'page_del': + $data['object'] = 'wiki page'; + $data['box_class'] = 'details_of_actions_inner_user'; + break; case 'issue': $data['object'] = 'issue'; $data['box_class'] = 'details_of_actions_inner_user'; @@ -354,6 +400,8 @@ class HistoryController extends BaseController 'close' => 'closed', 'pageblock' => 'blocked', 'pageunblock' => 'un-blocked', + 'pagehide' => 'hidden', + 'pageshow' => 'restored', ); $this->append($data); |