mirror of
https://github.com/friendica/friendica
synced 2025-04-27 15:10:11 +00:00
Rename to singular
Rename and update references. Standards and a require_once.
This commit is contained in:
parent
2f0da29c75
commit
6e5471def3
22 changed files with 59 additions and 56 deletions
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ class Item extends BaseObject
|
|||
|
||||
$drop = array(
|
||||
'dropping' => $dropping,
|
||||
'pagedrop' => ((Features::isEnabled($conv->getProfileOwner(), 'multi_delete')) ? $item['pagedrop'] : ''),
|
||||
'pagedrop' => ((Feature::isEnabled($conv->getProfileOwner(), 'multi_delete')) ? $item['pagedrop'] : ''),
|
||||
'select' => t('Select'),
|
||||
'delete' => t('Delete'),
|
||||
);
|
||||
|
@ -280,7 +280,7 @@ class Item extends BaseObject
|
|||
}
|
||||
|
||||
$tagger = '';
|
||||
if (Features::isEnabled($conv->getProfileOwner(), 'commtag')) {
|
||||
if (Feature::isEnabled($conv->getProfileOwner(), 'commtag')) {
|
||||
$tagger = array(
|
||||
'add' => t("add tag"),
|
||||
'class' => "",
|
||||
|
@ -294,7 +294,7 @@ class Item extends BaseObject
|
|||
if ($conv->isWritable()) {
|
||||
$buttons = array(
|
||||
'like' => array( t("I like this \x28toggle\x29"), t("like")),
|
||||
'dislike' => ((Features::isEnabled($conv->getProfileOwner(), 'dislike')) ? array( t("I don't like this \x28toggle\x29"), t("dislike")) : ''),
|
||||
'dislike' => ((Feature::isEnabled($conv->getProfileOwner(), 'dislike')) ? array( t("I don't like this \x28toggle\x29"), t("dislike")) : ''),
|
||||
);
|
||||
if ($shareable) {
|
||||
$buttons['share'] = array( t('Share this'), t('share'));
|
||||
|
@ -379,12 +379,12 @@ class Item extends BaseObject
|
|||
'owner_photo' => $a->remove_baseurl(proxy_url($item['owner-thumb'], false, PROXY_SIZE_THUMB)),
|
||||
'owner_name' => htmlentities($owner_name_e),
|
||||
'plink' => get_plink($item),
|
||||
'edpost' => ((Features::isEnabled($conv->getProfileOwner(), 'edit_posts')) ? $edpost : ''),
|
||||
'edpost' => ((Feature::isEnabled($conv->getProfileOwner(), 'edit_posts')) ? $edpost : ''),
|
||||
'isstarred' => $isstarred,
|
||||
'star' => ((Features::isEnabled($conv->getProfileOwner(), 'star_posts')) ? $star : ''),
|
||||
'ignore' => ((Features::isEnabled($conv->getProfileOwner(), 'ignore_posts')) ? $ignore : ''),
|
||||
'star' => ((Feature::isEnabled($conv->getProfileOwner(), 'star_posts')) ? $star : ''),
|
||||
'ignore' => ((Feature::isEnabled($conv->getProfileOwner(), 'ignore_posts')) ? $ignore : ''),
|
||||
'tagger' => $tagger,
|
||||
'filer' => ((Features::isEnabled($conv->getProfileOwner(), 'filing')) ? $filer : ''),
|
||||
'filer' => ((Feature::isEnabled($conv->getProfileOwner(), 'filing')) ? $filer : ''),
|
||||
'drop' => $drop,
|
||||
'vote' => $buttons,
|
||||
'like' => $responses['like']['output'],
|
||||
|
@ -792,7 +792,7 @@ class Item extends BaseObject
|
|||
'$edimg' => t('Image'),
|
||||
'$edurl' => t('Link'),
|
||||
'$edvideo' => t('Video'),
|
||||
'$preview' => ((Features::isEnabled($conv->getProfileOwner(), 'preview')) ? t('Preview') : ''),
|
||||
'$preview' => ((Feature::isEnabled($conv->getProfileOwner(), 'preview')) ? t('Preview') : ''),
|
||||
'$indent' => $indent,
|
||||
'$sourceapp' => t($a->sourcename),
|
||||
'$ww' => (($conv->getMode() === 'network') ? $ww : ''),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue