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) {
|
||||
$object = $this;
|
||||
}
|
||||
if ($this->salmonuri) {
|
||||
if (empty($this->salmonuri)) {
|
||||
return false;
|
||||
}
|
||||
$text = 'update';
|
||||
$id = TagURI::mint('%s:%s:%s',
|
||||
$verb,
|
||||
@ -338,10 +340,8 @@ class Ostatus_profile extends Managed_DataObject
|
||||
$xml = $entry->getString();
|
||||
common_log(LOG_INFO, "Posting to Salmon endpoint $this->salmonuri: $xml");
|
||||
|
||||
$salmon = new Salmon(); // ?
|
||||
return $salmon->post($this->salmonuri, $xml, $actor);
|
||||
}
|
||||
return false;
|
||||
$salmon = new Salmon();
|
||||
$salmon->post($this->salmonuri, $xml, $actor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user