diff options
author | friendica <info@friendica.com> | 2015-01-01 22:33:28 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-01 22:33:28 -0800 |
commit | 82d0a4af452015e870bdcea56f1008ea22d066b3 (patch) | |
tree | 3ad1db1aeb0dfdeb10a70b99da353fe3094f1d69 /mod | |
parent | 9a34e18319301e0a952f674899aeb58b424637a4 (diff) | |
parent | 68c612c597471404201099ecbc8b4082d152e18a (diff) | |
download | volse-hubzilla-82d0a4af452015e870bdcea56f1008ea22d066b3.tar.gz volse-hubzilla-82d0a4af452015e870bdcea56f1008ea22d066b3.tar.bz2 volse-hubzilla-82d0a4af452015e870bdcea56f1008ea22d066b3.zip |
Merge branch 'master' into trinidad
Diffstat (limited to 'mod')
-rw-r--r-- | mod/item.php | 8 | ||||
-rw-r--r-- | mod/new_channel.php | 7 | ||||
-rw-r--r-- | mod/profiles.php | 13 | ||||
-rw-r--r-- | mod/settings.php | 28 | ||||
-rwxr-xr-x | mod/setup.php | 2 |
5 files changed, 30 insertions, 28 deletions
diff --git a/mod/item.php b/mod/item.php index f5a9a4b22..894e23a0f 100644 --- a/mod/item.php +++ b/mod/item.php @@ -470,11 +470,13 @@ function item_post(&$a) { require_once('include/text.php'); if($uid && $uid == $profile_uid && feature_enabled($uid,'markdown')) { - require_once('include/bb2diaspora.php'); - $body = diaspora2bb(escape_tags($body),true); + require_once('include/bb2diaspora.php'); + $body = escape_tags($body); + $body = preg_replace_callback('/\[share(.*?)\]/ism','share_shield',$body); + $body = diaspora2bb($body,true); + $body = preg_replace_callback('/\[share(.*?)\]/ism','share_unshield',$body); } - // BBCODE alert: the following functions assume bbcode input // and will require alternatives for alternative content-types (text/html, text/markdown, text/plain, etc.) // we may need virtual or template classes to implement the possible alternatives diff --git a/mod/new_channel.php b/mod/new_channel.php index 185fc7c28..047048f0a 100644 --- a/mod/new_channel.php +++ b/mod/new_channel.php @@ -115,11 +115,8 @@ function new_channel_content(&$a) { '$nick_desc' => t('Your nickname will be used to create an easily remembered channel address (like an email address) which you can share with others.'), '$label_import' => t('Or <a href="import">import an existing channel</a> from another location'), '$name' => $name, - '$label_role' => t('Channel Type'), - '$questionmark' => t('?'), - '$what_is_role' => t('What is this?'), - '$help_role' => t('Please choose a channel type (such as social networking or community forum) and privacy requirements so we can select the best permissions for you'), - '$role_select' => role_selector(($privacy_role) ? $privacy_role : 'social'), + '$help_role' => t('Please choose a channel type (such as social networking or community forum) and privacy requirements so we can select the best permissions for you'), + '$role' => array('permissions_role' , t('Channel Type'), ($privacy_role) ? $privacy_role : 'social', '<a href="help/roles" target="_blank">'.t('Read more about roles').'</a>',get_roles()), '$nickname' => $nickname, '$submit' => t('Create') )); diff --git a/mod/profiles.php b/mod/profiles.php index f2695f332..6bdc7f11a 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -596,13 +596,12 @@ function profiles_content(&$a) { $opt_tpl = get_markup_template("profile_hide_friends.tpl"); - $hide_friends = replace_macros($opt_tpl,array( - '$desc' => t('Hide your contact/friend list from viewers of this profile?'), - '$yes_str' => t('Yes'), - '$no_str' => t('No'), - '$yes_selected' => (($r[0]['hide_friends']) ? " checked=\"checked\" " : ""), - '$no_selected' => (($r[0]['hide_friends'] == 0) ? " checked=\"checked\" " : "") - )); + $hide_friends = replace_macros($opt_tpl,array('$field' => array( + 'hide-friends', + t('Hide your contact/friend list from viewers of this profile?'), + $r[0]['hide_friends'], + '', + ))); $q = q("select * from profdef where true"); if($q) { diff --git a/mod/settings.php b/mod/settings.php index be6f2cfb9..59ce98a2a 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -122,10 +122,19 @@ function settings_post(&$a) { if((argc() > 1) && (argv(1) === 'features')) { check_form_security_token_redirectOnErr('/settings/features', 'settings_features'); - foreach($_POST as $k => $v) { - if(strpos($k,'feature_') === 0) { - set_pconfig(local_user(),'feature',substr($k,8),((intval($v)) ? 1 : 0)); - } + + // Build list of features and check which are set + $features = get_features(); + $all_features = array(); + foreach($features as $k => $v) { + foreach($v as $f) + $all_features[] = $f[0]; + } + foreach($all_features as $k) { + if(x($_POST,"feature_$k")) + set_pconfig(local_user(),'feature',$k, 1); + else + set_pconfig(local_user(),'feature',$k, 0); } build_sync_packet(); return; @@ -707,7 +716,6 @@ function settings_content(&$a) { '$title' => t('Additional Features'), '$features' => $arr, '$submit' => t('Submit'), - '$field_yesno' => 'field_yesno.tpl', )); return $o; @@ -938,7 +946,7 @@ function settings_content(&$a) { $timezone = date_default_timezone_get(); - $opt_tpl = get_markup_template("field_yesno.tpl"); + $opt_tpl = get_markup_template("field_checkbox.tpl"); if(get_config('system','publish_all')) { $profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />'; } @@ -1010,12 +1018,10 @@ function settings_content(&$a) { '$uid' => local_user(), '$form_security_token' => get_form_security_token("settings"), '$nickname_block' => $prof_addr, - - '$h_basic' => t('Basic Settings'), '$username' => array('username', t('Full Name:'), $username,''), '$email' => array('email', t('Email Address:'), $email, ''), - '$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''), + '$timezone' => array('timezone_select' , t('Your Timezone:'), $timezone, '', get_timezones()), '$defloc' => array('defloc', t('Default Post Location:'), $defloc, t('Geographical location to display on your posts')), '$allowloc' => array('allow_location', t('Use Browser Location:'), ((get_pconfig(local_user(),'system','use_browser_location')) ? 1 : ''), ''), @@ -1044,9 +1050,7 @@ function settings_content(&$a) { '$aclselect' => populate_acl($perm_defaults,false), '$suggestme' => $suggestme, '$group_select' => $group_select, - '$role_lbl' => t('Channel permissions category:'), - - '$role_select' => role_selector($permissions_role), + '$role' => array('permissions_role' , t('Channel permissions category:'), $permissions_role, '', get_roles()), '$profile_in_dir' => $profile_in_dir, '$hide_friends' => $hide_friends, diff --git a/mod/setup.php b/mod/setup.php index 044def15a..6f2c7c074 100755 --- a/mod/setup.php +++ b/mod/setup.php @@ -349,7 +349,7 @@ function setup_content(&$a) { '$siteurl' => array('siteurl', t('Website URL'), z_root(), t('Please use SSL (https) URL if available.')), - '$timezone' => field_timezone('timezone', t('Please select a default timezone for your website'), $timezone, ''), + '$timezone' => array('timezone', t('Please select a default timezone for your website'), $timezone, '', get_timezones()), '$baseurl' => $a->get_baseurl(), |