X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=05f7abcac4661158f174442f6a70acb366a36e0f;hb=38196aec674ca9acc5db7e72898b52906f0d9070;hp=40729a78c023aba1c58bfb6aa99d2437556da417;hpb=511556085a90f3bd12c4bc4d5b482a12d5fd2b98;p=friendica.git diff --git a/boot.php b/boot.php index 40729a78c0..05f7abcac4 100644 --- a/boot.php +++ b/boot.php @@ -1,11 +1,21 @@ . * * Friendica is a communications platform for integrated social communications * utilising decentralised communications and linkage to several indie social @@ -22,15 +32,15 @@ use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Term; +use Friendica\Model\Notification; use Friendica\Util\BasePath; use Friendica\Util\DateTimeFormat; define('FRIENDICA_PLATFORM', 'Friendica'); -define('FRIENDICA_CODENAME', 'Dalmatian Bellflower'); -define('FRIENDICA_VERSION', '2020.03-dev'); +define('FRIENDICA_CODENAME', 'Red Hot Poker'); +define('FRIENDICA_VERSION', '2021.03-rc'); define('DFRN_PROTOCOL_VERSION', '2.23'); -define('NEW_UPDATE_ROUTINE_VERSION', 1170); +define('NEW_TABLE_STRUCTURE_VERSION', 1288); /** * Constant with a HTML line break. @@ -134,27 +144,38 @@ $netgroup_ids = [ */ define('MAX_LIKERS', 75); -/** @deprecated since 2019.03, use Term::UNKNOWN instead */ -define('TERM_UNKNOWN', Term::UNKNOWN); -/** @deprecated since 2019.03, use Term::HASHTAG instead */ -define('TERM_HASHTAG', Term::HASHTAG); -/** @deprecated since 2019.03, use Term::MENTION instead */ -define('TERM_MENTION', Term::MENTION); -/** @deprecated since 2019.03, use Term::CATEGORY instead */ -define('TERM_CATEGORY', Term::CATEGORY); -/** @deprecated since 2019.03, use Term::PCATEGORY instead */ -define('TERM_PCATEGORY', Term::PCATEGORY); -/** @deprecated since 2019.03, use Term::FILE instead */ -define('TERM_FILE', Term::FILE); -/** @deprecated since 2019.03, use Term::SAVEDSEARCH instead */ -define('TERM_SAVEDSEARCH', Term::SAVEDSEARCH); -/** @deprecated since 2019.03, use Term::CONVERSATION instead */ -define('TERM_CONVERSATION', Term::CONVERSATION); - -/** @deprecated since 2019.03, use Term::OBJECT_TYPE_POST instead */ -define('TERM_OBJ_POST', Term::OBJECT_TYPE_POST); -/** @deprecated since 2019.03, use Term::OBJECT_TYPE_PHOTO instead */ -define('TERM_OBJ_PHOTO', Term::OBJECT_TYPE_PHOTO); +/** + * @name Notification + * + * Email notification options + * @{ + */ +/** @deprecated since 2020.03, use Notification\Type::INTRO instead */ +define('NOTIFY_INTRO', Notification\Type::INTRO); +/** @deprecated since 2020.03, use Notification\Type::CONFIRM instead */ +define('NOTIFY_CONFIRM', Notification\Type::CONFIRM); +/** @deprecated since 2020.03, use Notification\Type::WALL instead */ +define('NOTIFY_WALL', Notification\Type::WALL); +/** @deprecated since 2020.03, use Notification\Type::COMMENT instead */ +define('NOTIFY_COMMENT', Notification\Type::COMMENT); +/** @deprecated since 2020.03, use Notification\Type::MAIL instead */ +define('NOTIFY_MAIL', Notification\Type::MAIL); +/** @deprecated since 2020.03, use Notification\Type::SUGGEST instead */ +define('NOTIFY_SUGGEST', Notification\Type::SUGGEST); +/** @deprecated since 2020.03, use Notification\Type::PROFILE instead */ +define('NOTIFY_PROFILE', Notification\Type::PROFILE); +/** @deprecated since 2020.03, use Notification\Type::TAG_SELF instead */ +define('NOTIFY_TAGSELF', Notification\Type::TAG_SELF); +/** @deprecated since 2020.03, use Notification\Type::TAG_SHARE instead */ +define('NOTIFY_TAGSHARE', Notification\Type::TAG_SHARE); +/** @deprecated since 2020.03, use Notification\Type::POKE instead */ +define('NOTIFY_POKE', Notification\Type::POKE); +/** @deprecated since 2020.03, use Notification\Type::SHARE instead */ +define('NOTIFY_SHARE', Notification\Type::SHARE); + +/** @deprecated since 2020.12, use Notification\Type::SYSTEM instead */ +define('NOTIFY_SYSTEM', Notification\Type::SYSTEM); +/* @}*/ /** * @name Gravity @@ -180,6 +201,7 @@ define('PRIORITY_HIGH', 20); define('PRIORITY_MEDIUM', 30); define('PRIORITY_LOW', 40); define('PRIORITY_NEGLIGIBLE', 50); +define('PRIORITIES', [PRIORITY_CRITICAL, PRIORITY_HIGH, PRIORITY_MEDIUM, PRIORITY_LOW, PRIORITY_NEGLIGIBLE]); /* @}*/ /** @@ -232,10 +254,10 @@ function public_contact() if (!$public_contact_id && !empty($_SESSION['authenticated'])) { if (!empty($_SESSION['my_address'])) { // Local user - $public_contact_id = intval(Contact::getIdForURL($_SESSION['my_address'], 0, true)); + $public_contact_id = intval(Contact::getIdForURL($_SESSION['my_address'], 0, false)); } elseif (!empty($_SESSION['visitor_home'])) { // Remote user - $public_contact_id = intval(Contact::getIdForURL($_SESSION['visitor_home'], 0, true)); + $public_contact_id = intval(Contact::getIdForURL($_SESSION['visitor_home'], 0, false)); } } elseif (empty($_SESSION['authenticated'])) { $public_contact_id = false; @@ -245,7 +267,7 @@ function public_contact() } /** - * Returns contact id of authenticated site visitor or false + * Returns public contact id of authenticated site visitor or false * * @return int|bool visitor_id or false */ @@ -295,10 +317,6 @@ function info($s) { $a = DI::app(); - if (local_user() && DI::pConfig()->get(local_user(), 'system', 'ignore_info')) { - return; - } - if (empty($_SESSION['sysmsg_info'])) { $_SESSION['sysmsg_info'] = []; } @@ -365,38 +383,6 @@ function is_site_admin() return local_user() && $admin_email && in_array($a->user['email'] ?? '', $adminlist); } -function explode_querystring($query) -{ - $arg_st = strpos($query, '?'); - if ($arg_st !== false) { - $base = substr($query, 0, $arg_st); - $arg_st += 1; - } else { - $base = ''; - $arg_st = 0; - } - - $args = explode('&', substr($query, $arg_st)); - foreach ($args as $k => $arg) { - /// @TODO really compare type-safe here? - if ($arg === '') { - unset($args[$k]); - } - } - $args = array_values($args); - - if (!$base) { - $base = $args[0]; - unset($args[0]); - $args = array_values($args); - } - - return [ - 'base' => $base, - 'args' => $args, - ]; -} - /** * Returns the complete URL of the current page, e.g.: http(s)://something.com/network *