bulkDistribute won't add empty lists to database
This commit is contained in:
parent
b0416ae592
commit
912d65c767
@ -228,6 +228,10 @@ class HubSub extends Managed_DataObject
|
|||||||
*/
|
*/
|
||||||
function bulkDistribute($atom, $pushCallbacks)
|
function bulkDistribute($atom, $pushCallbacks)
|
||||||
{
|
{
|
||||||
|
if (empty($pushCallbacks)) {
|
||||||
|
common_log(LOG_ERR, 'Callback list empty for bulkDistribute.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$data = array('atom' => $atom,
|
$data = array('atom' => $atom,
|
||||||
'topic' => $this->topic,
|
'topic' => $this->topic,
|
||||||
'pushCallbacks' => $pushCallbacks);
|
'pushCallbacks' => $pushCallbacks);
|
||||||
@ -235,6 +239,7 @@ class HubSub extends Managed_DataObject
|
|||||||
count($pushCallbacks) . " sites");
|
count($pushCallbacks) . " sites");
|
||||||
$qm = QueueManager::get();
|
$qm = QueueManager::get();
|
||||||
$qm->enqueue($data, 'hubprep');
|
$qm->enqueue($data, 'hubprep');
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user