X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=boot.php;h=65867593df34008db274d34a4a7210d57bd85d73;hb=fa7bed892905902292afb8aeed1831e270a6e642;hp=66e4645e5c67b8b1ca1e6c4a7b06b1ba0202507c;hpb=89602e44da535697dcf33aa37e43cce317d4830c;p=friendica.git diff --git a/boot.php b/boot.php index 66e4645e5c..65867593df 100644 --- a/boot.php +++ b/boot.php @@ -1,6 +1,6 @@ get_hostname()); + $prefix = hash('crc32', $a->get_hostname()); } while (strlen($prefix) < ($size - 13)) { @@ -862,22 +878,19 @@ function get_guid($size = 16, $prefix = "") if ($size >= 24) { $prefix = substr($prefix, 0, $size - 22); - return(str_replace(".", "", uniqid($prefix, true))); + return str_replace('.', '', uniqid($prefix, true)); } else { $prefix = substr($prefix, 0, max($size - 13, 0)); - return(uniqid($prefix)); + return uniqid($prefix); } } /** * @brief Used to end the current process, after saving session state. + * @deprecated */ function killme() { - if (!get_app()->is_backend()) { - session_write_close(); - } - exit(); } @@ -921,10 +934,10 @@ function public_contact() if (!$public_contact_id && x($_SESSION, 'authenticated')) { if (x($_SESSION, 'my_address')) { // Local user - $public_contact_id = intval(Contact::getIdForURL($_SESSION['my_address'], 0)); + $public_contact_id = intval(Contact::getIdForURL($_SESSION['my_address'], 0, true)); } elseif (x($_SESSION, 'visitor_home')) { // Remote user - $public_contact_id = intval(Contact::getIdForURL($_SESSION['visitor_home'], 0)); + $public_contact_id = intval(Contact::getIdForURL($_SESSION['visitor_home'], 0, true)); } } elseif (!x($_SESSION, 'authenticated')) { $public_contact_id = false; @@ -1142,14 +1155,14 @@ function feed_birthday($uid, $tz) if (DBM::is_result($p)) { $tmp_dob = substr($p[0]['dob'], 5); if (intval($tmp_dob)) { - $y = Temporal::timezoneNow($tz, 'Y'); + $y = DateTimeFormat::timezoneNow($tz, 'Y'); $bd = $y . '-' . $tmp_dob . ' 00:00'; $t_dob = strtotime($bd); - $now = strtotime(Temporal::timezoneNow($tz)); + $now = strtotime(DateTimeFormat::timezoneNow($tz)); if ($t_dob < $now) { $bd = $y + 1 . '-' . $tmp_dob . ' 00:00'; } - $birthday = Temporal::convert($bd, 'UTC', $tz, Temporal::ATOM); + $birthday = DateTimeFormat::convert($bd, 'UTC', $tz, DateTimeFormat::ATOM); } }