diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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)) { |