aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/SpecialController.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-07-10 20:27:11 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-07-10 20:27:11 +0000
commit82d1fce1124a497dc1b78cf88dbc29e2eb1f6ae5 (patch)
tree4fdbc2b52e74d4d4f8f706190d889b299174293f /h-source/Application/Controllers/SpecialController.php
parent51e075bda53a612cdd793c4ca3d082323c1bd479 (diff)
administrators can now see the list of pages that have to be approved
Diffstat (limited to 'h-source/Application/Controllers/SpecialController.php')
-rw-r--r--h-source/Application/Controllers/SpecialController.php38
1 files changed, 32 insertions, 6 deletions
diff --git a/h-source/Application/Controllers/SpecialController.php b/h-source/Application/Controllers/SpecialController.php
index 1f13b69..6f17c2c 100644
--- a/h-source/Application/Controllers/SpecialController.php
+++ b/h-source/Application/Controllers/SpecialController.php
@@ -120,15 +120,23 @@ class SpecialController extends BaseController
$this->last($lang = 'en','adminactions');
}
- public function deleted($lang = 'en')
+ protected function pagelist($lang = 'en', $type)
{
- $this->shift(1);
-
- $this->s['registered']->check('admin');
-
+ switch($type)
+ {
+ case 'deleted':
+ $whereArray = array('-deleted'=>'yes','approved'=>'yes');
+ $data['titleString'] = 'hidden device pages';
+ break;
+ case 'notapproved':
+ $whereArray = array('approved'=>'no');
+ $data['titleString'] = 'Device pages that have to be approved';
+ break;
+ }
+
$this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page');
- $this->m['HardwareModel']->clear()->select()->where(array('-deleted'=>'yes'))->orderBy('id_hard desc');
+ $this->m['HardwareModel']->clear()->select()->where($whereArray)->orderBy('id_hard desc');
$recordNumber = $this->m['HardwareModel']->rowNumber();
$page = $this->viewArgs['page'];
@@ -144,4 +152,22 @@ class SpecialController extends BaseController
$this->right();
}
+ public function deleted($lang = 'en')
+ {
+ $this->shift(1);
+
+ $this->s['registered']->check('admin');
+
+ $this->pagelist($lang,'deleted');
+ }
+
+ public function notapproved($lang = 'en')
+ {
+ $this->shift(1);
+
+ $this->s['registered']->check('admin');
+
+ $this->pagelist($lang,'notapproved');
+ }
+
} \ No newline at end of file