1
0
mirror of https://github.com/php/web-php.git synced 2026-03-24 07:12:16 +01:00

Couple of logic fixes

Thats confusing.. Sunday is index 1 in the db, not the input form!
Also add nl2br() for the content
This commit is contained in:
Hannes Magnusson
2013-11-22 16:47:31 -08:00
parent bc9f028a74
commit e2a334fca7

4
ug.php
View File

@@ -30,7 +30,7 @@ function format_event_date($starts, $ends, $usually) {
$starts = date_format(date_create($starts), 'Y-m-d');
return $starts;
}
$days = array(1 => "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");
$days = array(1 => "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
$recur = array(
-3 => "third last",
-2 => "second last",
@@ -75,7 +75,7 @@ foreach($groupped as $country => $events) {
$entry .= "<div class='newstime'>$date</div>";
$entry .= '</a>'.'</h3>';
$entry .= '<div class="newscontent">';
$entry .= $event["ldesc"];
$entry .= nl2br($event["ldesc"]);
$entry .= '</div>';
$entry .= '</div>';
}