From dcbc21e9680c54adc831b71cd1d22d3e680e03b0 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Mon, 13 Jun 2011 15:25:33 +0000 Subject: administrators can now see the list of hidden pages --- .../Application/Controllers/SpecialController.php | 29 ++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'h-source/Application/Controllers') diff --git a/h-source/Application/Controllers/SpecialController.php b/h-source/Application/Controllers/SpecialController.php index 86ac9b9..1f13b69 100644 --- a/h-source/Application/Controllers/SpecialController.php +++ b/h-source/Application/Controllers/SpecialController.php @@ -28,7 +28,8 @@ class SpecialController extends BaseController parent::__construct($model, $controller, $queryString); $this->model('HistoryModel'); - + $this->model('HardwareModel'); + $data['title'] = gtext('last modifications').' - '.Website::$generalName; $this->append($data); @@ -76,7 +77,7 @@ class SpecialController extends BaseController break; } - $this->helper('Pages','last/'.$this->action.'/'.$this->lang,'page'); + $this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page'); $this->m['HistoryModel']->clear()->select()->where($whereClauseArray)->orderBy('id_history desc'); @@ -119,4 +120,28 @@ class SpecialController extends BaseController $this->last($lang = 'en','adminactions'); } + public function deleted($lang = 'en') + { + $this->shift(1); + + $this->s['registered']->check('admin'); + + $this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page'); + + $this->m['HardwareModel']->clear()->select()->where(array('-deleted'=>'yes'))->orderBy('id_hard desc'); + + $recordNumber = $this->m['HardwareModel']->rowNumber(); + $page = $this->viewArgs['page']; + + $this->m['HardwareModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,30); + + $data['table'] = $this->m['HardwareModel']->send(); + + $data['pageList'] = $this->h['Pages']->render($page-5,11); + + $this->append($data); + $this->load('pages_deleted'); + $this->right(); + } + } \ No newline at end of file -- cgit v1.2.3