]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
send diaspora share notification back to originator for auto friending
[friendica.git] / boot.php
index bd7dfa8e440c75077bc46822cfaa6d9c9716488d..1f2b47b2e0ea4a65c0aa8a934c1c7ff1df0e5b0e 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -4,14 +4,14 @@ require_once('include/config.php');
 require_once('include/network.php');
 require_once('include/plugin.php');
 require_once('include/text.php');
-require_once("include/pgettext.php");
+require_once('include/pgettext.php');
 require_once('include/nav.php');
 require_once('include/cache.php');
 
 define ( 'FRIENDICA_PLATFORM',     'Friendica');
-define ( 'FRIENDICA_VERSION',      '2.3.1188' );
+define ( 'FRIENDICA_VERSION',      '2.3.1217' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.22'    );
-define ( 'DB_UPDATE_VERSION',      1111      );
+define ( 'DB_UPDATE_VERSION',      1115      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
@@ -103,7 +103,7 @@ define ( 'NETWORK_MAIL',             'mail');    // IMAP/POP
 define ( 'NETWORK_FACEBOOK',         'face');    // Facebook API     
 define ( 'NETWORK_LINKEDIN',         'lnkd');    // LinkedIn
 define ( 'NETWORK_XMPP',             'xmpp');    // XMPP     
-
+define ( 'NETWORK_MYSPACE',          'mysp');    // MySpace
 
 /**
  * Maximum number of "people who like (or don't like) this"  that we will list by name
@@ -127,6 +127,9 @@ define ( 'NOTIFY_CONFIRM', 0x0002 );
 define ( 'NOTIFY_WALL',    0x0004 );
 define ( 'NOTIFY_COMMENT', 0x0008 );
 define ( 'NOTIFY_MAIL',    0x0010 );
+define ( 'NOTIFY_SUGGEST', 0x0020 );
+define ( 'NOTIFY_PROFILE', 0x0040 );
+
 
 /**
  * various namespaces we may need to parse
@@ -422,6 +425,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 +437,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
                ));
        }
 
@@ -696,7 +704,7 @@ function login($register = false, $hiddens=false) {
                '$lpassword'    => array('password', t('Password: '), '', ''),
                
                '$openid'               => !$noid,
-               '$lopenid'      => array('openid_url', t('OpenID: '),'',''),
+               '$lopenid'      => array('openid_url', t('Or login using OpenID: '),'',''),
                
                '$hiddens'      => $hiddens,
                
@@ -825,7 +833,7 @@ function profile_load(&$a, $nickname, $profile = 0) {
        }
 
        if(($r === false) || (! count($r))) {
-               notice( t('No profile') . EOL );
+               notice( t('Requested profile is not available.') . EOL );
                $a->error = 404;
                return;
        }
@@ -1031,6 +1039,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 +1057,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'];