summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-09-21 14:14:55 -0400
committerEvan Prodromou <evan@status.net>2009-09-21 14:14:55 -0400
commit5b91223ce4ece508b25397dc00e1d04ef2e1bc28 (patch)
treecfd9c5505cee58afeb5a130e38e0961602ef5cdf /lib
parent3c89d31b1883e478d69a121905e5a9a400a17622 (diff)
add a hook at point of enqueuing notices
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php
index d9ff8b863..eb247562d 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -915,11 +915,16 @@ function common_enqueue_notice($notice)
}
}
- $qm = QueueManager::get();
+ if (Event::handle('StartEnqueueNotice', array($notice, &$transports))) {
- foreach ($transports as $transport)
- {
- $qm->enqueue($notice, $transport);
+ $qm = QueueManager::get();
+
+ foreach ($transports as $transport)
+ {
+ $qm->enqueue($notice, $transport);
+ }
+
+ Event::handle('EndEnqueueNotice', array($notice, $transports));
}
return true;
@@ -1384,7 +1389,7 @@ function common_shorten_url($long_url)
}
$reflectionObj = new ReflectionClass($_shorteners[$svc]['callInfo'][0]);
- $short_url_service = $reflectionObj->newInstanceArgs($_shorteners[$svc]['callInfo'][1]);
+ $short_url_service = $reflectionObj->newInstanceArgs($_shorteners[$svc]['callInfo'][1]);
$short_url = $short_url_service->shorten($long_url);
if(substr($short_url,0,7)=='http://'){