com web/php: Couple of logic fixes: ug.php
| From: | Paul Dragoonis | Date: | Sat, 23 Nov 2013 00:48:24 +0000 |
| Subject: | com web/php: Couple of logic fixes: ug.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-22443@lists.php.net to get a copy of this message | ||
Commit: 77694c1ee5828f9c0f4d1c4f96c8af832f4139d5
Author: Hannes Magnusson <bjori@mongodb.com> Fri, 22 Nov 2013 16:47:31 -0800
Parents: 50b2d5c72170b547385bf486f249535b1c848f8f
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=77694c1ee5828f9c0f4d1c4f96c8af832f4139d5
Log:
Couple of logic fixes
Thats confusing.. Sunday is index 1 in the db, not the input form!
Also add nl2br() for the content
Changed paths:
M ug.php
Diff:
diff --git a/ug.php b/ug.php
index 3dec527..0b812e5 100644
--- a/ug.php
+++ b/ug.php
@@ -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>';
}