*sigh* class is a keyword now, of course
authorJoey Schulze <joey@infodrom.org>
Tue, 5 Jun 2007 18:11:19 +0000 (18:11 +0000)
committerJoey Schulze <joey@infodrom.org>
Tue, 5 Jun 2007 18:11:19 +0000 (18:11 +0000)
src/Infodrom/zeitungen/list.wml

index 44f78fb..b0dcc1f 100644 (file)
   if ($_POST[city]) {
     $where[] = "city ~* '$_POST[city]'";
   }
-  if ($_POST[class]) {
-    if (($_POST[class] == "tag") || ($_POST[class] == "woche")) {
-      $where[] = "(type = '$_POST[class]' OR type = 'u$_POST[class]')";
+  if ($_POST["class"]) {
+    if (($_POST["class"] == "tag") || ($_POST["class"] == "woche")) {
+      $where[] = sprintf("type = '%s' OR type = 'u%s'", $_POST["class"], $_POST["class"]);
     } else {
-      $where[] = "type = '$_POST[class]'";
+      $where[] = sprintf("type = '%s'", $_POST["class"]);
     }
   }