diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-12-14 11:55:54 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-12-14 11:55:54 +0000 |
commit | 99d84c933003d6ecc5a7fe2d81f87cb0e1de9017 (patch) | |
tree | 236a559b110e6094935bd5b72dc6741654d06c83 /modules/node.module | |
parent | 9c11b14dc65573f4e6348844913158c8a13bea74 (diff) | |
download | brdo-99d84c933003d6ecc5a7fe2d81f87cb0e1de9017.tar.gz brdo-99d84c933003d6ecc5a7fe2d81f87cb0e1de9017.tar.bz2 |
- Committed Marco's pager improvements.
- Fixed another annoyance with editing content.
Diffstat (limited to 'modules/node.module')
-rw-r--r-- | modules/node.module | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/modules/node.module b/modules/node.module index 5c05c6a76..587c94662 100644 --- a/modules/node.module +++ b/modules/node.module @@ -400,16 +400,6 @@ function node_filter_line($text) { */ /* - ** When block tags are used, regular line breaks get stripped. - ** However, when only text formatting tags are used, Drupal will - ** insert linebreaks. - */ - - if (strip_tags($text, "<a><i><b><u><tt><code><cite><strong>") != $text) { - $text = ereg_replace("[\r\n]", "", $text); - } - - /* ** Replace some common "artifacts": */ @@ -549,7 +539,7 @@ function node_admin_nodes() { $queries = array(array("ORDER BY n.created DESC", "new nodes"), array("ORDER BY n.changed DESC", "updated nodes"), array("WHERE n.status = 1 AND n.moderate = 0 ORDER BY n.nid DESC", "published nodes"), array("WHERE n.status = 0 AND n.moderate = 0 ORDER BY n.nid DESC", "non-published nodes"), array("WHERE n.status = 1 AND n.moderate = 1 ORDER BY n.nid DESC", "pending nodes"), array("WHERE n.status = 1 AND n.promote = 1 ORDER BY n.nid DESC", "promoted nodes")); - $result = db_query_pager("SELECT n.*, u.name, u.uid FROM node n LEFT JOIN users u ON n.uid = u.uid ". $queries[$query ? $query : 1][0], 50); + $result = pager_query("SELECT n.*, u.name, u.uid FROM node n LEFT JOIN users u ON n.uid = u.uid ". $queries[$query ? $query : 1][0], 50); foreach ($queries as $key => $value) { $links[] = la($value[1], array("mod" => "node", "op" => "nodes", "query" => $key)); @@ -1348,14 +1338,14 @@ function node_page() { if ($or) { // this is an OR of terms - $result = db_query_pager("SELECT DISTINCT(n.nid), type FROM node n LEFT JOIN term_node r ON n.nid = r.nid WHERE tid IN (".implode(",", $terms).") AND ". ($id ? "nid = '$id' AND " : "") ."status = '1' ORDER BY static DESC, created DESC", ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10))); + $result = pager_query("SELECT DISTINCT(n.nid), type FROM node n LEFT JOIN term_node r ON n.nid = r.nid WHERE tid IN (".implode(",", $terms).") AND ". ($id ? "nid = '$id' AND " : "") ."status = '1' ORDER BY static DESC, created DESC", ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10))); } else if ($and) { // this is an AND - $result = db_query_pager("SELECT n.nid, n.type FROM node n LEFT JOIN term_node r ON n.nid = r.nid WHERE tid IN (".implode(",", $terms).") AND ". ($id ? "nid = '$id' AND " : "") ."status = '1' GROUP BY n.nid, n.type, n.status, n.static, n.created HAVING COUNT(n.nid) = ".count($terms)." ORDER BY static DESC, created DESC", ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10))); + $result = pager_query("SELECT n.nid, n.type FROM node n LEFT JOIN term_node r ON n.nid = r.nid WHERE tid IN (".implode(",", $terms).") AND ". ($id ? "nid = '$id' AND " : "") ."status = '1' GROUP BY n.nid, n.type, n.status, n.static, n.created HAVING COUNT(n.nid) = ".count($terms)." ORDER BY static DESC, created DESC", ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10))); } else { - $result = db_query_pager("SELECT nid, type FROM node WHERE ". ($id ? "nid = '$id'" : "promote = '1'") ." AND status = '1' ORDER BY static DESC, created DESC", ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10))); + $result = pager_query("SELECT nid, type FROM node WHERE ". ($id ? "nid = '$id'" : "promote = '1'") ." AND status = '1' ORDER BY static DESC, created DESC", ($user->nodes ? $user->nodes : variable_get("default_nodes_main", 10))); } |