Rename functions and calls

Rename functions and update calls
This commit is contained in:
Adam Magness 2018-01-15 09:50:06 -05:00
commit 6cf6029ff5
10 changed files with 73 additions and 48 deletions

View file

@ -4,6 +4,7 @@
*/
use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Widget;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
@ -13,7 +14,6 @@ use Friendica\Model\Group;
use Friendica\Model\Profile;
use Friendica\Network\Probe;
require_once 'include/contact_widgets.php';
require_once 'mod/proxy.php';
function contacts_init(App $a)
@ -63,14 +63,14 @@ function contacts_init(App $a)
$networks_widget = '';
} else {
$vcard_widget = '';
$networks_widget = networks_widget('contacts', $nets);
$networks_widget = Widget::networks('contacts', $nets);
if (isset($_GET['add'])) {
$follow_widget = follow_widget($_GET['add']);
$follow_widget = Widget::follow($_GET['add']);
} else {
$follow_widget = follow_widget();
$follow_widget = Widget::follow();
}
$findpeople_widget = findpeople_widget();
$findpeople_widget = Widget::findPeople();
}
$groups_widget = Group::sidebarWidget('contacts', 'group', 'full', 0, $contact_id);
@ -781,7 +781,7 @@ function contacts_content(App $a)
$total = $r[0]['total'];
}
$sql_extra3 = unavailable_networks();
$sql_extra3 = Widget::unavailableNetworks();
$contacts = array();

View file

@ -3,6 +3,7 @@
* @file mod/directory.php
*/
use Friendica\App;
use Friendica\Content\Widget;
use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
@ -12,13 +13,10 @@ function directory_init(App $a) {
$a->set_pager_itemspage(60);
if(local_user()) {
require_once('include/contact_widgets.php');
$a->page['aside'] .= Widget::findPeople();
$a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= follow_widget();
}
else {
$a->page['aside'] .= Widget::follow();
} else {
unset($_SESSION['theme']);
unset($_SESSION['mobile-theme']);
}

View file

@ -4,6 +4,7 @@
*/
use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Widget;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Core\Worker;
@ -13,7 +14,6 @@ use Friendica\Model\Profile;
use Friendica\Network\Probe;
use Friendica\Protocol\PortableContact;
require_once 'include/contact_widgets.php';
require_once 'mod/contacts.php';
function dirfind_init(App $a) {
@ -27,9 +27,9 @@ function dirfind_init(App $a) {
$a->page['aside'] = '';
}
$a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= Widget::findPeople();
$a->page['aside'] .= follow_widget();
$a->page['aside'] .= Widget::follow();
}
function dirfind_content(App $a, $prefix = "") {

View file

@ -3,6 +3,7 @@
* @file mod/match.php
*/
use Friendica\App;
use Friendica\Content\Widget;
use Friendica\Core\Config;
use Friendica\Core\System;
use Friendica\Database\DBM;
@ -10,7 +11,6 @@ use Friendica\Model\Contact;
use Friendica\Model\Profile;
require_once 'include/text.php';
require_once 'include/contact_widgets.php';
require_once 'mod/proxy.php';
/**
@ -30,8 +30,8 @@ function match_content(App $a)
return;
}
$a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= follow_widget();
$a->page['aside'] .= Widget::findPeople();
$a->page['aside'] .= Widget::follow();
$_SESSION['return_url'] = System::baseUrl() . '/' . $a->cmd;

View file

@ -5,6 +5,7 @@
use Friendica\App;
use Friendica\Content\Feature;
use Friendica\Content\ForumManager;
use Friendica\Content\Widget;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
@ -15,7 +16,6 @@ use Friendica\Model\Profile;
use Friendica\Module\Login;
require_once 'include/conversation.php';
require_once 'include/contact_widgets.php';
require_once 'include/items.php';
require_once 'include/acl_selectors.php';
@ -159,12 +159,12 @@ function network_init(App $a) {
$a->page['aside'] = '';
}
$a->page['aside'] .= (Feature::isEnabled(local_user(),'groups') ? Group::sidebarWidget('network/0','network','standard',$group_id) : '');
$a->page['aside'] .= (Feature::isEnabled(local_user(), 'groups') ? Group::sidebarWidget('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'] .= posted_date_widget('network', local_user(),false);
$a->page['aside'] .= Widget::networks('network', (x($_GET, 'nets') ? $_GET['nets'] : ''));
$a->page['aside'] .= saved_searches($search);
$a->page['aside'] .= fileas_widget('network',(x($_GET, 'file') ? $_GET['file'] : ''));
$a->page['aside'] .= Widget::fileAs('network', (x($_GET, 'file') ? $_GET['file'] : ''));
}
function saved_searches($search) {

View file

@ -3,6 +3,7 @@
* @file mod/profile.php
*/
use Friendica\App;
use Friendica\Content\Widget;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
@ -12,8 +13,6 @@ use Friendica\Model\Profile;
use Friendica\Module\Login;
use Friendica\Protocol\DFRN;
require_once 'include/contact_widgets.php';
function profile_init(App $a)
{
if (!x($a->page, 'aside')) {
@ -184,7 +183,7 @@ function profile_content(App $a, $update = 0)
return $o;
}
$o .= common_friends_visitor_widget($a->profile['profile_uid']);
$o .= Widget::commonFriendsVisitor($a->profile['profile_uid']);
if (x($_SESSION, 'new_member') && $is_owner) {
$o .= '<a href="newmember" id="newmember-tips" style="font-size: 1.2em;"><b>' . t('Tips for New Members') . '</b></a>' . EOL;
@ -194,7 +193,7 @@ function profile_content(App $a, $update = 0)
$commvisitor = $commpage && $remote_contact;
$a->page['aside'] .= posted_date_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'], $a->profile['profile_uid'], true);
$a->page['aside'] .= categories_widget(System::baseUrl(true) . '/profile/' . $a->profile['nickname'], (x($category) ? xmlify($category) : ''));
$a->page['aside'] .= Widget::categories(System::baseUrl(true) . '/profile/' . $a->profile['nickname'], (x($category) ? xmlify($category) : ''));
$a->page['aside'] .= tagcloud_wall_widget();
if (can_write_wall($a->profile['profile_uid'])) {

View file

@ -4,14 +4,13 @@
*/
use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Widget;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\Profile;
require_once 'include/contact_widgets.php';
function suggest_init(App $a) {
if (! local_user()) {
return;
@ -51,10 +50,6 @@ function suggest_init(App $a) {
}
function suggest_content(App $a) {
require_once("mod/proxy.php");
@ -67,8 +62,8 @@ function suggest_content(App $a) {
$_SESSION['return_url'] = System::baseUrl() . '/' . $a->cmd;
$a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= follow_widget();
$a->page['aside'] .= Widget::findPeople();
$a->page['aside'] .= Widget::follow();
$r = GContact::suggestionQuery(local_user());