diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-01-02 22:14:31 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-01-02 22:14:31 +0100 |
commit | f826c09abc48a522c1a27b44a3fda1e337d90a1a (patch) | |
tree | f53302b072bae510e4d07d72c89b4238614df458 /Zotlabs/Widget/Affinity.php | |
parent | e418a6b3d498cb237bd8f6dd01f40fe57d4a868d (diff) | |
parent | 3bd7133ba32d758df935a566c45515a530b35538 (diff) | |
download | volse-hubzilla-f826c09abc48a522c1a27b44a3fda1e337d90a1a.tar.gz volse-hubzilla-f826c09abc48a522c1a27b44a3fda1e337d90a1a.tar.bz2 volse-hubzilla-f826c09abc48a522c1a27b44a3fda1e337d90a1a.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Widget/Affinity.php')
-rw-r--r-- | Zotlabs/Widget/Affinity.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Zotlabs/Widget/Affinity.php b/Zotlabs/Widget/Affinity.php index 439ba1f33..4fb2874ae 100644 --- a/Zotlabs/Widget/Affinity.php +++ b/Zotlabs/Widget/Affinity.php @@ -9,15 +9,11 @@ class Affinity { if(! local_channel()) return ''; - // Get default cmin value from pconfig, but allow GET parameter to override - $cmin = intval(get_pconfig(local_channel(),'affinity','cmin')); - $cmin = (($cmin) ? $cmin : 0); - $cmin = ((x($_REQUEST,'cmin')) ? intval($_REQUEST['cmin']) : $cmin); - - // Get default cmax value from pconfig, but allow GET parameter to override - $cmax = intval(get_pconfig(local_channel(),'affinity','cmax')); - $cmax = (($cmax) ? $cmax : 99); - $cmax = ((x($_REQUEST,'cmax')) ? intval($_REQUEST['cmax']) : $cmax); + $default_cmin = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmin',0) : 0); + $default_cmax = ((feature_enabled(local_channel(),'affinity')) ? get_pconfig(local_channel(),'affinity','cmax',99) : 99); + + $cmin = ((x($_REQUEST,'cmin')) ? intval($_REQUEST['cmin']) : $default_cmin); + $cmax = ((x($_REQUEST,'cmax')) ? intval($_REQUEST['cmax']) : $default_cmax); if(feature_enabled(local_channel(),'affinity')) { |