diff options
author | zotlabs <mike@macgirvin.com> | 2018-12-17 18:45:42 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-12-17 18:45:42 -0800 |
commit | 15ce8bc79b219e10f709796c09c739649a8df53b (patch) | |
tree | edd456a39ad0daf12d6cc4409a99477f4fb38d82 /Zotlabs/Module/Settings/Featured.php | |
parent | 8d70b919551f6f6462e639f7cfffda9825344e43 (diff) | |
parent | d190b1995b0886b430beb5dac1a1e72582b9ad2b (diff) | |
download | volse-hubzilla-15ce8bc79b219e10f709796c09c739649a8df53b.tar.gz volse-hubzilla-15ce8bc79b219e10f709796c09c739649a8df53b.tar.bz2 volse-hubzilla-15ce8bc79b219e10f709796c09c739649a8df53b.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'Zotlabs/Module/Settings/Featured.php')
-rw-r--r-- | Zotlabs/Module/Settings/Featured.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Zotlabs/Module/Settings/Featured.php b/Zotlabs/Module/Settings/Featured.php index 542a05363..1d903fcf7 100644 --- a/Zotlabs/Module/Settings/Featured.php +++ b/Zotlabs/Module/Settings/Featured.php @@ -17,8 +17,12 @@ class Featured { $cmin = intval($_POST['affinity_cmin']); if($cmin < 0 || $cmin > 99) $cmin = 0; + + $lock = ($_POST['affinity_lock']) ? intval($_POST['affinity_lock']) : 1; + set_pconfig(local_channel(),'affinity','cmin',$cmin); set_pconfig(local_channel(),'affinity','cmax',$cmax); + set_pconfig(local_channel(),'affinity','lock',$lock); info( t('Affinity Slider settings updated.') . EOL); @@ -49,6 +53,10 @@ class Featured { $setting_fields .= replace_macros(get_markup_template('field_input.tpl'), array( '$field' => array('affinity_cmin', t('Default minimum affinity level'), $cmin, t('0-99 - default 0')) )); + $lock = intval(get_pconfig(local_channel(),'affinity','lock',1)); + $setting_fields .= replace_macros(get_markup_template('field_checkbox.tpl'), array( + '$field' => array('affinity_lock', t('Always reset on new page visit.'), $lock, t('default: yes'), Array('No','Yes')) + )); $settings_addons .= replace_macros(get_markup_template('generic_addon_settings.tpl'), array( '$addon' => array('affinity_slider', '' . t('Affinity Slider Settings'), '', t('Submit')), |