mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 01:25:21 +02: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
|
@ -2291,7 +2291,7 @@ function admin_page_features_post(App $a)
|
|||
logger('postvars: ' . print_r($_POST, true), LOGGER_DATA);
|
||||
|
||||
$arr = array();
|
||||
$features = Features::get(false);
|
||||
$features = Feature::get(false);
|
||||
|
||||
foreach ($features as $fname => $fdata) {
|
||||
foreach (array_slice($fdata, 1) as $f) {
|
||||
|
@ -2336,7 +2336,7 @@ function admin_page_features(App $a)
|
|||
{
|
||||
if ((argc() > 1) && (argv(1) === 'features')) {
|
||||
$arr = array();
|
||||
$features = Features::get(false);
|
||||
$features = Feature::get(false);
|
||||
|
||||
foreach ($features as $fname => $fdata) {
|
||||
$arr[$fname] = array();
|
||||
|
|
|
@ -301,7 +301,7 @@ function cal_content(App $a) {
|
|||
|
||||
// Test permissions
|
||||
// Respect the export feature setting for all other /cal pages if it's not the own profile
|
||||
if( ((local_user() !== intval($owner_uid))) && ! Features::isEnabled($owner_uid, "export_calendar")) {
|
||||
if( ((local_user() !== intval($owner_uid))) && ! Feature::isEnabled($owner_uid, "export_calendar")) {
|
||||
notice( t('Permission denied.') . EOL);
|
||||
goaway('cal/' . $nick);
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ function editpost_content(App $a) {
|
|||
'$title' => htmlspecialchars($itm[0]['title']),
|
||||
'$placeholdertitle' => t('Set title'),
|
||||
'$category' => file_tag_file_to_list($itm[0]['file'], 'category'),
|
||||
'$placeholdercategory' => (Features::isEnabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''),
|
||||
'$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? t('Categories (comma-separated list)') : ''),
|
||||
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
|
||||
'$lockstate' => $lockstate,
|
||||
'$acl' => '', // populate_acl((($group) ? $group_acl : $a->user)),
|
||||
|
|
|
@ -157,8 +157,8 @@ function network_init(App $a) {
|
|||
$a->page['aside'] = '';
|
||||
}
|
||||
|
||||
$a->page['aside'] .= (Features::isEnabled(local_user(),'groups') ? group_side('network/0','network','standard',$group_id) : '');
|
||||
$a->page['aside'] .= (Features::isEnabled(local_user(), 'forumlist_widget') ? ForumManager::widget(local_user(), $cid) : '');
|
||||
$a->page['aside'] .= (Feature::isEnabled(local_user(),'groups') ? group_side('network/0','network','standard',$group_id) : '');
|
||||
$a->page['aside'] .= (Feature::isEnabled(local_user(), 'forumlist_widget') ? ForumManager::widget(local_user(), $cid) : '');
|
||||
$a->page['aside'] .= posted_date_widget('network',local_user(),false);
|
||||
$a->page['aside'] .= networks_widget('network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
|
||||
$a->page['aside'] .= saved_searches($search);
|
||||
|
@ -167,7 +167,7 @@ function network_init(App $a) {
|
|||
|
||||
function saved_searches($search) {
|
||||
|
||||
if (!Features::isEnabled(local_user(),'savedsearch')) {
|
||||
if (!Feature::isEnabled(local_user(),'savedsearch')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
@ -919,7 +919,7 @@ function network_tabs(App $a)
|
|||
),
|
||||
);
|
||||
|
||||
if (Features::isEnabled(local_user(),'personal_tab')) {
|
||||
if (Feature::isEnabled(local_user(),'personal_tab')) {
|
||||
$tabs[] = array(
|
||||
'label' => t('Personal'),
|
||||
'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&conv=1',
|
||||
|
@ -930,7 +930,7 @@ function network_tabs(App $a)
|
|||
);
|
||||
}
|
||||
|
||||
if (Features::isEnabled(local_user(),'new_tab')) {
|
||||
if (Feature::isEnabled(local_user(),'new_tab')) {
|
||||
$tabs[] = array(
|
||||
'label' => t('New'),
|
||||
'url' => 'network/new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''),
|
||||
|
@ -941,7 +941,7 @@ function network_tabs(App $a)
|
|||
);
|
||||
}
|
||||
|
||||
if (Features::isEnabled(local_user(),'link_tab')) {
|
||||
if (Feature::isEnabled(local_user(),'link_tab')) {
|
||||
$tabs[] = array(
|
||||
'label' => t('Shared Links'),
|
||||
'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&bmark=1',
|
||||
|
@ -952,7 +952,7 @@ function network_tabs(App $a)
|
|||
);
|
||||
}
|
||||
|
||||
if (Features::isEnabled(local_user(),'star_posts')) {
|
||||
if (Feature::isEnabled(local_user(),'star_posts')) {
|
||||
$tabs[] = array(
|
||||
'label' => t('Starred'),
|
||||
'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&star=1',
|
||||
|
|
|
@ -896,7 +896,7 @@ function photos_post(App $a) {
|
|||
|
||||
/// @TODO merge these 2 if() into one?
|
||||
if ($exif && $exif['GPS']) {
|
||||
if (Features::isEnabled($channel_id,'photo_location')) {
|
||||
if (Feature::isEnabled($channel_id,'photo_location')) {
|
||||
$lat = getGps($exif['GPS']['GPSLatitude'], $exif['GPS']['GPSLatitudeRef']);
|
||||
$lon = getGps($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']);
|
||||
}
|
||||
|
@ -1585,7 +1585,7 @@ function photos_content(App $a) {
|
|||
$likebuttons = replace_macros($like_tpl, array(
|
||||
'$id' => $link_item['id'],
|
||||
'$likethis' => t("I like this \x28toggle\x29"),
|
||||
'$nolike' => (Features::isEnabled(local_user(), 'dislike') ? t("I don't like this \x28toggle\x29") : ''),
|
||||
'$nolike' => (Feature::isEnabled(local_user(), 'dislike') ? t("I don't like this \x28toggle\x29") : ''),
|
||||
'$wait' => t('Please wait'),
|
||||
'$return_path' => $a->query_string,
|
||||
));
|
||||
|
@ -1736,7 +1736,7 @@ function photos_content(App $a) {
|
|||
|
||||
|
||||
$response_verbs = array('like');
|
||||
if (Features::isEnabled($owner_uid, 'dislike')) {
|
||||
if (Feature::isEnabled($owner_uid, 'dislike')) {
|
||||
$response_verbs[] = 'dislike';
|
||||
}
|
||||
$responses = get_responses($conv_responses,$response_verbs, '', $link_item);
|
||||
|
|
|
@ -150,7 +150,7 @@ function ping_init(App $a)
|
|||
}
|
||||
|
||||
if ($network_count) {
|
||||
if (intval(Features::isEnabled(local_user(), 'groups'))) {
|
||||
if (intval(Feature::isEnabled(local_user(), 'groups'))) {
|
||||
// Find out how unseen network posts are spread across groups
|
||||
$group_counts = groups_count_unseen();
|
||||
if (DBM::is_result($group_counts)) {
|
||||
|
@ -162,7 +162,7 @@ function ping_init(App $a)
|
|||
}
|
||||
}
|
||||
|
||||
if (intval(Features::isEnabled(local_user(), 'forumlist_widget'))) {
|
||||
if (intval(Feature::isEnabled(local_user(), 'forumlist_widget'))) {
|
||||
$forum_counts = ForumManager::countUnseenItems();
|
||||
if (DBM::is_result($forums_counts)) {
|
||||
foreach ($forums_counts as $forum_count) {
|
||||
|
|
|
@ -674,10 +674,10 @@ function profiles_content(App $a) {
|
|||
array(t('No'), t('Yes')) //Off - On strings
|
||||
),
|
||||
|
||||
'$multi_profiles' => Features::isEnabled(local_user(), 'multi_profiles'),
|
||||
'$multi_profiles' => Feature::isEnabled(local_user(), 'multi_profiles'),
|
||||
'$form_security_token' => get_form_security_token("profile_edit"),
|
||||
'$form_security_token_photo' => get_form_security_token("profile_photo"),
|
||||
'$profile_clone_link' => ((Features::isEnabled(local_user(), 'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_clone") : ""),
|
||||
'$profile_clone_link' => ((Feature::isEnabled(local_user(), 'multi_profiles')) ? 'profiles/clone/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_clone") : ""),
|
||||
'$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"),
|
||||
|
||||
'$profile_action' => t('Profile Actions'),
|
||||
|
@ -755,7 +755,7 @@ function profiles_content(App $a) {
|
|||
return $o;
|
||||
} else {
|
||||
// If we don't support multi profiles, don't display this list.
|
||||
if (!Features::isEnabled(local_user(), 'multi_profiles')) {
|
||||
if (!Feature::isEnabled(local_user(), 'multi_profiles')) {
|
||||
$r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `is-default`=1",
|
||||
local_user()
|
||||
);
|
||||
|
|
|
@ -17,7 +17,7 @@ function search_saved_searches() {
|
|||
|
||||
$o = '';
|
||||
|
||||
if (! Features::isEnabled(local_user(),'savedsearch'))
|
||||
if (! Feature::isEnabled(local_user(),'savedsearch'))
|
||||
return $o;
|
||||
|
||||
$r = q("SELECT `id`,`term` FROM `search` WHERE `uid` = %d",
|
||||
|
|
|
@ -53,7 +53,7 @@ function settings_init(App $a) {
|
|||
),
|
||||
);
|
||||
|
||||
if (Features::get()) {
|
||||
if (Feature::get()) {
|
||||
$tabs[] = array(
|
||||
'label' => t('Additional features'),
|
||||
'url' => 'settings/features',
|
||||
|
@ -785,12 +785,12 @@ function settings_content(App $a) {
|
|||
if (($a->argc > 1) && ($a->argv[1] === 'features')) {
|
||||
|
||||
$arr = array();
|
||||
$features = Features::get();
|
||||
$features = Feature::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(Features::isEnabled(local_user(), $f[0]))) ? "1" : ''), $f[2],array(t('Off'), t('On')));
|
||||
$arr[$fname][1][] = array('feature_' .$f[0], $f[1],((intval(Feature::isEnabled(local_user(), $f[0]))) ? "1" : ''), $f[2],array(t('Off'), t('On')));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue