forked from GNUsocial/gnu-social
Quick-return is more comprehensible than long if statements
This commit is contained in:
parent
f7479e3f57
commit
2cd25039af
@ -303,7 +303,9 @@ class Ostatus_profile extends Managed_DataObject
|
|||||||
if ($object == null) {
|
if ($object == null) {
|
||||||
$object = $this;
|
$object = $this;
|
||||||
}
|
}
|
||||||
if ($this->salmonuri) {
|
if (empty($this->salmonuri)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$text = 'update';
|
$text = 'update';
|
||||||
$id = TagURI::mint('%s:%s:%s',
|
$id = TagURI::mint('%s:%s:%s',
|
||||||
$verb,
|
$verb,
|
||||||
@ -338,10 +340,8 @@ class Ostatus_profile extends Managed_DataObject
|
|||||||
$xml = $entry->getString();
|
$xml = $entry->getString();
|
||||||
common_log(LOG_INFO, "Posting to Salmon endpoint $this->salmonuri: $xml");
|
common_log(LOG_INFO, "Posting to Salmon endpoint $this->salmonuri: $xml");
|
||||||
|
|
||||||
$salmon = new Salmon(); // ?
|
$salmon = new Salmon();
|
||||||
return $salmon->post($this->salmonuri, $xml, $actor);
|
$salmon->post($this->salmonuri, $xml, $actor);
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user