]> git.mxchange.org Git - friendica.git/blobdiff - include/datetime.php
Improvments of the HTML to make a better bb2markdown conversion (nested lists, youtub...
[friendica.git] / include / datetime.php
index f6bf1041e17625fa2a1d37c9e673adbc4bce2659..75ae685f3ae2b3d23dfba2cdfe2a9db9bb1e235b 100644 (file)
@@ -87,7 +87,7 @@ function datetime_convert($from = 'UTC', $to = 'UTC', $s = 'now', $fmt = "Y-m-d
                $from = 'UTC';
        if($to === '')
                $to = 'UTC';
-       if($s === '' || (! is_string($s)))
+       if( ($s === '') || (! is_string($s)) )
                $s = 'now';
 
        // Slight hackish adjustment so that 'zero' datetime actually returns what is intended
@@ -447,11 +447,13 @@ function update_contact_birthdays() {
                         *
                         */
                         
-                       $bdtext = t('Birthday:') . ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]' ;
+                       $bdtext = sprintf( t('%s\'s birthday'), $rr['name']);
+                       $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]') ;
 
 
-                       $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`desc`,`type`,`adjust`)
-                               VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%d' ) ",
+
+                       $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`,`adjust`)
+                               VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d' ) ",
                                intval($rr['uid']),
                                intval($rr['id']),
                                dbesc(datetime_convert()),
@@ -459,6 +461,7 @@ function update_contact_birthdays() {
                                dbesc(datetime_convert('UTC','UTC', $nextbd)),
                                dbesc(datetime_convert('UTC','UTC', $nextbd . ' + 1 day ')),
                                dbesc($bdtext),
+                               dbesc($bdtext2),
                                dbesc('birthday'),
                                intval(0)
                        );