aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/SpecialController.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-07-10 22:46:30 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-07-10 22:46:30 +0000
commitbe1d2d6c4c5623c6af59cf72e74e0335d1aa6cb5 (patch)
tree746bf827e4e7845dffad02b39db9185461c710b6 /h-source/Application/Controllers/SpecialController.php
parent878f70432bdfdd12a5c9788cec3d04ed862eafa6 (diff)
improved the way the history messages are shown
Diffstat (limited to 'h-source/Application/Controllers/SpecialController.php')
-rw-r--r--h-source/Application/Controllers/SpecialController.php49
1 files changed, 36 insertions, 13 deletions
diff --git a/h-source/Application/Controllers/SpecialController.php b/h-source/Application/Controllers/SpecialController.php
index 6f17c2c..6ef632a 100644
--- a/h-source/Application/Controllers/SpecialController.php
+++ b/h-source/Application/Controllers/SpecialController.php
@@ -40,17 +40,17 @@ class SpecialController extends BaseController
{
switch ($action)
{
- case 'modifications':
- $data['title'] = 'last modifications - '.Website::$generalName;
-
- $whereClauseArray = array(
- 'gr' => 'registered',
- 'type' => 'hardware',
- );
-
- $viewFile = 'modifications';
-
- break;
+// case 'modifications':
+// $data['title'] = 'last modifications - '.Website::$generalName;
+//
+// $whereClauseArray = array(
+// 'gr' => 'registered',
+// 'type' => 'hardware',
+// );
+//
+// $viewFile = 'modifications';
+//
+// break;
case 'modactions':
$data['title'] = 'last moderations - '.Website::$generalName;
$data['viewTitle'] = 'List of actions carried out by moderators';
@@ -99,7 +99,30 @@ class SpecialController extends BaseController
{
$this->shift(1);
- $this->last($lang = 'en','modifications');
+ $data['title'] = 'last modifications - '.Website::$generalName;
+
+ $whereClauseArray = array(
+ 'gr' => 'registered',
+ 'type' => 'hardware',
+ 'approved' => 'yes',
+ );
+
+ $this->helper('Pages','special/'.$this->action.'/'.$this->lang,'page');
+
+ $this->m['HistoryModel']->clear()->inner('hardware')->on('hardware.id_hard=history.id')->select()->where($whereClauseArray)->orderBy('id_history desc');
+
+ $recordNumber = $this->m['HistoryModel']->rowNumber();
+ $page = $this->viewArgs['page'];
+
+ $this->m['HistoryModel']->limit = $this->h['Pages']->getLimit($page,$recordNumber,30);
+
+ $data['table'] = $this->m['HistoryModel']->send();
+
+ $data['pageList'] = $this->h['Pages']->render($page-5,11);
+
+ $this->append($data);
+ $this->load('modifications');
+ $this->right();
}
public function modactions($lang = 'en')
@@ -122,7 +145,7 @@ class SpecialController extends BaseController
protected function pagelist($lang = 'en', $type)
{
- switch($type)
+ switch ($type)
{
case 'deleted':
$whereArray = array('-deleted'=>'yes','approved'=>'yes');