X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=e1c5733704dc55b85cb30454e9ed626af04402f7;hb=c2d4b557aeb4b6eb9eee2a6b65b18ab7bf6efe39;hp=bbc4e9d298ee7e7e2e41f37e498474e25ec74761;hpb=e8e93768db29c83412262f2350233566c8838aa6;p=friendica.git diff --git a/boot.php b/boot.php index bbc4e9d298..e1c5733704 100644 --- a/boot.php +++ b/boot.php @@ -39,9 +39,9 @@ require_once 'include/text.php'; define('FRIENDICA_PLATFORM', 'Friendica'); define('FRIENDICA_CODENAME', 'The Tazmans Flax-lily'); -define('FRIENDICA_VERSION', '2018.05-rc'); +define('FRIENDICA_VERSION', '2018.08-dev'); define('DFRN_PROTOCOL_VERSION', '2.23'); -define('DB_UPDATE_VERSION', 1262); +define('DB_UPDATE_VERSION', 1276); define('NEW_UPDATE_ROUTINE_VERSION', 1170); /** @@ -451,8 +451,9 @@ define('ACTIVITY_OBJ_QUESTION', 'http://activityschema.org/object/question'); * @{ */ define('GRAVITY_PARENT', 0); -define('GRAVITY_LIKE', 3); +define('GRAVITY_ACTIVITY', 3); define('GRAVITY_COMMENT', 6); +define('GRAVITY_UNKNOWN', 9); /* @}*/ /** @@ -498,36 +499,6 @@ if (!defined("SIGTERM")) { if (!defined('CURLE_OPERATION_TIMEDOUT')) { define('CURLE_OPERATION_TIMEDOUT', CURLE_OPERATION_TIMEOUTED); } -/** - * Reverse the effect of magic_quotes_gpc if it is enabled. - * Please disable magic_quotes_gpc so we don't have to do this. - * See http://php.net/manual/en/security.magicquotes.disabling.php - */ -function startup() -{ - error_reporting(E_ERROR | E_WARNING | E_PARSE); - - set_time_limit(0); - - // This has to be quite large to deal with embedded private photos - ini_set('pcre.backtrack_limit', 500000); - - if (get_magic_quotes_gpc()) { - $process = [&$_GET, &$_POST, &$_COOKIE, &$_REQUEST]; - while (list($key, $val) = each($process)) { - foreach ($val as $k => $v) { - unset($process[$key][$k]); - if (is_array($v)) { - $process[$key][stripslashes($k)] = $v; - $process[] = &$process[$key][stripslashes($k)]; - } else { - $process[$key][stripslashes($k)] = stripslashes($v); - } - } - } - unset($process); - } -} /** * @brief Retrieve the App structure @@ -1076,6 +1047,7 @@ function is_site_admin() $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email'])); //if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email'])) + /// @TODO This if() + 2 returns can be shrinked into one return if (local_user() && x($a->user, 'email') && x($a->config, 'admin_email') && in_array($a->user['email'], $adminlist)) { return true; } @@ -1173,7 +1145,7 @@ function random_digits($digits) { $rn = ''; for ($i = 0; $i < $digits; $i++) { - /// @TODO rand() is different to mt_rand() and maybe lesser "random" + /// @TODO Avoid rand/mt_rand, when it comes to cryptography, they are generating predictable (seedable) numbers. $rn .= rand(0, 9); } return $rn; @@ -1187,7 +1159,7 @@ function get_server() $server = "https://dir.friendica.social"; } - return($server); + return $server; } function get_temppath() @@ -1236,7 +1208,7 @@ function get_cachefile($file, $writemode = true) $cache = get_itemcachepath(); if ((!$cache) || (!is_dir($cache))) { - return(""); + return ""; } $subfolder = $cache . "/" . substr($file, 0, 2); @@ -1250,7 +1222,6 @@ function get_cachefile($file, $writemode = true) } } - /// @TODO no need to put braces here return $cachepath; } @@ -1357,7 +1328,6 @@ function get_spoolpath() return ""; } - if (!function_exists('exif_imagetype')) { function exif_imagetype($file) { @@ -1395,7 +1365,7 @@ function validate_include(&$file) } // Simply return flag - return ($valid); + return $valid; } function current_load()