Features to src

Move Features to class in Friendica\Content namespace. Update function calls and references.
This commit is contained in:
Adam Magness 2017-12-04 08:33:49 -05:00
commit 2f0da29c75
24 changed files with 241 additions and 211 deletions

View file

@ -3,6 +3,7 @@
* @file mod/settings.php
*/
use Friendica\App;
use Friendica\Content\Features;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Core\Config;
@ -52,7 +53,7 @@ function settings_init(App $a) {
),
);
if (get_features()) {
if (Features::get()) {
$tabs[] = array(
'label' => t('Additional features'),
'url' => 'settings/features',
@ -784,12 +785,12 @@ function settings_content(App $a) {
if (($a->argc > 1) && ($a->argv[1] === 'features')) {
$arr = array();
$features = get_features();
$features = Features::get();
foreach ($features as $fname => $fdata) {
$arr[$fname] = array();
$arr[$fname][0] = $fdata[0];
foreach (array_slice($fdata,1) as $f) {
$arr[$fname][1][] = array('feature_' .$f[0], $f[1],((intval(feature_enabled(local_user(), $f[0]))) ? "1" : ''), $f[2],array(t('Off'), t('On')));
$arr[$fname][1][] = array('feature_' .$f[0], $f[1],((intval(Features::isEnabled(local_user(), $f[0]))) ? "1" : ''), $f[2],array(t('Off'), t('On')));
}
}