summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-11 11:29:51 -0500
committerEvan Prodromou <evan@status.net>2009-12-11 11:29:51 -0500
commit79f81ad76d413908c097c121912eff233aebc483 (patch)
treeef94cd25d824b90a8b3b46c2b0c9b76d1ca7153a /classes/Notice.php
parent85473ecf94e92cd0e6503e4d27ea26452076aafd (diff)
change Notice::saveNew() to use named arguments for little-used options
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index c36c5a9c6..4422866fa 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -167,9 +167,18 @@ class Notice extends Memcached_DataObject
}
}
- static function saveNew($profile_id, $content, $source=null,
- $is_local=Notice::LOCAL_PUBLIC, $reply_to=null, $uri=null, $created=null,
- $lat=null, $lon=null, $location_id=null, $location_ns=null) {
+ static function saveNew($profile_id, $content, $source, $options=null) {
+
+ if (!empty($options)) {
+ extract($options);
+ if (!isset($reply_to)) {
+ $reply_to = NULL;
+ }
+ }
+
+ if (empty($is_local)) {
+ $is_local = Notice::LOCAL_PUBLIC;
+ }
$profile = Profile::staticGet($profile_id);