summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/index.php b/index.php
index c4fad1093..fcdd9df6e 100644
--- a/index.php
+++ b/index.php
@@ -4,13 +4,7 @@ include_once "includes/common.inc";
page_header();
-foreach(explode("&", $QUERY_STRING) as $attribute) {
- if ($attribute) $query .= "attributes LIKE '%". check_input($attribute) ."%' AND ";
-}
-
-$query = !$date ? $query : "";
-
-$result = db_query("SELECT nid, type FROM node WHERE $query promote = '1' AND status = '". node_status("posted") ."' AND timestamp <= '". ($date > 0 ? check_input($date) : time()) ."' ORDER BY timestamp DESC LIMIT ". ($user->nodes ? $user->nodes : variable_get(default_nodes_main, 10)));
+$result = db_query("SELECT nid, type FROM node WHERE ". ($meta ? "attributes LIKE '%". check_input($meta) ."%' AND " : "") ." promote = '1' AND status = '". node_status("posted") ."' AND timestamp <= '". ($date > 0 ? check_input($date) : time()) ."' ORDER BY timestamp DESC LIMIT ". ($user->nodes ? $user->nodes : variable_get(default_nodes_main, 10)));
$theme->header();
while ($node = db_fetch_object($result)) {