Commit:    e2a334fca714c3fb1f2c221daf0f31c35c8dca80
Author:    Hannes Magnusson <[email protected]>         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>';
     }


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to