com web/php: Couple of logic fixes: ug.php
| From: | Hannes Magnusson | 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-17215@lists.php.net to get a copy of this message | ||
Commit: e2a334fca714c3fb1f2c221daf0f31c35c8dca80
Author: Hannes Magnusson <bjori@mongodb.com> Fri, 22 Nov 2013 16:47:31 -0800
Parents: bc9f028a74cf59f6c0e6b4febca0b90f4b858b81
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=e2a334fca714c3fb1f2c221daf0f31c35c8dca80
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>';
}