]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge branch 'pull'
[friendica.git] / boot.php
index b3c79079a6f373f249546fe91be529c0c511c3d6..b02e686bad289c4f59b68067c6c3720cb5372f00 100755 (executable)
--- 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.1284' );
+define ( 'FRIENDICA_VERSION',      '2.3.1295' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1132      );
+define ( 'DB_UPDATE_VERSION',      1133      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
@@ -95,8 +95,8 @@ define ( 'PAGE_BLOG',              4 );
  * Network and protocol family types 
  */
 
-define ( 'NETWORK_ZOT',              'zot!');    // Zot!
 define ( 'NETWORK_DFRN',             'dfrn');    // Friendica, Mistpark, other DFRN implementations
+define ( 'NETWORK_ZOT',              'zot!');    // Zot!
 define ( 'NETWORK_OSTATUS',          'stat');    // status.net, identi.ca, GNU-social, other OStatus implementations
 define ( 'NETWORK_FEED',             'feed');    // RSS/Atom feeds with no known "post/notify" protocol
 define ( 'NETWORK_DIASPORA',         'dspr');    // Diaspora
@@ -108,6 +108,28 @@ define ( 'NETWORK_XMPP',             'xmpp');    // XMPP
 define ( 'NETWORK_MYSPACE',          'mysp');    // MySpace
 define ( 'NETWORK_GPLUS',            'goog');    // Google+
 
+/*
+ * These numbers are used in stored permissions
+ * and existing allocations MUST NEVER BE CHANGED
+ * OR RE-ASSIGNED! You may only add to them.
+ */
+
+$netgroup_ids = array(
+       NETWORK_DFRN     => (-1),
+       NETWORK_ZOT      => (-2),
+       NETWORK_OSTATUS  => (-3),
+       NETWORK_FEED     => (-4),
+       NETWORK_DIASPORA => (-5),
+       NETWORK_MAIL     => (-6),
+       NETWORK_MAIL2    => (-7),
+       NETWORK_FACEBOOK => (-8),
+       NETWORK_LINKEDIN => (-9),
+       NETWORK_XMPP     => (-10),
+       NETWORK_MYSPACE  => (-11),
+       NETWORK_GPLUS    => (-12),
+);
+
+
 /**
  * Maximum number of "people who like (or don't like) this"  that we will list by name
  */
@@ -135,6 +157,9 @@ define ( 'NOTIFY_PROFILE',  0x0040 );
 define ( 'NOTIFY_TAGSELF',  0x0080 );
 define ( 'NOTIFY_TAGSHARE', 0x0100 );
 
+define ( 'NOTIFY_SYSTEM',   0x8000 );
+
+
 /**
  * various namespaces we may need to parse
  */
@@ -560,6 +585,10 @@ function absurl($path) {
        return $path;
 }
 
+function is_ajax() {
+       return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
+}
+
 
 // Primarily involved with database upgrade, but also sets the 
 // base url for use in cmdline programs which don't have
@@ -713,15 +742,16 @@ function login($register = false, $hiddens=false) {
 
        $noid = get_config('system','no_openid');
        
+       $dest_url = $a->get_baseurl(true) . '/' . $a->query_string;
+
        if(local_user()) {
                $tpl = get_markup_template("logout.tpl");
        }
        else {
                $tpl = get_markup_template("login.tpl");
-
+               $_SESSION['return_url'] = $a->query_string;
        }
 
-       $dest_url = $a->get_baseurl(true) . '/' . $a->query_string;
 
        $o .= replace_macros($tpl,array(
 
@@ -1377,6 +1407,11 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
                );
        }
 
+
+       $arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
+       call_hooks('profile_tabs', $arr);
+       
        $tpl = get_markup_template('common_tabs.tpl');
-       return replace_macros($tpl,array('$tabs'=>$tabs));
+
+       return replace_macros($tpl,array('$tabs' => $arr['tabs']));
 }}