]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Doing some laundry
[friendica.git] / boot.php
index 7654d261c3c5b0576511a5a26209c69237ee7b92..d5ada81354e5701d8ab583e9dd13ffb206e11aac 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -29,7 +29,7 @@ use Friendica\Core\PConfig;
 use Friendica\Core\Protocol;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
-use Friendica\Database\DBM;
+use Friendica\Database\DBA;
 use Friendica\Database\DBStructure;
 use Friendica\Model\Contact;
 use Friendica\Model\Conversation;
@@ -41,7 +41,7 @@ define('FRIENDICA_PLATFORM',     'Friendica');
 define('FRIENDICA_CODENAME',     'The Tazmans Flax-lily');
 define('FRIENDICA_VERSION',      '2018.08-dev');
 define('DFRN_PROTOCOL_VERSION',  '2.23');
-define('DB_UPDATE_VERSION',      1279);
+define('DB_UPDATE_VERSION',      1281);
 define('NEW_UPDATE_ROUTINE_VERSION', 1170);
 
 /**
@@ -152,19 +152,6 @@ define('REGISTER_OPEN',          2);
  * @}
 */
 
-/**
- * @name Contact_is
- *
- * Relationship types
- * @{
- */
-define('CONTACT_IS_FOLLOWER', 1);
-define('CONTACT_IS_SHARING',  2);
-define('CONTACT_IS_FRIEND',   3);
-/**
- *  @}
- */
-
 /**
  * @name Update
  *
@@ -177,55 +164,6 @@ define('UPDATE_FAILED',  1);
  * @}
  */
 
-/**
- * @name page/profile types
- *
- * PAGE_NORMAL is a typical personal profile account
- * PAGE_SOAPBOX automatically approves all friend requests as CONTACT_IS_SHARING, (readonly)
- * PAGE_COMMUNITY automatically approves all friend requests as CONTACT_IS_SHARING, but with
- *      write access to wall and comments (no email and not included in page owner's ACL lists)
- * PAGE_FREELOVE automatically approves all friend requests as full friends (CONTACT_IS_FRIEND).
- *
- * @{
- */
-define('PAGE_NORMAL',            0);
-define('PAGE_SOAPBOX',           1);
-define('PAGE_COMMUNITY',         2);
-define('PAGE_FREELOVE',          3);
-define('PAGE_BLOG',              4);
-define('PAGE_PRVGROUP',          5);
-/**
- * @}
- */
-
-/**
- * @name account types
- *
- * ACCOUNT_TYPE_PERSON - the account belongs to a person
- *     Associated page types: PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE
- *
- * ACCOUNT_TYPE_ORGANISATION - the account belongs to an organisation
- *     Associated page type: PAGE_SOAPBOX
- *
- * ACCOUNT_TYPE_NEWS - the account is a news reflector
- *     Associated page type: PAGE_SOAPBOX
- *
- * ACCOUNT_TYPE_COMMUNITY - the account is community forum
- *     Associated page types: PAGE_COMMUNITY, PAGE_PRVGROUP
- *
- * ACCOUNT_TYPE_RELAY - the account is a relay
- *      This will only be assigned to contacts, not to user accounts
- * @{
- */
-define('ACCOUNT_TYPE_PERSON',      0);
-define('ACCOUNT_TYPE_ORGANISATION', 1);
-define('ACCOUNT_TYPE_NEWS',        2);
-define('ACCOUNT_TYPE_COMMUNITY',   3);
-define('ACCOUNT_TYPE_RELAY',       4);
-/**
- * @}
- */
-
 /**
  * @name CP
  *
@@ -241,25 +179,6 @@ define('CP_USERS_AND_GLOBAL',       2);
  * @}
  */
 
-/**
- * @name Protocols
- * @deprecated since version 3.6
- * @see Conversation
- *
- * Different protocols that we are storing
- * @{
- */
-define('PROTOCOL_UNKNOWN'        , Conversation::PROTOCOL_UNKNOWN);
-define('PROTOCOL_DFRN'           , Conversation::PROTOCOL_DFRN);
-define('PROTOCOL_DIASPORA'       , Conversation::PROTOCOL_DIASPORA);
-define('PROTOCOL_OSTATUS_SALMON' , Conversation::PROTOCOL_OSTATUS_SALMON);
-define('PROTOCOL_OSTATUS_FEED'   , Conversation::PROTOCOL_OSTATUS_FEED);    // Deprecated
-define('PROTOCOL_GS_CONVERSATION', Conversation::PROTOCOL_GS_CONVERSATION); // Deprecated
-define('PROTOCOL_SPLITTED_CONV'  , Conversation::PROTOCOL_SPLITTED_CONV);
-/**
- * @}
- */
-
 /**
  * @name Network constants
  * @deprecated since version 3.6
@@ -803,7 +722,7 @@ function run_update_function($x, $prefix)
 function check_addons(App $a)
 {
        $r = q("SELECT * FROM `addon` WHERE `installed` = 1");
-       if (DBM::is_result($r)) {
+       if (DBA::isResult($r)) {
                $installed = $r;
        } else {
                $installed = [];
@@ -1002,7 +921,7 @@ function feed_birthday($uid, $tz)
                intval($uid)
        );
 
-       if (DBM::is_result($p)) {
+       if (DBA::isResult($p)) {
                $tmp_dob = substr($p[0]['dob'], 5);
                if (intval($tmp_dob)) {
                        $y = DateTimeFormat::timezoneNow($tz, 'Y');
@@ -1108,7 +1027,7 @@ function explode_querystring($query)
 function curPageURL()
 {
        $pageURL = 'http';
-       if ($_SERVER["HTTPS"] == "on") {
+       if (!empty($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on")) {
                $pageURL .= "s";
        }