aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/IssuesController.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-10-13 07:50:44 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-10-13 07:50:44 +0000
commit086b034d3ba202e81e656ce99bb8933089263edf (patch)
treee19a3f5c19ce88720a7360fdf896776bb5eeb5a5 /h-source/Application/Controllers/IssuesController.php
parent9e0955c96d888fc2e00014498d095a7d65ab48fb (diff)
improved history
Diffstat (limited to 'h-source/Application/Controllers/IssuesController.php')
-rw-r--r--h-source/Application/Controllers/IssuesController.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/h-source/Application/Controllers/IssuesController.php b/h-source/Application/Controllers/IssuesController.php
index e69c598..d34e0f8 100644
--- a/h-source/Application/Controllers/IssuesController.php
+++ b/h-source/Application/Controllers/IssuesController.php
@@ -64,11 +64,14 @@ class IssuesController extends BaseController
//set the page to 1 in the viewStatus
$this->viewArgs['page'] = 1;
$this->buildStatus();
+
+ $clean['id_user'] = (int)$this->s['registered']->status['id_user'];
- $this->m['IssuesModel']->values['created_by'] = (int)$this->s['registered']->status['id_user'];
+ $this->m['IssuesModel']->values['created_by'] = $clean['id_user'];
$this->m['IssuesModel']->values['status'] = 'opened';
$this->m['IssuesModel']->values['update_date'] = date('Y-m-d H:i:s');
$this->m['IssuesModel']->updateTable('insert');
+
}
}
@@ -131,15 +134,18 @@ class IssuesController extends BaseController
if (!$this->s['registered']->checkCsrf($this->viewArgs['token'])) $this->redirect('home/index/'.$this->lang,2,'wrong token..');
if ($this->m['UsersModel']->isBlocked($this->s['registered']->status['id_user'])) $this->redirect('my/home/'.$this->lang,2,'your account has been blocked..');
+
+ $clean['id_user'] = (int)$this->s['registered']->status['id_user'];
- $this->m['MessagesModel']->values['created_by'] = (int)$this->s['registered']->status['id_user'];
+ $this->m['MessagesModel']->values['created_by'] = $clean['id_user'];
$this->m['MessagesModel']->values['id_issue'] = $clean['id_issue'];
$this->m['MessagesModel']->updateTable('insert');
-
+
if ($this->m['MessagesModel']->queryResult)
{
$this->m['IssuesModel']->values = array('update_date' => date('Y-m-d H:i:s'));
$this->m['IssuesModel']->update($clean['id_issue']);
+
header('Refresh: 0;url=http://'.DOMAIN_NAME.$_SERVER['REQUEST_URI']);
exit;
}