1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

No additional new lines at the end of every custom page/menu

This commit is contained in:
secretr
2012-08-30 13:52:36 +00:00
parent c90b8aee4b
commit c8cab64460

View File

@@ -727,7 +727,7 @@ class page_admin_ui extends e_admin_ui
// if(is_array($_POST['data']) && is_array($_POST['subtitle'])) // if(is_array($_POST['data']) && is_array($_POST['subtitle']))
$newData = ""; $newData = array();
foreach($_POST as $k=>$v) foreach($_POST as $k=>$v)
{ {
if(substr($k,0,4)=='data' && trim($v)!='') if(substr($k,0,4)=='data' && trim($v)!='')
@@ -738,7 +738,7 @@ class page_admin_ui extends e_admin_ui
{ {
$newData .= "[newpage=".$_POST['page_subtitle'][$key]."]\n"; $newData .= "[newpage=".$_POST['page_subtitle'][$key]."]\n";
} }
$newData .= $v."\n\n"; $newData[] = $v;
} }
// return; // return;
@@ -746,7 +746,7 @@ class page_admin_ui extends e_admin_ui
// echo nl2br($newData); // echo nl2br($newData);
// return; // return;
$newData = implode("\n\n", $newData);
$page_text = $tp->toDB($newData); $page_text = $tp->toDB($newData);
$pauthor = ($_POST['page_display_authordate_flag'] ? USERID : 0); // Ideally, this check should be done in the front-end. $pauthor = ($_POST['page_display_authordate_flag'] ? USERID : 0); // Ideally, this check should be done in the front-end.
$update = 0; // Make sure some updates happen $update = 0; // Make sure some updates happen