Update functions and calls
Update function names and scope. update calls.
This commit is contained in:
parent
ac317060fb
commit
0f546f7f0f
20 changed files with 122 additions and 97 deletions
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -27,7 +28,7 @@ function cal_init(App $a)
|
|||
return;
|
||||
}
|
||||
|
||||
nav_set_selected('events');
|
||||
Nav::setSelected('events');
|
||||
|
||||
if ($a->argc > 1) {
|
||||
$nick = $a->argv[1];
|
||||
|
@ -74,7 +75,7 @@ function cal_init(App $a)
|
|||
|
||||
function cal_content(App $a)
|
||||
{
|
||||
nav_set_selected('events');
|
||||
Nav::setSelected('events');
|
||||
|
||||
// get the translation strings for the callendar
|
||||
$i18n = get_event_strings();
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file mod/community.php
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -91,7 +94,7 @@ function community_content(App $a, $update = 0)
|
|||
$tab_tpl = get_markup_template('common_tabs.tpl');
|
||||
$o .= replace_macros($tab_tpl, ['$tabs' => $tabs]);
|
||||
|
||||
nav_set_selected('community');
|
||||
Nav::setSelected('community');
|
||||
|
||||
// We need the editor here to be able to reshare an item.
|
||||
if (local_user()) {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Widget;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
|
@ -369,7 +370,7 @@ function contacts_content(App $a)
|
|||
{
|
||||
$sort_type = 0;
|
||||
$o = '';
|
||||
nav_set_selected('contacts');
|
||||
Nav::setSelected('contacts');
|
||||
|
||||
if (!local_user()) {
|
||||
notice(t('Permission denied.') . EOL);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* @file mod/directory.php
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Widget;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -37,7 +38,7 @@ function directory_content(App $a) {
|
|||
}
|
||||
|
||||
$o = '';
|
||||
nav_set_selected('directory');
|
||||
Nav::setSelected('directory');
|
||||
|
||||
if(x($a->data,'search'))
|
||||
$search = notags(trim($a->data['search']));
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* @brief The events module
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
|
@ -212,9 +213,9 @@ function events_content(App $a) {
|
|||
}
|
||||
|
||||
if ($a->theme_events_in_profile) {
|
||||
nav_set_selected('home');
|
||||
Nav::setSelected('home');
|
||||
} else {
|
||||
nav_set_selected('events');
|
||||
Nav::setSelected('events');
|
||||
}
|
||||
|
||||
// get the translation strings for the callendar
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file mod/help.php
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Text\Markdown;
|
||||
use Friendica\Core\System;
|
||||
|
||||
|
@ -23,7 +26,7 @@ if (!function_exists('load_doc_file')) {
|
|||
|
||||
function help_content(App $a) {
|
||||
|
||||
nav_set_selected('help');
|
||||
Nav::setSelected('help');
|
||||
|
||||
global $lang;
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* @file mod/message.php
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Smilies;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -92,7 +93,7 @@ function message_post(App $a)
|
|||
function message_content(App $a)
|
||||
{
|
||||
$o = '';
|
||||
nav_set_selected('messages');
|
||||
Nav::setSelected('messages');
|
||||
|
||||
if (!local_user()) {
|
||||
notice(t('Permission denied.') . EOL);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\ForumManager;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Widget;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Config;
|
||||
|
@ -440,7 +441,7 @@ function networkFlatView(App $a, $update = 0) {
|
|||
$tabs = network_tabs($a);
|
||||
$o .= $tabs;
|
||||
|
||||
nav_set_selected('network');
|
||||
Nav::setSelected('network');
|
||||
|
||||
$x = [
|
||||
'is_owner' => true,
|
||||
|
@ -575,7 +576,7 @@ function networkThreadedView(App $a, $update = 0) {
|
|||
}
|
||||
}
|
||||
|
||||
nav_set_selected('network');
|
||||
Nav::setSelected('network');
|
||||
|
||||
$content = "";
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* @file mod/notes.php
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Profile;
|
||||
|
||||
|
@ -16,7 +17,7 @@ function notes_init(App $a) {
|
|||
|
||||
$which = $a->user['nickname'];
|
||||
|
||||
nav_set_selected('home');
|
||||
Nav::setSelected('home');
|
||||
|
||||
//Profile::load($a, $which, $profile);
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\NotificationsManager;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -77,7 +78,7 @@ function notifications_content(App $a) {
|
|||
$page = (x($_REQUEST,'page') ? $_REQUEST['page'] : 1);
|
||||
$show = (x($_REQUEST,'show') ? $_REQUEST['show'] : 0);
|
||||
|
||||
nav_set_selected('notifications');
|
||||
Nav::setSelected('notifications');
|
||||
|
||||
$json = (($a->argc > 1 && $a->argv[$a->argc - 1] === 'json') ? true : false);
|
||||
|
||||
|
@ -93,8 +94,8 @@ function notifications_content(App $a) {
|
|||
$startrec = ($page * $perpage) - $perpage;
|
||||
|
||||
// Get introductions
|
||||
if( (($a->argc > 1) && ($a->argv[1] == 'intros')) || (($a->argc == 1))) {
|
||||
nav_set_selected('introductions');
|
||||
if ((($a->argc > 1) && ($a->argv[1] == 'intros')) || (($a->argc == 1))) {
|
||||
Nav::setSelected('introductions');
|
||||
$notif_header = t('Notifications');
|
||||
|
||||
$all = (($a->argc > 2) && ($a->argv[2] == 'all'));
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Worker;
|
||||
|
@ -33,7 +34,7 @@ function photos_init(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
nav_set_selected('home');
|
||||
Nav::setSelected('home');
|
||||
|
||||
if ($a->argc > 1) {
|
||||
$nick = $a->argv[1];
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Widget;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
@ -125,7 +126,7 @@ function profile_content(App $a, $update = 0)
|
|||
// Ensure we've got a profile owner if updating.
|
||||
$a->profile['profile_uid'] = $update;
|
||||
} elseif ($a->profile['profile_uid'] == local_user()) {
|
||||
nav_set_selected('home');
|
||||
Nav::setSelected('home');
|
||||
}
|
||||
|
||||
$contact = null;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\System;
|
||||
|
@ -16,7 +17,7 @@ use Friendica\Network\Probe;
|
|||
|
||||
function profiles_init(App $a) {
|
||||
|
||||
nav_set_selected('profiles');
|
||||
Nav::setSelected('profiles');
|
||||
|
||||
if (! local_user()) {
|
||||
return;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Cache;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Database\DBM;
|
||||
|
@ -132,7 +133,7 @@ function search_content(App $a) {
|
|||
Cache::set("remote_search:".$remote, json_encode(["time" => time(), "accesses" => 1]), CACHE_HOUR);
|
||||
}
|
||||
|
||||
nav_set_selected('search');
|
||||
Nav::setSelected('search');
|
||||
|
||||
if (x($a->data,'search'))
|
||||
$search = notags(trim($a->data['search']));
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Core\Config;
|
||||
|
@ -654,7 +655,7 @@ function settings_post(App $a)
|
|||
function settings_content(App $a)
|
||||
{
|
||||
$o = '';
|
||||
nav_set_selected('settings');
|
||||
Nav::setSelected('settings');
|
||||
|
||||
if (!local_user()) {
|
||||
//notice(t('Permission denied.') . EOL);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* @file mod/videos.php
|
||||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
|
@ -26,7 +27,7 @@ function videos_init(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
nav_set_selected('home');
|
||||
Nav::setSelected('home');
|
||||
|
||||
$o = '';
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
use Friendica\App;
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
|
@ -15,7 +16,7 @@ function viewcontacts_init(App $a) {
|
|||
return;
|
||||
}
|
||||
|
||||
nav_set_selected('home');
|
||||
Nav::setSelected('home');
|
||||
|
||||
if($a->argc > 1) {
|
||||
$nick = $a->argv[1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue