]> git.mxchange.org Git - friendica.git/commitdiff
Remove last on/off data occurrences in additional features
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 1 Mar 2020 19:15:08 +0000 (14:15 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 1 Mar 2020 19:15:08 +0000 (14:15 -0500)
- Address https://github.com/friendica/friendica/issues/7999#issuecomment-589808923

mod/settings.php
src/Module/Admin/Features.php

index fcbd8208d497b8486d731d02190ca41eb57f6979..3bc0b20a6de07a56fe8bbec81dbb2ee590a62bed 100644 (file)
@@ -27,7 +27,6 @@ use Friendica\Core\ACL;
 use Friendica\Core\Hook;
 use Friendica\Core\Logger;
 use Friendica\Core\Renderer;
-use Friendica\Core\Theme;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
 use Friendica\DI;
@@ -597,7 +596,7 @@ function settings_content(App $a)
                        $arr[$fname] = [];
                        $arr[$fname][0] = $fdata[0];
                        foreach (array_slice($fdata,1) as $f) {
-                               $arr[$fname][1][] = ['feature_' .$f[0], $f[1],((intval(Feature::isEnabled(local_user(), $f[0]))) ? "1" : ''), $f[2],[DI::l10n()->t('Off'), DI::l10n()->t('On')]];
+                               $arr[$fname][1][] = ['feature_' . $f[0], $f[1], Feature::isEnabled(local_user(), $f[0]), $f[2]];
                        }
                }
 
index 62136f4235d15f7c97a2a618be9a0d5a3e4bb515..46c0a1384e780cde53b573df6c3b523f3a5b1c41 100644 (file)
@@ -73,8 +73,8 @@ class Features extends BaseAdmin
                        foreach (array_slice($fdata, 1) as $f) {
                                $set = DI::config()->get('feature', $f[0], $f[3]);
                                $arr[$fname][1][] = [
-                                       ['feature_' . $f[0], $f[1], $set, $f[2], [DI::l10n()->t('Off'), DI::l10n()->t('On')]],
-                                       ['featurelock_' . $f[0], DI::l10n()->t('Lock feature %s', $f[1]), (($f[4] !== false) ? "1" : ''), '', [DI::l10n()->t('Off'), DI::l10n()->t('On')]]
+                                       ['feature_' . $f[0], $f[1], $set, $f[2]],
+                                       ['featurelock_' . $f[0], DI::l10n()->t('Lock feature %s', $f[1]), $f[4], '']
                                ];
                        }
                }