Add no_update flag to speed up Contact::getIdForURL instances
This commit is contained in:
4
boot.php
4
boot.php
@@ -925,10 +925,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;
|
||||
|
||||
Reference in New Issue
Block a user