]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
audio/video bb tags showing up on Diaspora
[friendica.git] / boot.php
index 8452108ff1f5224d67bb121b8a918f83601a9bb4..742b6c679072ddd3c64bdc4146b82e375f9e9ce9 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -9,9 +9,9 @@ require_once('include/nav.php');
 require_once('include/cache.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
-define ( 'FRIENDICA_VERSION',      '2.3.1192' );
+define ( 'FRIENDICA_VERSION',      '2.3.1201' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.22'    );
-define ( 'DB_UPDATE_VERSION',      1111      );
+define ( 'DB_UPDATE_VERSION',      1112      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
@@ -422,6 +422,10 @@ class App {
        } 
 
        function init_pagehead() {
+               $interval = ((local_user()) ? get_pconfig(local_user(),'system','update_interval') : 40000);
+               if($interval < 10000)
+                       $interval = 40000;
+
                $this->page['title'] = $this->config['sitename'];
                $tpl = file_get_contents('view/head.tpl');
                $this->page['htmlhead'] = replace_macros($tpl,array(
@@ -430,7 +434,8 @@ class App {
                        '$delitem' => t('Delete this item?'),
                        '$comment' => t('Comment'),
                        '$showmore' => t('show more'),
-                       '$showfewer' => t('show fewer')
+                       '$showfewer' => t('show fewer'),
+                       '$update_interval' => $interval
                ));
        }
 
@@ -1031,6 +1036,8 @@ function get_birthdays() {
        if($r && count($r)) {
                $total = 0;
                $now = strtotime('now');
+               $cids = array();
+
                $istoday = false;
                foreach($r as $rr) {
                        if(strlen($rr['name']))
@@ -1047,6 +1054,13 @@ function get_birthdays() {
                        foreach($r as $rr) {
                                if(! strlen($rr['name']))
                                        continue;
+
+                               // avoid duplicates
+
+                               if(in_array($rr['cid'],$cids))
+                                       continue;
+                               $cids[] = $rr['cid'];
+
                                $today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false); 
                                $sparkle = '';
                                $url = $rr['url'];