Fix errors thrown by code trying to broadcast profiles via OMB when the OMB plugin isn't installed
This commit is contained in:
parent
e530a0868d
commit
b925eeecde
10
lib/util.php
10
lib/util.php
|
@ -1501,16 +1501,18 @@ function common_enqueue_notice($notice)
|
|||
}
|
||||
|
||||
/**
|
||||
* Broadcast profile updates to remote subscribers.
|
||||
* Legacy function to broadcast profile updates to OMB remote subscribers.
|
||||
*
|
||||
* XXX: This probably needs killing, but there are several bits of code
|
||||
* that broadcast profile changes that need to be dealt with. AFAIK
|
||||
* this function is only used for OMB. -z
|
||||
*
|
||||
* Since this may be slow with a lot of subscribers or bad remote sites,
|
||||
* this is run through the background queues if possible.
|
||||
*/
|
||||
function common_broadcast_profile(Profile $profile)
|
||||
{
|
||||
$qm = QueueManager::get();
|
||||
$qm->enqueue($profile, "profile");
|
||||
return true;
|
||||
Event::handle('BroadcastProfile', array($profile));
|
||||
}
|
||||
|
||||
function common_profile_url($nickname)
|
||||
|
|
|
@ -369,6 +369,18 @@ class OMBPlugin extends Plugin
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Broadcast a profile over OMB
|
||||
*
|
||||
* @param Profile $profile to broadcast
|
||||
* @return false
|
||||
*/
|
||||
function onBroadcastProfile($profile) {
|
||||
$qm = QueueManager::get();
|
||||
$qm->enqueue($profile, "profile");
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin version info
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user