aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/HistoryController.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-10-04 19:40:28 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-10-04 19:40:28 +0000
commit6feff147f42d74874c4347e5e19f29bf5a568ca7 (patch)
treee9c03002a6293b491a1825bd0619114a1b864c30 /h-source/Application/Controllers/HistoryController.php
parent2f0587286b4e433b96a7db5db60a0dd94617f485 (diff)
moderators can now hide/show issues
Diffstat (limited to 'h-source/Application/Controllers/HistoryController.php')
-rw-r--r--h-source/Application/Controllers/HistoryController.php52
1 files changed, 50 insertions, 2 deletions
diff --git a/h-source/Application/Controllers/HistoryController.php b/h-source/Application/Controllers/HistoryController.php
index 8c14bb0..ad2c7dd 100644
--- a/h-source/Application/Controllers/HistoryController.php
+++ b/h-source/Application/Controllers/HistoryController.php
@@ -34,6 +34,7 @@ class HistoryController extends BaseController
'device' => 'device page',
'device_app' => 'device page',
'device_cl' => 'device page',
+ 'issue_del' => 'issue',
);
public static $actionTable = array(
@@ -51,6 +52,8 @@ class HistoryController extends BaseController
'deviceshow' => 'show',
'deviceapprove' => 'approve',
'deviceclear' => 'perm deleted',
+ 'issuehide' => 'hide',
+ 'issueshow' => 'show',
);
protected $strings = array(
@@ -155,6 +158,26 @@ class HistoryController extends BaseController
),
+ 'issuehide' => array(
+
+ 'action' => 'issuehide',
+ 'check_status' => 'no',
+ 'to_status' => 'yes',
+ 'exec_string' => 'The issue has been hidden. Just reload the page',
+ 'error_string' => 'Error: the issue is already hidden',
+
+ ),
+
+ 'issueshow' => array(
+
+ 'action' => 'issueshow',
+ 'check_status' => 'yes',
+ 'to_status' => 'no',
+ 'exec_string' => 'The issue is no more hidden. Just reload the page',
+ 'error_string' => 'Error: the issue is already visible',
+
+ ),
+
'devicehide' => array(
'action' => 'devicehide',
@@ -212,7 +235,7 @@ class HistoryController extends BaseController
'group' => 'moderator',
),
-
+
'talk' => array(
'clean_type' => 'talk',
@@ -243,6 +266,7 @@ class HistoryController extends BaseController
'field_name' => 'status',
'actions' => array('open','close'),
'group' => 'moderator',
+ 'types_to_show' => 'issue,issue_del',
),
@@ -269,7 +293,7 @@ class HistoryController extends BaseController
),
- //page deleted or not
+ //page hidden or not
'page_del' => array(
'clean_type' => 'page_del',
@@ -281,6 +305,18 @@ class HistoryController extends BaseController
),
+ //issue hidden or not
+ 'issue_del' => array(
+
+ 'clean_type' => 'issue_del',
+ 'model_name' => 'IssuesModel',
+ 'id_name' => 'id_issue',
+ 'field_name' => 'deleted',
+ 'actions' => array('issuehide','issueshow'),
+ 'group' => 'moderator',
+
+ ),
+
//device page blocked or not
'device' => array(
@@ -397,6 +433,16 @@ class HistoryController extends BaseController
{
$this->generic($lang, $token, 'deviceclear');
}
+
+ public function issuehide($lang = 'en', $token = '')
+ {
+ $this->generic($lang, $token, 'issuehide');
+ }
+
+ public function issueshow($lang = 'en', $token = '')
+ {
+ $this->generic($lang, $token, 'issueshow');
+ }
protected function generic($lang = 'en', $token = '', $action = 'hide')
{
@@ -580,6 +626,8 @@ class HistoryController extends BaseController
'deviceshow' => 'restored',
'deviceapprove' => 'approved',
'deviceclear' => 'permanently deleted',
+ 'issuehide' => 'hidden',
+ 'issueshow' => 'restored',
);
$this->append($data);