diff options
Diffstat (limited to 'h-source/Application/Models')
-rw-r--r-- | h-source/Application/Models/IssuesModel.php | 12 | ||||
-rw-r--r-- | h-source/Application/Models/MessagesModel.php | 11 | ||||
-rw-r--r-- | h-source/Application/Models/TalkModel.php | 7 | ||||
-rw-r--r-- | h-source/Application/Models/WikitalkModel.php | 11 |
4 files changed, 36 insertions, 5 deletions
diff --git a/h-source/Application/Models/IssuesModel.php b/h-source/Application/Models/IssuesModel.php index eec86be..9d6a4ef 100644 --- a/h-source/Application/Models/IssuesModel.php +++ b/h-source/Application/Models/IssuesModel.php @@ -20,7 +20,7 @@ if (!defined('EG')) die('Direct access not allowed!'); -class IssuesModel extends Model_Tree { +class IssuesModel extends BaseModel { public function __construct() { $this->_tables = 'issues'; @@ -103,4 +103,14 @@ class IssuesModel extends Model_Tree { { return parent::update($id); } + + public function insert() + { + if (parent::insert()) + { + //update the history + $this->updateHistory('issue_ins'); + } + } + }
\ No newline at end of file diff --git a/h-source/Application/Models/MessagesModel.php b/h-source/Application/Models/MessagesModel.php index 989facc..b36e76e 100644 --- a/h-source/Application/Models/MessagesModel.php +++ b/h-source/Application/Models/MessagesModel.php @@ -20,7 +20,7 @@ if (!defined('EG')) die('Direct access not allowed!'); -class MessagesModel extends Model_Tree { +class MessagesModel extends BaseModel { public function __construct() { $this->_tables = 'messages'; @@ -49,6 +49,15 @@ class MessagesModel extends Model_Tree { { return parent::update($id); } + + public function insert() + { + if (parent::insert()) + { + //update the history + $this->updateHistory('message_ins'); + } + } public $formStruct = array( 'entries' => array( diff --git a/h-source/Application/Models/TalkModel.php b/h-source/Application/Models/TalkModel.php index b98a5a4..0edcdda 100644 --- a/h-source/Application/Models/TalkModel.php +++ b/h-source/Application/Models/TalkModel.php @@ -20,7 +20,7 @@ if (!defined('EG')) die('Direct access not allowed!'); -class TalkModel extends Model_Tree { +class TalkModel extends BaseModel { public function __construct() { $this->_tables = 'talk'; @@ -52,11 +52,14 @@ class TalkModel extends Model_Tree { { if (parent::insert()) { + //update the history + $this->updateHistory('talk_ins'); + if (strcmp($this->values['id_hard'],0) !== 0) { $clean['id_hard'] = (int)$this->values['id_hard']; $clean['created_by'] = (int)$this->values['created_by']; - + $hard = new HardwareModel(); $users = $hard->select('username,e_mail') ->where(array('id_hard'=>$clean['id_hard'],'has_confirmed'=>0,'deleted'=>'no')) diff --git a/h-source/Application/Models/WikitalkModel.php b/h-source/Application/Models/WikitalkModel.php index 3bff3d3..2595a1a 100644 --- a/h-source/Application/Models/WikitalkModel.php +++ b/h-source/Application/Models/WikitalkModel.php @@ -20,7 +20,7 @@ if (!defined('EG')) die('Direct access not allowed!'); -class WikitalkModel extends Model_Tree +class WikitalkModel extends BaseModel { public function __construct() { @@ -41,6 +41,15 @@ class WikitalkModel extends Model_Tree { return parent::update($id); } + + public function insert() + { + if (parent::insert()) + { + //update the history + $this->updateHistory('wiki_talk_ins'); + } + } public $formStruct = array( 'entries' => array( |