From 355d25e73d90f3174db459a5a380193e0505ada4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 4 Jun 2003 18:24:39 +0000 Subject: - Bugfix: renamed the SQL field 'types' to 'nodes' because 'types' is a reserved keyword in MySQL 4. This fixes critical bug #1618. Patch by Marco. ==> This fix requires to run update.php! - Bugfix: made sessions work without warnings when register_globals is turned off. The solution is to use $_SESSION instead of session_register(). This fixes critical bug #1797. Patch by Marco. - Bugfix: sometimes error messages where being discarded when previewing a node. Patch by Craig Courtney. - Bugfix: fixed charset problems. This fixes critical bug #1549. Patch '0023.charset.patch' by Al. - Code improvements: removed some dead code from the comment module. Patch by Marco. - Documentation improvements: polished the node module help texts and form descriptions. Patch '0019.node.module.help.patch' by Al. - CSS improvements all over the map! Patch '0021.more.css.patch' by Al. - GUI improvements: improved the position of Druplicon in the admin menu. Patch '0020.admin.logo.patch' by Al. - GUI improvements: new logos for theme Marvin and theme UnConeD. Logos by Kristjan Jansen. - GUI improvements: small changes to the output emitted by the profile module. Suggestions by Steven Wittens. - GUI improvements: small fixes to Xtemplate. Patch '0022.xtemplate.css.patch' by Al. TODO: - Some modules such as the buddy list module and the annotation module in the contributions repository are also using session_register(). They should be updated. We should setup a task on Drupal. - There is code emitting '
' which doesn't validate. - Does our XML feeds validate with the charset changes? - The forum module's SQL doesn't work properly on PostgreSQL. --- modules/comment.module | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) (limited to 'modules/comment.module') diff --git a/modules/comment.module b/modules/comment.module index e0780b416..2c0aceacd 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -823,7 +823,7 @@ function comment_admin_overview($status = 0) { $header = array(t("subject"), t("author"), t("status"), array("data" => t("operations"), "colspan" => 2)); while ($comment = db_fetch_object($result)) { - $rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlentities(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid")); + $rows[] = array(l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid", array("title" => htmlspecialchars(substr($comment->comment, 0, 128)))) ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme_mark() : ""), format_name($comment), ($comment->status == 0 ? t("published") : t("not published")) ."". l(t("edit comment"), "admin/comment/edit/$comment->cid"), l(t("delete comment"), "admin/comment/delete/$comment->cid")); } if ($pager = pager_display(NULL, 50, 0, "admin")) { @@ -996,8 +996,6 @@ function comment_mod_filters($edit) { function comment_admin() { - global $id, $mod, $keys, $order, $status, $comment_page, $comment_settings; - $op = $_POST["op"]; $edit = $_POST["edit"]; @@ -1050,18 +1048,10 @@ function comment_admin() { break; case t("Delete"): print status(comment_delete($edit)); - if (session_is_registered("comment_settings")) { - $status = $comment_settings["status"]; - $comment_page = $comment_settings["comment_page"]; - } print comment_admin_overview(0); break; case t("Submit"): print status(comment_save(check_query(arg(3)), $edit)); - if (session_is_registered("comment_settings")) { - $status = $comment_settings["status"]; - $comment_page = $comment_settings["comment_page"]; - } print comment_admin_overview(0); break; default: @@ -1189,20 +1179,19 @@ function comment_moderation_form($comment) { return $output; } -function comment($comment, $link = 0) { - $output .= "
"; - $output .= ""; - $output .= " "; - $output .= " "; - $output .= " "; - $output .= " "; - $output .= "
$comment->subject ". ($comment->new ? theme("theme_mark") : "") ."
". $comment->moderation ."
". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."
". check_output($comment->comment) ."
$link
"; - $output .= "

"; +function comment($comment, $links = 0) { + $output .= "
"; + $output .= "
$comment->subject". ($comment->new ? " ". theme("theme_mark") : "") ."
"; + $output .= "
". $comment->moderation ."
"; + $output .= "
". t("by %a on %b", array("%a" => format_name($comment), "%b" => format_date($comment->timestamp))) ."
"; + $output .= "
". check_output($comment->comment) ."$links
"; + $output .= "
"; print $output; } function comment_folded($comment) { - print "

". l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid") ." ". t("by") . " " . format_name($comment) ."

"; + print "
". l($comment->subject, "node/view/$comment->nid/$comment->cid#$comment->cid") ." ". t("by") . " " . format_name($comment) ."
"; } function comment_flat_collapsed($comments, $threshold) { -- cgit v1.2.3