]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
audio/video bb tags showing up on Diaspora
[friendica.git] / boot.php
index 4ccdff7acd0a4c6e8e2cd68af26a5b124e843535..742b6c679072ddd3c64bdc4146b82e375f9e9ce9 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -8,10 +8,10 @@ require_once("include/pgettext.php");
 require_once('include/nav.php');
 require_once('include/cache.php');
 
-define ( 'FRIENDIKA_PLATFORM',     'Friendica');
-define ( 'FRIENDIKA_VERSION',      '2.3.1173' );
+define ( 'FRIENDICA_PLATFORM',     'Friendica');
+define ( 'FRIENDICA_VERSION',      '2.3.1201' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.22'    );
-define ( 'DB_UPDATE_VERSION',      1105      );
+define ( 'DB_UPDATE_VERSION',      1112      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
@@ -21,8 +21,9 @@ define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
  *
  * Image storage quality. Lower numbers save space at cost of image detail.
  * For ease of upgrade, please do not change here. Change jpeg quality with 
- * set_config('system','jpeg_quality',n) in .htconfig.php
- * where n is netween 1 and 100, and with very poor results below about 50 
+ * $a->config['system']['jpeg_quality'] = n; 
+ * in .htconfig.php, where n is netween 1 and 100, and with very poor results 
+ * below about 50 
  *
  */
 
@@ -100,6 +101,8 @@ define ( 'NETWORK_FEED',             'feed');    // RSS/Atom feeds with no known
 define ( 'NETWORK_DIASPORA',         'dspr');    // Diaspora
 define ( 'NETWORK_MAIL',             'mail');    // IMAP/POP
 define ( 'NETWORK_FACEBOOK',         'face');    // Facebook API     
+define ( 'NETWORK_LINKEDIN',         'lnkd');    // LinkedIn
+define ( 'NETWORK_XMPP',             'xmpp');    // XMPP     
 
 
 /**
@@ -303,7 +306,15 @@ class App {
                if(x($_GET,'q'))
                        $this->cmd = trim($_GET['q'],'/\\');
 
+               // unix style "homedir"
 
+               if(substr($this->cmd,0,1) === '~')
+                       $this->cmd = 'profile/' . substr($this->cmd,1);
+
+               // Diaspora style profile url
+
+               if(substr($this->cmd,0,2) === 'u/')
+                       $this->cmd = 'profile/' . substr($this->cmd,2);
 
                /**
                 *
@@ -411,15 +422,20 @@ 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(
                        '$baseurl' => $this->get_baseurl(), // FIXME for z_path!!!!
-                       '$generator' => 'Friendika' . ' ' . FRIENDIKA_VERSION,
+                       '$generator' => 'Friendica' . ' ' . FRIENDICA_VERSION,
                        '$delitem' => t('Delete this item?'),
                        '$comment' => t('Comment'),
                        '$showmore' => t('show more'),
-                       '$showfewer' => t('show fewer')
+                       '$showfewer' => t('show fewer'),
+                       '$update_interval' => $interval
                ));
        }
 
@@ -1020,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']))
@@ -1036,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'];