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
commit 6e5471def3
22 changed files with 59 additions and 56 deletions

View file

@ -377,7 +377,7 @@ function populate_acl($user = null, $show_jotnets = false) {
'$aclModalTitle' => t('Permissions'),
'$aclModalDismiss' => t('Close'),
'$features' => array(
'aclautomention' => (Features::isEnabled($user['uid'], "aclautomention") ? "true" : "false")
'aclautomention' => (Feature::isEnabled($user['uid'], "aclautomention") ? "true" : "false")
),
));

View file

@ -5101,7 +5101,7 @@ function api_friendica_profile_show($type)
$profileid = (x($_REQUEST, 'profile_id') ? $_REQUEST['profile_id'] : 0);
// retrieve general information about profiles for user
$multi_profiles = Features::isEnabled(api_user(), 'multi_profiles');
$multi_profiles = Feature::isEnabled(api_user(), 'multi_profiles');
$directory = Config::get('system', 'directory');
// get data of the specified profile id or all profiles of the user if not specified

View file

@ -108,7 +108,7 @@ function networks_widget($baseurl, $selected = '') {
return '';
}
if (!Features::isEnabled(local_user(), 'networks')) {
if (!Feature::isEnabled(local_user(), 'networks')) {
return '';
}
@ -147,7 +147,7 @@ function fileas_widget($baseurl, $selected = '') {
return '';
}
if (! Features::isEnabled(local_user(), 'filing')) {
if (! Feature::isEnabled(local_user(), 'filing')) {
return '';
}
@ -181,7 +181,7 @@ function categories_widget($baseurl, $selected = '') {
$a = get_app();
if (! Features::isEnabled($a->profile['profile_uid'], 'categories')) {
if (! Feature::isEnabled($a->profile['profile_uid'], 'categories')) {
return '';
}

View file

@ -916,7 +916,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
'$mode' => $mode,
'$user' => $a->user,
'$threads' => $threads,
'$dropping' => ($page_dropping && Features::isEnabled(local_user(), 'multi_delete') ? t('Delete Selected Items') : False),
'$dropping' => ($page_dropping && Feature::isEnabled(local_user(), 'multi_delete') ? t('Delete Selected Items') : False),
));
return $o;
@ -1306,7 +1306,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) {
'$title' => $x['title'],
'$placeholdertitle' => t('Set title'),
'$category' => $x['category'],
'$placeholdercategory' => (Features::isEnabled(local_user(), 'categories') ? t('Categories (comma-separated list)') : ''),
'$placeholdercategory' => (Feature::isEnabled(local_user(), 'categories') ? t('Categories (comma-separated list)') : ''),
'$wait' => t('Please wait'),
'$permset' => t('Permission settings'),
'$shortpermset' => t('permissions'),
@ -1322,7 +1322,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false) {
'$lockstate' => $x['lockstate'],
'$bang' => $x['bang'],
'$profile_uid' => $x['profile_uid'],
'$preview' => ((Features::isEnabled($x['profile_uid'],'preview')) ? t('Preview') : ''),
'$preview' => ((Feature::isEnabled($x['profile_uid'],'preview')) ? t('Preview') : ''),
'$jotplugins' => $jotplugins,
'$notes_cid' => $notes_cid,
'$sourceapp' => t($a->sourcename),

View file

@ -900,7 +900,7 @@ function widget_events() {
* for exporting the cal is enabled (otherwise the widget would appear for logged in users
* on foreigen profile pages even if the widget is disabled).
*/
if (intval($owner_uid) && local_user() !== $owner_uid && ! Features::isEnabled($owner_uid, "export_calendar")) {
if (intval($owner_uid) && local_user() !== $owner_uid && ! Feature::isEnabled($owner_uid, "export_calendar")) {
return;
}
@ -908,7 +908,7 @@ function widget_events() {
* If it's a kind of profile page (intval($owner_uid)) return if the user not logged in and
* export feature isn't enabled.
*/
if (intval($owner_uid) && ! local_user() && ! Features::isEnabled($owner_uid, "export_calendar")) {
if (intval($owner_uid) && ! local_user() && ! Feature::isEnabled($owner_uid, "export_calendar")) {
return;
}

View file

@ -310,7 +310,7 @@ function profile_sidebar($profile, $block = 0)
}
// show edit profile to yourself
if (!$is_contact && $profile['uid'] == local_user() && Features::isEnabled(local_user(), 'multi_profiles')) {
if (!$is_contact && $profile['uid'] == local_user() && Feature::isEnabled(local_user(), 'multi_profiles')) {
$profile['edit'] = array(System::baseUrl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles'));
$r = q(
"SELECT * FROM `profile` WHERE `uid` = %d",
@ -337,7 +337,7 @@ function profile_sidebar($profile, $block = 0)
}
}
}
if (!$is_contact && $profile['uid'] == local_user() && !Features::isEnabled(local_user(), 'multi_profiles')) {
if (!$is_contact && $profile['uid'] == local_user() && !Feature::isEnabled(local_user(), 'multi_profiles')) {
$profile['edit'] = array(System::baseUrl(). '/profiles/'.$profile['id'], t('Edit profile'),"", t('Edit profile'));
$profile['menu'] = array(
'chg_photo' => t('Change profile photo'),
@ -791,7 +791,7 @@ function advanced_profile(App $a)
}
//show subcribed forum if it is enabled in the usersettings
if (Features::isEnabled($uid, 'forumlist_profile')) {
if (Feature::isEnabled($uid, 'forumlist_profile')) {
$profile['forumlist'] = array( t('Forums:'), ForumManager::profileAdvanced($uid));
}

View file

@ -2356,7 +2356,7 @@ function posted_dates($uid, $wall) {
function posted_date_widget($url, $uid, $wall) {
$o = '';
if (! Features::isEnabled($uid, 'archives')) {
if (! Feature::isEnabled($uid, 'archives')) {
return $o;
}

View file

@ -193,7 +193,7 @@ function nav_info(App $a)
$nav['settings'] = array('settings', t('Settings'), '', t('Account settings'));
if (Features::isEnabled(local_user(), 'multi_profiles')) {
if (Feature::isEnabled(local_user(), 'multi_profiles')) {
$nav['profiles'] = array('profiles', t('Profiles'), '', t('Manage/Edit Profiles'));
}

View file

@ -305,7 +305,7 @@ function tagcloud_wall_widget($limit = 50) {
return "";
}
if(Features::isEnabled($a->profile['profile_uid'], 'tagadelic')) {
if(Feature::isEnabled($a->profile['profile_uid'], 'tagadelic')) {
$owner_id = Contact::getIdForURL($a->profile['url']);
if(!$owner_id) {

View file

@ -1049,7 +1049,7 @@ function search($s, $id = 'search-box', $url = 'search', $save = false, $aside =
'$action_url' => $url,
'$search_label' => t('Search'),
'$save_label' => t('Save'),
'$savedsearch' => Features::isEnabled(local_user(),'savedsearch'),
'$savedsearch' => Feature::isEnabled(local_user(),'savedsearch'),
'$search_hint' => t('@name, !forum, #tags, content'),
);