Rename to singular

Rename and update references. Standards and a require_once.
This commit is contained in:
Adam Magness 2017-12-04 09:01:27 -05:00
parent 2f0da29c75
commit 6e5471def3
22 changed files with 59 additions and 56 deletions

View file

@ -1,6 +1,6 @@
<?php
/**
* @file src/Content/Features.php
* @file src/Content/Feature.php
* @brief Features management
*/
namespace Friendica\Content;
@ -8,7 +8,9 @@ namespace Friendica\Content;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
class Features
require_once 'include/plugin.php';
class Feature
{
/**
* @brief check if feature is enabled
@ -40,7 +42,8 @@ class Features
* @param string $feature
* @return boolean
*/
private static function getDefault($feature) {
private static function getDefault($feature)
{
$f = self::get();
foreach ($f as $cat) {
foreach ($cat as $feat) {
@ -62,8 +65,8 @@ class Features
*
* @return array
*/
public static function get($filtered = true) {
public static function get($filtered = true)
{
$arr = array(
// General
@ -142,7 +145,7 @@ class Features
}
}
call_hooks('get',$arr);
call_hooks('get', $arr);
return $arr;
}
}

View file

@ -83,7 +83,7 @@ class ForumManager
*/
public static function widget($uid, $cid = 0)
{
if (! intval(Features::isEnabled(local_user(), 'forumlist_widget'))) {
if (! intval(Feature::isEnabled(local_user(), 'forumlist_widget'))) {
return;
}
@ -142,7 +142,7 @@ class ForumManager
*/
public static function profileAdvanced($uid)
{
$profile = intval(Features::isEnabled($uid, 'forumlist_profile'));
$profile = intval(Feature::isEnabled($uid, 'forumlist_profile'));
if (! $profile) {
return;
}