aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-30 21:49:26 -0700
committerfriendica <info@friendica.com>2013-09-30 21:49:26 -0700
commitdffce63662c54db7ebb61786d39db6a900d1381f (patch)
tree88004c4a8362f4ee77bf670207076f76d876eb84 /mod
parent2353e6d23f54902d3b2b9e3fd46f1baa6e803450 (diff)
downloadvolse-hubzilla-dffce63662c54db7ebb61786d39db6a900d1381f.tar.gz
volse-hubzilla-dffce63662c54db7ebb61786d39db6a900d1381f.tar.bz2
volse-hubzilla-dffce63662c54db7ebb61786d39db6a900d1381f.zip
implement republish permission for use in sourced channels
Diffstat (limited to 'mod')
-rw-r--r--mod/settings.php40
1 files changed, 22 insertions, 18 deletions
diff --git a/mod/settings.php b/mod/settings.php
index cc8fd2564..ba2323873 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -377,23 +377,24 @@ function settings_post(&$a) {
$pageflags = ($pageflags ^ PAGE_ADULT);
$arr = array();
- $arr['channel_r_stream'] = (($_POST['view_stream']) ? $_POST['view_stream'] : 0);
- $arr['channel_r_profile'] = (($_POST['view_profile']) ? $_POST['view_profile'] : 0);
- $arr['channel_r_photos'] = (($_POST['view_photos']) ? $_POST['view_photos'] : 0);
- $arr['channel_r_abook'] = (($_POST['view_contacts']) ? $_POST['view_contacts'] : 0);
- $arr['channel_w_stream'] = (($_POST['send_stream']) ? $_POST['send_stream'] : 0);
- $arr['channel_w_wall'] = (($_POST['post_wall']) ? $_POST['post_wall'] : 0);
- $arr['channel_w_tagwall'] = (($_POST['tag_deliver']) ? $_POST['tag_deliver'] : 0);
- $arr['channel_w_comment'] = (($_POST['post_comments']) ? $_POST['post_comments'] : 0);
- $arr['channel_w_mail'] = (($_POST['post_mail']) ? $_POST['post_mail'] : 0);
- $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_pages'] = (($_POST['view_pages']) ? $_POST['view_pages'] : 0);
- $arr['channel_w_pages'] = (($_POST['write_pages']) ? $_POST['write_pages'] : 0);
-
+ $arr['channel_r_stream'] = (($_POST['view_stream']) ? $_POST['view_stream'] : 0);
+ $arr['channel_r_profile'] = (($_POST['view_profile']) ? $_POST['view_profile'] : 0);
+ $arr['channel_r_photos'] = (($_POST['view_photos']) ? $_POST['view_photos'] : 0);
+ $arr['channel_r_abook'] = (($_POST['view_contacts']) ? $_POST['view_contacts'] : 0);
+ $arr['channel_w_stream'] = (($_POST['send_stream']) ? $_POST['send_stream'] : 0);
+ $arr['channel_w_wall'] = (($_POST['post_wall']) ? $_POST['post_wall'] : 0);
+ $arr['channel_w_tagwall'] = (($_POST['tag_deliver']) ? $_POST['tag_deliver'] : 0);
+ $arr['channel_w_comment'] = (($_POST['post_comments']) ? $_POST['post_comments'] : 0);
+ $arr['channel_w_mail'] = (($_POST['post_mail']) ? $_POST['post_mail'] : 0);
+ $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_pages'] = (($_POST['view_pages']) ? $_POST['view_pages'] : 0);
+ $arr['channel_w_pages'] = (($_POST['write_pages']) ? $_POST['write_pages'] : 0);
+ $arr['channel_a_republish'] = (($_POST['republish']) ? $_POST['republish'] : 0);
+
$defperms = 0;
if(x($_POST['def_view_stream']))
$defperms += $_POST['def_view_stream'];
@@ -427,6 +428,8 @@ function settings_post(&$a) {
$defperms += $_POST['def_view_pages'];
if(x($_POST['def_write_pages']))
$defperms += $_POST['def_write_pages'];
+ if(x($_POST['def_republish']))
+ $defperms += $_POST['def_republish'];
$notify = 0;
@@ -531,7 +534,7 @@ function settings_post(&$a) {
);
*/
- $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, 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",
+ $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, 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, channel_a_republish = %d where channel_id = %d limit 1",
dbesc($username),
intval($pageflags),
dbesc($timezone),
@@ -556,6 +559,7 @@ function settings_post(&$a) {
intval($arr['channel_w_storage']),
intval($arr['channel_r_pages']),
intval($arr['channel_w_pages']),
+ intval($arr['channel_a_republish']),
intval(local_user())
);