]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Documented some unknown verbs
[friendica.git] / boot.php
index d5dc72ffb96bd92c5ca52daeab21bc8b2382d21c..417502b960b05b9001b82d1da541e3ad04d863e3 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -21,6 +21,7 @@
 require_once(__DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
 
 use Friendica\App;
+use Friendica\Core\System;
 use Friendica\Core\Config;
 use Friendica\Util\Lock;
 
@@ -42,7 +43,7 @@ define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_CODENAME',     'Asparagus');
 define ( 'FRIENDICA_VERSION',      '3.5.3-dev' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1233      );
+define ( 'DB_UPDATE_VERSION',      1234      );
 
 /**
  * @brief Constant with a HTML line break.
@@ -228,8 +229,9 @@ define('PROTOCOL_UNKNOWN',         0);
 define('PROTOCOL_DFRN',            1);
 define('PROTOCOL_DIASPORA',        2);
 define('PROTOCOL_OSTATUS_SALMON',  3);
-define('PROTOCOL_OSTATUS_FEED',    4);
-define('PROTOCOL_GS_CONVERSATION', 5);
+define('PROTOCOL_OSTATUS_FEED',    4); // Deprecated
+define('PROTOCOL_GS_CONVERSATION', 5); // Deprecated
+define('PROTOCOL_SPLITTED_CONV',   6);
 /** @}*/
 
 /**
@@ -319,6 +321,8 @@ define ( 'NOTIFY_TAGSHARE', 0x0100 );
 define ( 'NOTIFY_POKE',     0x0200 );
 define ( 'NOTIFY_SHARE',    0x0400 );
 
+define ( 'SYSTEM_EMAIL',    0x4000 );
+
 define ( 'NOTIFY_SYSTEM',   0x8000 );
 /* @}*/
 
@@ -551,31 +555,16 @@ function system_unavailable() {
        killme();
 }
 
-function clean_urls() {
-       $a = get_app();
-       return true;
-}
-
-function z_path() {
-       $base = App::get_baseurl();
-
-       if (!clean_urls()) {
-               $base .= '/?q=';
-       }
-
-       return $base;
-}
-
 /**
  * @brief Returns the baseurl.
  *
- * @see App::get_baseurl()
+ * @see System::baseUrl()
  *
  * @return string
- * @TODO Maybe super-flous and deprecated? Seems to only wrap App::get_baseurl()
+ * @TODO Function is deprecated and only used in some addons
  */
 function z_root() {
-       return App::get_baseurl();
+       return System::baseUrl();
 }
 
 /**
@@ -628,10 +617,10 @@ function check_url(App $a) {
        // We will only change the url to an ip address if there is no existing setting
 
        if (!x($url)) {
-               $url = set_config('system', 'url', App::get_baseurl());
+               $url = set_config('system', 'url', System::baseUrl());
        }
-       if ((!link_compare($url, App::get_baseurl())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $a->get_hostname))) {
-               $url = set_config('system', 'url', App::get_baseurl());
+       if ((!link_compare($url, System::baseUrl())) && (!preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $a->get_hostname))) {
+               $url = set_config('system', 'url', System::baseUrl());
        }
 
        return;
@@ -913,7 +902,7 @@ function killme() {
  */
 function goaway($s) {
        if (!strstr(normalise_link($s), "http://")) {
-               $s = App::get_baseurl() . "/" . $s;
+               $s = System::baseUrl() . "/" . $s;
        }
 
        header("Location: $s");
@@ -961,6 +950,10 @@ function public_contact() {
  * @return int|bool visitor_id or false
  */
 function remote_user() {
+       // You cannot be both local and remote
+       if (local_user()) {
+               return false;
+       }
        if ((x($_SESSION, 'authenticated')) && (x($_SESSION, 'visitor_id'))) {
                return intval($_SESSION['visitor_id']);
        }