aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Models
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Models')
-rw-r--r--h-source/Application/Models/IssuesModel.php4
-rw-r--r--h-source/Application/Models/MessagesModel.php5
-rw-r--r--h-source/Application/Models/TalkModel.php5
-rwxr-xr-xh-source/Application/Models/UsersModel.php5
-rw-r--r--h-source/Application/Models/WikiModel.php38
-rw-r--r--h-source/Application/Models/WikitalkModel.php5
6 files changed, 61 insertions, 1 deletions
diff --git a/h-source/Application/Models/IssuesModel.php b/h-source/Application/Models/IssuesModel.php
index 4593bea..eec86be 100644
--- a/h-source/Application/Models/IssuesModel.php
+++ b/h-source/Application/Models/IssuesModel.php
@@ -99,4 +99,8 @@ class IssuesModel extends Model_Tree {
parent::__construct();
}
+ public function pUpdate($id)
+ {
+ return parent::update($id);
+ }
} \ No newline at end of file
diff --git a/h-source/Application/Models/MessagesModel.php b/h-source/Application/Models/MessagesModel.php
index 2417739..989facc 100644
--- a/h-source/Application/Models/MessagesModel.php
+++ b/h-source/Application/Models/MessagesModel.php
@@ -45,6 +45,11 @@ class MessagesModel extends Model_Tree {
parent::__construct();
}
+ public function pUpdate($id)
+ {
+ return parent::update($id);
+ }
+
public $formStruct = array(
'entries' => array(
'deleted' => array('type'=>'Select','options'=>'no,yes'),
diff --git a/h-source/Application/Models/TalkModel.php b/h-source/Application/Models/TalkModel.php
index e29e073..b98a5a4 100644
--- a/h-source/Application/Models/TalkModel.php
+++ b/h-source/Application/Models/TalkModel.php
@@ -43,6 +43,11 @@ class TalkModel extends Model_Tree {
parent::__construct();
}
+ public function pUpdate($id)
+ {
+ return parent::update($id);
+ }
+
public function insert()
{
if (parent::insert())
diff --git a/h-source/Application/Models/UsersModel.php b/h-source/Application/Models/UsersModel.php
index fe72ce7..d4ef745 100755
--- a/h-source/Application/Models/UsersModel.php
+++ b/h-source/Application/Models/UsersModel.php
@@ -59,6 +59,11 @@ class UsersModel extends Model_Map
$this->deleteNotRegistered();
}
+ public function pUpdate($id)
+ {
+ return parent::update($id);
+ }
+
public function deleteNotRegistered()
{
$limit = time() - Account::$confirmTime;
diff --git a/h-source/Application/Models/WikiModel.php b/h-source/Application/Models/WikiModel.php
index 0a00bfb..6cdc632 100644
--- a/h-source/Application/Models/WikiModel.php
+++ b/h-source/Application/Models/WikiModel.php
@@ -37,7 +37,9 @@ class WikiModel extends Model_Map {
'username' => 'regusers',
'id_user' => 'regusers',
'has_confirmed' => 'regusers',
- 'deleted' => 'regusers'
+ 'deleted' => 'regusers',
+ '-deleted' => 'wiki',
+ '-blocked' => 'wiki',
);
$this->printAssError = "no";
@@ -70,6 +72,11 @@ class WikiModel extends Model_Map {
parent::__construct();
}
+ public function pUpdate($id)
+ {
+ return parent::update($id);
+ }
+
public function insert()
{
$this->values['created_by'] = (int)$this->id_user;
@@ -254,6 +261,35 @@ class WikiModel extends Model_Map {
return false;
}
+ public function isDeleted($id)
+ {
+ $clean['id'] = (int)$id;
+ $res = $this->select('wiki.deleted')->where(array('id_wiki'=>$clean['id']))->send();
+ if ( count($res) > 0 )
+ {
+ return $res[0]['wiki']['deleted'];
+ }
+ return 'no';
+ }
+
+ public function isBlocked($id)
+ {
+ $clean['id'] = (int)$id;
+ $res = $this->select('blocked')->where(array('id_wiki'=>$clean['id']))->send();
+ if ( count($res) > 0 )
+ {
+ return strcmp($res[0]['wiki']['blocked'],'no') === 0 ? false : true;
+ }
+ return false;
+ }
+
+ public function toWikiPage($id)
+ {
+ $clean['id'] = (int)$id;
+ $title = $this->getTheModelName($clean['id']);
+ return "http://".DOMAIN_NAME."/wiki/page/".Lang::$current."/".encodeUrl($title);
+ }
+
public function getDiffArray($oldArray, $newArray)
{
return getDiffArray($this->diffFields, $oldArray, $newArray);
diff --git a/h-source/Application/Models/WikitalkModel.php b/h-source/Application/Models/WikitalkModel.php
index 608fbae..3bff3d3 100644
--- a/h-source/Application/Models/WikitalkModel.php
+++ b/h-source/Application/Models/WikitalkModel.php
@@ -37,6 +37,11 @@ class WikitalkModel extends Model_Tree
parent::__construct();
}
+ public function pUpdate($id)
+ {
+ return parent::update($id);
+ }
+
public $formStruct = array(
'entries' => array(
'title' => array(),