aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Affinity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-02-14 09:56:53 +0100
committerMario <mario@mariovavti.com>2019-02-14 09:56:53 +0100
commitea541ca21b7983f7b8f17deb7452b1afed29547b (patch)
tree01cf308a30ffd43d0e60c2f9ddf884f9b30bd94c /Zotlabs/Widget/Affinity.php
parent7b8eb84cb8bf46365390b192d00e21ae587f7295 (diff)
parentfc223f59242478ea4489dad299d9e66b6b53a23a (diff)
downloadvolse-hubzilla-ea541ca21b7983f7b8f17deb7452b1afed29547b.tar.gz
volse-hubzilla-ea541ca21b7983f7b8f17deb7452b1afed29547b.tar.bz2
volse-hubzilla-ea541ca21b7983f7b8f17deb7452b1afed29547b.zip
Merge branch 'aff2' into 'dev'
affinity slider as app See merge request hubzilla/core!1449
Diffstat (limited to 'Zotlabs/Widget/Affinity.php')
-rw-r--r--Zotlabs/Widget/Affinity.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/Zotlabs/Widget/Affinity.php b/Zotlabs/Widget/Affinity.php
index 28190e187..140d8f8ca 100644
--- a/Zotlabs/Widget/Affinity.php
+++ b/Zotlabs/Widget/Affinity.php
@@ -2,20 +2,25 @@
namespace Zotlabs\Widget;
+use Zotlabs\Lib\Apps;
+
class Affinity {
function widget($arr) {
if(! local_channel())
return '';
-
- $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);
+
+// replace feature_enabled(local_channel() with
+// Apps::system_app_installed(local_channel()
+
+ $default_cmin = ((Apps::system_app_installed(local_channel(),'Affinity Tool')) ? get_pconfig(local_channel(),'affinity','cmin',0) : 0);
+ $default_cmax = ((Apps::system_app_installed(local_channel(),'Affinity Tool')) ? 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')) {
+ if(Apps::system_app_installed(local_channel(),'Affinity Tool')) {
$affinity_locked = intval(get_pconfig(local_channel(),'affinity','lock',1));
if ($affinity_locked) {