summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-12-16 16:17:38 -0500
committerEvan Prodromou <evan@status.net>2010-12-16 16:17:38 -0500
commit39804809dd67d72926d985f31164e6df334ee387 (patch)
treeed1168e96f5676d4d6e9cdaca62bc353c3e86a68 /classes/Notice.php
parent2e2519afee87009165c97026737f72634461e82b (diff)
distribute flag for Notice::saveNew()
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index a067cd374..d412c5f3a 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -234,6 +234,8 @@ class Notice extends Memcached_DataObject
* in place of extracting # tags from content
* array 'urls' list of attached/referred URLs to save with the
* notice in place of extracting links from content
+ * boolean 'distribute' whether to distribute the notice, default true
+ *
* @fixme tag override
*
* @return Notice
@@ -243,7 +245,8 @@ class Notice extends Memcached_DataObject
$defaults = array('uri' => null,
'url' => null,
'reply_to' => null,
- 'repeat_of' => null);
+ 'repeat_of' => null,
+ 'distribute' => true);
if (!empty($options)) {
$options = $options + $defaults;
@@ -426,8 +429,10 @@ class Notice extends Memcached_DataObject
$notice->saveUrls();
}
- // Prepare inbox delivery, may be queued to background.
- $notice->distribute();
+ if ($distribute) {
+ // Prepare inbox delivery, may be queued to background.
+ $notice->distribute();
+ }
return $notice;
}