aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/sys
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2012-01-11 15:42:17 +0100
committerKevin Chabowski <kevin@kch42.de>2012-01-11 15:42:17 +0100
commit795d7745e890474b8870130dde0a4f9792562a16 (patch)
treec1bbaccb6fc5316a409928f58396dcde0fa99e77 /ratatoeskr/sys
parent2ca197660ddd97b504a505bdab5f80bd1a5c14de (diff)
downloadratatoeskr-cms-795d7745e890474b8870130dde0a4f9792562a16.tar.gz
ratatoeskr-cms-795d7745e890474b8870130dde0a4f9792562a16.tar.bz2
ratatoeskr-cms-795d7745e890474b8870130dde0a4f9792562a16.zip
Comments model fixed.
* Fixed a MySQL query. * Comments::populate_by_sqlrow fixed.
Diffstat (limited to 'ratatoeskr/sys')
-rw-r--r--ratatoeskr/sys/models.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/ratatoeskr/sys/models.php b/ratatoeskr/sys/models.php
index 02fa0fc..913177e 100644
--- a/ratatoeskr/sys/models.php
+++ b/ratatoeskr/sys/models.php
@@ -905,7 +905,7 @@ class Comment extends BySQLRowEnabled
protected function populate_by_sqlrow($sqlrow)
{
$this->id = $sqlrow["id"];
- $this->article = Article::by_id($sqlrow["article"]);
+ $this->article_id = $sqlrow["article"];
$this->language = $sqlrow["language"];
$this->author_name = $sqlrow["author_name"];
$this->author_mail = $sqlrow["author_mail"];
@@ -945,7 +945,7 @@ class Comment extends BySQLRowEnabled
public static function all()
{
$rv = array();
- $result = qdb("SELECT `id`, `article`, `language`, `author_name`, `author_mail`, `text`, `timestamp`, `visible`, `read_by_admin` WHERE 1");
+ $result = qdb("SELECT `id`, `article`, `language`, `author_name`, `author_mail`, `text`, `timestamp`, `visible`, `read_by_admin` FROM `PREFIX_comments` WHERE 1");
while($sqlrow = mysql_fetch_assoc($result))
$rv[] = self::by_sqlrow($sqlrow);
return $rv;