aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-29 18:01:33 -0800
committerfriendica <info@friendica.com>2013-01-29 18:01:33 -0800
commitf591526ebc9ab3a98f1e58c8e1873e76e72b0a1f (patch)
tree9beae8248be01290f28ddc587eb7908c8d1b9390 /mod
parentae91347dcd5cafcd7051036262ff81edee73095b (diff)
downloadvolse-hubzilla-f591526ebc9ab3a98f1e58c8e1873e76e72b0a1f.tar.gz
volse-hubzilla-f591526ebc9ab3a98f1e58c8e1873e76e72b0a1f.tar.bz2
volse-hubzilla-f591526ebc9ab3a98f1e58c8e1873e76e72b0a1f.zip
missing permission settings
Diffstat (limited to 'mod')
-rw-r--r--mod/settings.php25
1 files changed, 17 insertions, 8 deletions
diff --git a/mod/settings.php b/mod/settings.php
index c1380e159..533800784 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -115,10 +115,10 @@ function settings_post(&$a) {
return;
- if(count($a->user) && x($a->user,'uid') && $a->user['uid'] != local_user()) {
- notice( t('Permission denied.') . EOL);
- return;
- }
+// if(count($a->user) && x($a->user,'uid') && $a->user['uid'] != local_user()) {
+// notice( t('Permission denied.') . EOL);
+// return;
+// }
$old_page_flags = $a->user['page-flags'];
@@ -366,9 +366,10 @@ function settings_post(&$a) {
$arr['channel_w_photos'] = (($_POST['post_photos']) ? $_POST['post_photos'] : 0);
$arr['channel_w_chat'] = (($_POST['chat']) ? $_POST['chat'] : 0);
$arr['channel_a_delegate'] = (($_POST['delegate']) ? $_POST['delegate'] : 0);
- $arr['channel_r_storage'] = (($_POST['view_storage']) ? $_POST['view_storage'] : 0);
- $arr['channel_w_storage'] = (($_POST['write_storage']) ? $_POST['write_storage'] : 0);
-
+ $arr['channel_r_storage'] = (($_POST['view_storage']) ? $_POST['view_storage'] : 0);
+ $arr['channel_w_storage'] = (($_POST['write_storage']) ? $_POST['write_storage'] : 0);
+ $arr['channel_r_pages'] = (($_POST['view_pages']) ? $_POST['view_pages'] : 0);
+ $arr['channel_w_pages'] = (($_POST['write_pages']) ? $_POST['write_pages'] : 0);
$defperms = 0;
if(x($_POST['def_view_stream']))
@@ -399,6 +400,10 @@ function settings_post(&$a) {
$defperms += $_POST['def_view_storage'];
if(x($_POST['def_write_storage']))
$defperms += $_POST['def_write_storage'];
+ if(x($_POST['def_view_pages']))
+ $defperms += $_POST['def_view_pages'];
+ if(x($_POST['def_write_pages']))
+ $defperms += $_POST['def_write_pages'];
$notify = 0;
@@ -497,7 +502,7 @@ function settings_post(&$a) {
);
*/
- $r = q("update channel set channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d where channel_id = %d limit 1",
+ $r = q("update channel set channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1",
intval($arr['channel_r_stream']),
intval($arr['channel_r_profile']),
intval($arr['channel_r_photos']),
@@ -510,6 +515,10 @@ function settings_post(&$a) {
intval($arr['channel_w_photos']),
intval($arr['channel_w_chat']),
intval($arr['channel_a_delegate']),
+ intval($arr['channel_r_storage']),
+ intval($arr['channel_w_storage']),
+ intval($arr['channel_r_pages']),
+ intval($arr['channel_w_pages']),
intval(local_user())
);