From 2d7eb3b97eb802f700965cc88a9b049687e8abf0 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 5 Nov 2011 22:58:01 +0100 Subject: 2 Small bugfixes. 1. Corrected a SQL-Query in models.php 2. will now set maxpages properly, if there are no articles found. --- ratatoeskr/sys/models.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ratatoeskr/sys/models.php') diff --git a/ratatoeskr/sys/models.php b/ratatoeskr/sys/models.php index c0320fa..627fa89 100644 --- a/ratatoeskr/sys/models.php +++ b/ratatoeskr/sys/models.php @@ -1024,7 +1024,7 @@ class Style */ public function save() { - $result = qdb("SELECT COUNT(*) AS `n` FROM `PREFIX_styles` WHERE `name` = '%' AND `id` != %d", $this->name, $this->id); + $result = qdb("SELECT COUNT(*) AS `n` FROM `PREFIX_styles` WHERE `name` = '%s' AND `id` != %d", $this->name, $this->id); $sqlrow = mysql_fetch_assoc($result); if($sqlrow["n"] > 0) throw new AlreadyExistsError(); -- cgit v1.2.3-70-g09d2