From eb41d9e5da6a9d1e9b31ca017b5534eb6bd25b32 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 21 Sep 2009 14:23:35 -0400 Subject: [PATCH] add a hook for the unqueuemanager --- EVENTS.txt | 4 ++++ lib/unqueuemanager.php | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/EVENTS.txt b/EVENTS.txt index 64c3c08c7c..56f91f87a4 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -261,3 +261,7 @@ StartEnqueueNotice: about to add a notice to the queues (good place to add a new EndEnqueueNotice: after adding a notice to the queues - $notice: the notice being added - $transports: modifiable list of transports to use + +UnqueueHandleNotice: Handle a notice when no queue manager is available +- $notice: the notice to handle +- $queue: the "queue" that is being executed \ No newline at end of file diff --git a/lib/unqueuemanager.php b/lib/unqueuemanager.php index c5dc29d386..269ecdeaa0 100644 --- a/lib/unqueuemanager.php +++ b/lib/unqueuemanager.php @@ -73,7 +73,9 @@ class UnQueueManager jabber_broadcast_notice($notice); break; default: - throw ServerException("UnQueueManager: Unknown queue: $type"); + if (Event::handle('UnqueueHandleNotice', array(&$notice, $queue))) { + throw ServerException("UnQueueManager: Unknown queue: $queue"); + } } }