correctly return oprofile from Ostatus_profile::ensureProfileURI()
This commit is contained in:
parent
974ac48771
commit
ab88123373
@ -1770,6 +1770,13 @@ class Ostatus_profile extends Memcached_DataObject
|
|||||||
{
|
{
|
||||||
$oprofile = null;
|
$oprofile = null;
|
||||||
|
|
||||||
|
// First, try to query it
|
||||||
|
|
||||||
|
$oprofile = Ostatus_profile::staticGet('uri', $uri);
|
||||||
|
|
||||||
|
// If unfound, do discovery stuff
|
||||||
|
|
||||||
|
if (empty($oprofile)) {
|
||||||
if (preg_match("/^(\w+)\:(.*)/", $uri, $match)) {
|
if (preg_match("/^(\w+)\:(.*)/", $uri, $match)) {
|
||||||
$protocol = $match[1];
|
$protocol = $match[1];
|
||||||
switch ($protocol) {
|
switch ($protocol) {
|
||||||
@ -1787,6 +1794,8 @@ class Ostatus_profile extends Memcached_DataObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return $oprofile;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user