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;
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);
/**
* log levels
* @{
*/
-define('LOGGER_NORMAL', 0);
-define('LOGGER_TRACE', 1);
-define('LOGGER_DEBUG', 2);
-define('LOGGER_DATA', 3);
-define('LOGGER_ALL', 4);
+define('LOGGER_WARNING', 0);
+define('LOGGER_INFO', 1);
+define('LOGGER_TRACE', 2);
+define('LOGGER_DEBUG', 3);
+define('LOGGER_DATA', 4);
+define('LOGGER_ALL', 5);
/* @}*/
/**
* @}
*/
-/**
- * @name Contact_is
- *
- * Relationship types
- * @{
- */
-define('CONTACT_IS_FOLLOWER', 1);
-define('CONTACT_IS_SHARING', 2);
-define('CONTACT_IS_FRIEND', 3);
-/**
- * @}
- */
-
/**
* @name Update
*
* @}
*/
-/**
- * @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
*
* @}
*/
-/**
- * @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
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 = [];
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');
function curPageURL()
{
$pageURL = 'http';
- if ($_SERVER["HTTPS"] == "on") {
+ if (!empty($_SERVER["HTTPS"]) && ($_SERVER["HTTPS"] == "on")) {
$pageURL .= "s";
}