From a002ba48456ed9cbb9c47d7d98f70fe99cdb6fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rytis=20Slatkevi=C4=8Dius?= Date: Tue, 11 May 2010 19:25:13 +0000 Subject: [PATCH] - user web: use full output transform for frontpage news posts (to handle newlines and other related stuff). - user web: add a warning in case admin hasn't changed show_news() call to the new format. svn path=/trunk/boinc/; revision=21459 --- checkin_notes | 10 ++++++++++ html/inc/news.inc | 12 +++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index bf258ae46e..3c49eff3c5 100644 --- a/checkin_notes +++ b/checkin_notes @@ -3455,3 +3455,13 @@ Rom 10 May 2010 client/ main.cpp + +Rytis 11 May 2010 + - user web: use full output transform for frontpage news posts (to handle + newlines and other related stuff). + - user web: add a warning in case admin hasn't changed show_news() call to + the new format. + + html/inc/ + news.inc + diff --git a/html/inc/news.inc b/html/inc/news.inc index 7e6499e412..112b141651 100644 --- a/html/inc/news.inc +++ b/html/inc/news.inc @@ -26,10 +26,10 @@ function news_item($date, $title, $post) { $d = time_str($date); if (is_string($post)) { $forum_link = false; - $text = bb2html($post); + $text = output_transform($post); } else { $forum_link = true; - $text = bb2html($post->content); + $text = output_transform($post->content); } echo " $text @@ -63,7 +63,13 @@ function show_news($start, $count) { "; return; } - + + if (is_array($start)) { + echo "You have not changed show_news() to use 0 instead of + deprecated \$project_news as the first param."; + return; + } + $lim = ""; if ($start) { if ($count) {