X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=e3b94a8c9a4b82baff98bdfc58521123d3dab145;hb=630c808319f16ce6704ffb1b7b6c8cf5592c99c7;hp=18c76587c04bc51c1d307b92c5ac6e69432834a2;hpb=b85490515016aad50e0fe73c1174949a1f72d3c3;p=friendica.git diff --git a/boot.php b/boot.php index 18c76587c0..e3b94a8c9a 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 +874,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 +930,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 +1151,14 @@ function feed_birthday($uid, $tz) if (DBM::is_result($p)) { $tmp_dob = substr($p[0]['dob'], 5); if (intval($tmp_dob)) { - $y = Temporal::convert('now', $tz, $tz, 'Y'); + $y = DateTimeFormat::timezoneNow($tz, 'Y'); $bd = $y . '-' . $tmp_dob . ' 00:00'; $t_dob = strtotime($bd); - $now = strtotime(Temporal::convert('now', $tz, $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); } }