From a8dd7280b33008d5100b6d8020640673abf5a78a Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Aug 2013 22:52:19 -0700 Subject: get rid of more variables with dashes in the names - use underscore *except* in CSS. These were probably already here, but if you see any - please keep them out of PHP and MySQL where they sometimes get interpreted as a subtraction operation and are a bugger to find. --- mod/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index c39286ebc..50bb13ea2 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -783,7 +783,7 @@ function settings_content(&$a) { $default_theme = get_config('system','theme'); if(! $default_theme) $default_theme = 'default'; - $default_mobile_theme = get_config('system','mobile-theme'); + $default_mobile_theme = get_config('system','mobile_theme'); if(! $mobile_default_theme) $mobile_default_theme = 'none'; @@ -817,7 +817,7 @@ function settings_content(&$a) { } } $theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']); - $mobile_theme_selected = (!x($_SESSION,'mobile-theme')? $default_mobile_theme : $_SESSION['mobile-theme']); + $mobile_theme_selected = (!x($_SESSION,'mobile_theme')? $default_mobile_theme : $_SESSION['mobile_theme']); $browser_update = intval(get_pconfig(local_user(), 'system','update_interval')); $browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds -- cgit v1.2.3 From 20f3d097080fde4315b25523fe29b129cdd7034c Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 18 Aug 2013 20:20:03 -0700 Subject: some sane permission defaults. --- mod/settings.php | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 50bb13ea2..36befead1 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -349,22 +349,23 @@ function settings_post(&$a) { $post_joingroup = (($_POST['post_joingroup'] == 1) ? 1: 0); $post_profilechange = (($_POST['post_profilechange'] == 1) ? 1: 0); + $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_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); $defperms = 0; -- cgit v1.2.3 From af72f40759418275abae575176f43d27388bfcd6 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 22 Aug 2013 01:00:54 -0700 Subject: make premium channels a feature --- mod/settings.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 36befead1..2a3a64581 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -31,6 +31,8 @@ function settings_aside(&$a) { $a->argv[] = 'channel'; } + $channel = $a->get_channel(); + $abook_self_id = 0; // Retrieve the 'self' address book entry for use in the auto-permissions link @@ -101,6 +103,17 @@ function settings_aside(&$a) { ); + + if(feature_enabled(local_user(),'premium_channel')) { + $tabs[] = array( + 'label' => t('Premium Channel Settings'), + 'url' => $a->get_baseurl(true) . '/connect/' . $channel['channel_address'], + 'selected' => '' + ); + + } + + $tabtpl = get_markup_template("generic_links_widget.tpl"); $a->page['aside'] = replace_macros($tabtpl, array( -- cgit v1.2.3