]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Admin/Features.php
Remove join profile table
[friendica.git] / src / Module / Admin / Features.php
index 7cc7932af8f0bc3af8e4bd9704a159c97ef08b0f..5e1c3df20eaeecc4155853844b7e6a43fe921812 100644 (file)
@@ -3,13 +3,11 @@
 namespace Friendica\Module\Admin;
 
 use Friendica\Content\Feature;
-use Friendica\Core\Config;
-use Friendica\Core\L10n;
 use Friendica\Core\Renderer;
 use Friendica\DI;
-use Friendica\Module\BaseAdminModule;
+use Friendica\Module\BaseAdmin;
 
-class Features extends BaseAdminModule
+class Features extends BaseAdmin
 {
        public static function post(array $parameters = [])
        {
@@ -30,12 +28,12 @@ class Features extends BaseAdminModule
                                } else {
                                        $val = 0;
                                }
-                               Config::set('feature', $feature, $val);
+                               DI::config()->set('feature', $feature, $val);
 
                                if (!empty($_POST[$featurelock])) {
-                                       Config::set('feature_lock', $feature, $val);
+                                       DI::config()->set('feature_lock', $feature, $val);
                                } else {
-                                       Config::delete('feature_lock', $feature);
+                                       DI::config()->delete('feature_lock', $feature);
                                }
                        }
                }
@@ -54,10 +52,10 @@ class Features extends BaseAdminModule
                        $arr[$fname] = [];
                        $arr[$fname][0] = $fdata[0];
                        foreach (array_slice($fdata, 1) as $f) {
-                               $set = Config::get('feature', $f[0], $f[3]);
+                               $set = DI::config()->get('feature', $f[0], $f[3]);
                                $arr[$fname][1][] = [
-                                       ['feature_' . $f[0], $f[1], $set, $f[2], [L10n::t('Off'), L10n::t('On')]],
-                                       ['featurelock_' . $f[0], L10n::t('Lock feature %s', $f[1]), (($f[4] !== false) ? "1" : ''), '', [L10n::t('Off'), L10n::t('On')]]
+                                       ['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')]]
                                ];
                        }
                }
@@ -65,9 +63,9 @@ class Features extends BaseAdminModule
                $tpl = Renderer::getMarkupTemplate('admin/features.tpl');
                $o = Renderer::replaceMacros($tpl, [
                        '$form_security_token' => parent::getFormSecurityToken("admin_manage_features"),
-                       '$title' => L10n::t('Manage Additional Features'),
+                       '$title' => DI::l10n()->t('Manage Additional Features'),
                        '$features' => $arr,
-                       '$submit' => L10n::t('Save Settings'),
+                       '$submit' => DI::l10n()->t('Save Settings'),
                ]);
 
                return $o;