aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-02-18 11:21:43 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-02-18 11:21:43 +0000
commit084c6123f0a0fbf05ed4c0d776f05e084d9ecc58 (patch)
treeaa95ae4443ac1ccf168a7cb241f45ba2308a5188 /h-source/Application
parenta855ea347f8668cefb04360b2d7158d8939e07ac (diff)
added new EasyGiant library
Diffstat (limited to 'h-source/Application')
-rw-r--r--h-source/Application/Models/HardwareModel.php9
-rw-r--r--h-source/Application/Models/WikiModel.php11
2 files changed, 16 insertions, 4 deletions
diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php
index 17565ff..7df7a65 100644
--- a/h-source/Application/Models/HardwareModel.php
+++ b/h-source/Application/Models/HardwareModel.php
@@ -119,6 +119,8 @@ class HardwareModel extends Model_Map {
$revisions = new RevisionsModel();
$revisions->values = $oldValues;
+ $revisions->sanitize();
+
if ($revisions->insert())
{
parent::update($clean['id']);
@@ -162,11 +164,14 @@ class HardwareModel extends Model_Map {
if (count($newStruct > 0))
{
$revisions->values = $oldStruct[0]['hardware'];
-
+ $revisions->sanitize();
+
$this->values = $newStruct[0]['revisions'];
$this->values['updated_by'] = (int)$this->id_user;
$this->values['update_date'] = date('Y-m-d H:i:s');
-
+
+ $this->sanitize();
+
if ($revisions->insert())
{
if (parent::update($clean['id_hard']))
diff --git a/h-source/Application/Models/WikiModel.php b/h-source/Application/Models/WikiModel.php
index 3e768d3..3e2a4a9 100644
--- a/h-source/Application/Models/WikiModel.php
+++ b/h-source/Application/Models/WikiModel.php
@@ -98,7 +98,7 @@ class WikiModel extends Model_Map {
$this->lastId = $clean['id'];
$this->lastTitle = $resId[0]['wiki']['title'];
$this->lastTitleClean = titleForRedirect($resId[0]['wiki']['title']);
- $this->db->update('wiki','title_clean',array(encodeUrl($resId[0]['wiki']['title'])),'id_wiki='.$clean['id']);
+ $this->db->update('wiki','title_clean',array(encodeUrl(sanitizeDb($resId[0]['wiki']['title']))),'id_wiki='.$clean['id']);
//update the history table
$this->updateHistory('insert');
@@ -126,6 +126,9 @@ class WikiModel extends Model_Map {
$revisions = new WikirevisionsModel();
$revisions->values = $oldValues;
+
+ $revisions->sanitize();
+
if ($revisions->insert())
{
@@ -156,6 +159,7 @@ class WikiModel extends Model_Map {
public function makeCurrent($id_rev)
{
+
$clean['id_rev'] = (int)$id_rev;
$revisions = new WikirevisionsModel();
@@ -175,11 +179,14 @@ class WikiModel extends Model_Map {
if (count($newStruct > 0))
{
$revisions->values = $oldStruct[0]['wiki'];
-
+ $revisions->sanitize();
+
$this->values = $newStruct[0]['wiki_revisions'];
$this->values['created_by'] = (int)$this->id_user;
$this->values['update_date'] = date('Y-m-d H:i:s');
+ $this->sanitize();
+
if ($this->isMain($clean['id_wiki']))
{
$this->values['title'] = 'Main Page';