コード例 #1
0
 function handle($profile)
 {
     if (!$profile instanceof Profile) {
         common_log(LOG_ERR, "Got a bogus profile, not broadcasting");
         return true;
     }
     if (Event::handle('StartBroadcastProfile', array($profile))) {
         require_once INSTALLDIR . '/lib/omb.php';
         try {
             omb_broadcast_profile($profile);
         } catch (Exception $e) {
             common_log(LOG_ERR, "Failed sending OMB profiles: " . $e->getMessage());
         }
     }
     Event::handle('EndBroadcastProfile', array($profile));
     return true;
 }
コード例 #2
0
ファイル: util.php プロジェクト: Br3nda/laconica
function common_broadcast_profile($profile)
{
    // XXX: optionally use a queue system like http://code.google.com/p/microapps/wiki/NQDQ
    require_once INSTALLDIR . '/lib/omb.php';
    omb_broadcast_profile($profile);
    // XXX: Other broadcasts...?
    return true;
}