From 7e9f0b17187e431b85dca3ccc195570dfbc3510a Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 19 Aug 2013 06:49:17 +0000 Subject: [PATCH] 2013-08-19 Miguel de Dios * general/logon_ok.php, godmode/setup/news.php: fixed the lost "
" in the news. Fixes: #2380 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8675 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/general/logon_ok.php | 15 ++++++++++++--- pandora_console/godmode/setup/news.php | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 19b86ba020..675283dd68 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-08-19 Miguel de Dios + + * general/logon_ok.php, godmode/setup/news.php: fixed the lost + "
" in the news. + + Fixes: #2380 + 2013-08-19 Hirofumi Kosaka * godmode/agentes/module_manager_editor.php, diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index ea77dfdcb3..ff3aae9112 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -44,10 +44,16 @@ echo '
'; switch ($config["dbtype"]) { case "mysql": case "postgresql": - $sql = "SELECT subject,timestamp,text,author FROM tnews ORDER by timestamp DESC LIMIT 3"; + $sql = "SELECT subject,timestamp,text,author + FROM tnews + ORDER BY timestamp DESC + LIMIT 3"; break; case "oracle": - $sql = "SELECT subject,timestamp,text,author FROM tnews where rownum <= 3 ORDER by timestamp DESC"; + $sql = "SELECT subject,timestamp,text,author + FROM tnews + WHERE rownum <= 3 + ORDER BY timestamp DESC"; break; } @@ -62,10 +68,13 @@ echo '
'; $comparation_suffix = __('ago'); } foreach ($news as $article) { + $text = io_safe_output($article["text"]); + + echo ''.$article["subject"].''; echo ''.__('by').' '.$article["author"].' ' . ui_print_timestamp ($article["timestamp"], true).' ' . $comparation_suffix . ''; echo ''; - echo nl2br ($article["text"]); + echo nl2br($text); echo ''; } echo ''; diff --git a/pandora_console/godmode/setup/news.php b/pandora_console/godmode/setup/news.php index 25920966ee..600fa973d7 100644 --- a/pandora_console/godmode/setup/news.php +++ b/pandora_console/godmode/setup/news.php @@ -56,7 +56,7 @@ if (isset ($_POST["update"])) { // if update $values = array('subject' => $subject, 'text' => $text, 'timestamp' => $timestamp); $result = db_process_sql_update('tnews', $values, array('id_news' => $id_news)); - + ui_print_result_message ($result, __('Successfully updated'), __('Not updated. Error updating data'));