aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/widgets.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-23 10:29:43 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-23 10:29:43 +0000
commitabf321f2fb25d1750c96a67807bcda84a63ba497 (patch)
treeb5adddfd4456b707a35b8c35acb3782ecfe5bce0 /engine/lib/widgets.php
parentba23d8e106d4652e229d1839ec2dd13cf4daaad9 (diff)
downloadelgg-abf321f2fb25d1750c96a67807bcda84a63ba497.tar.gz
elgg-abf321f2fb25d1750c96a67807bcda84a63ba497.tar.bz2
Added site default access permissions. Refs #744
git-svn-id: https://code.elgg.org/elgg/trunk@2885 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/widgets.php')
-rw-r--r--engine/lib/widgets.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php
index 2660cc240..a455f8068 100644
--- a/engine/lib/widgets.php
+++ b/engine/lib/widgets.php
@@ -232,8 +232,12 @@
$widget = new ElggWidget;
$widget->owner_guid = $user_guid;
- $widget->access_id = ACCESS_LOGGED_IN;
- if (!$widget->save())
+ $widget->access_id = get_default_access();
+ // private widgets don't makes sense, correct?
+ if ($widget->access_id == ACCESS_PRIVATE)
+ $widget->access_id = ACCESS_LOGGED_IN; // change to ACCESS_FRIENDS when implemented
+
+ if (!$widget->save())
return false;
$widget->handler = $handler;