diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-16 18:15:20 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-16 18:15:20 +0000 |
commit | c91a070738a9e46008209c4afe596ff56cfaa777 (patch) | |
tree | e1e996423b9d73a9e09e0c024bf464f349c83876 /h-source/Application/Controllers/HistoryController.php | |
parent | 4a27b517fc52dde60e5c1837860e4785317490a6 (diff) |
improved wiki
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); |