aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Affinity.php
diff options
context:
space:
mode:
authorDM42.Net (Matt Dent) <dentm42@dm42.net>2018-12-14 12:52:58 -0500
committerDM42.Net (Matt Dent) <dentm42@dm42.net>2018-12-14 12:55:49 -0500
commiteb297104debfc42fe6f3afee4eae3c2602627aeb (patch)
treee4122dfa9269c6769bd867cfcc6ee1fc4dff022a /Zotlabs/Widget/Affinity.php
parentf81a3ba45d50c0a0e4da68c17aba73425058e23d (diff)
downloadvolse-hubzilla-eb297104debfc42fe6f3afee4eae3c2602627aeb.tar.gz
volse-hubzilla-eb297104debfc42fe6f3afee4eae3c2602627aeb.tar.bz2
volse-hubzilla-eb297104debfc42fe6f3afee4eae3c2602627aeb.zip
Make Affinity Slider (optionally) 'sticky' across page loads. (default is current behavior: reset slider with each page load)
Diffstat (limited to 'Zotlabs/Widget/Affinity.php')
-rw-r--r--Zotlabs/Widget/Affinity.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/Zotlabs/Widget/Affinity.php b/Zotlabs/Widget/Affinity.php
index 4fb2874ae..e9dac6b27 100644
--- a/Zotlabs/Widget/Affinity.php
+++ b/Zotlabs/Widget/Affinity.php
@@ -15,9 +15,14 @@ class Affinity {
$cmin = ((x($_REQUEST,'cmin')) ? intval($_REQUEST['cmin']) : $default_cmin);
$cmax = ((x($_REQUEST,'cmax')) ? intval($_REQUEST['cmax']) : $default_cmax);
-
if(feature_enabled(local_channel(),'affinity')) {
+ $affinity_locked = int(get_pconfig(local_channel(),'affinity','lock',1));
+ if ($affinity_locked) {
+ set_pconfig(local_channel(),'affinity','cmin',$cmin);
+ set_pconfig(local_channel(),'affinity','cmax',$cmax);
+ }
+
$labels = array(
t('Me'),
t('Family'),
@@ -53,4 +58,4 @@ class Affinity {
return '';
}
}
- \ No newline at end of file
+