Move Model\Profile::getTabs to new Module\BaseProfile class
This commit is contained in:
parent
0f5d6a009f
commit
f2d917114f
10 changed files with 148 additions and 132 deletions
|
@ -19,6 +19,7 @@ use Friendica\Model\Contact;
|
|||
use Friendica\Model\Event;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Module\BaseProfile;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
|
@ -121,7 +122,7 @@ function cal_content(App $a)
|
|||
$sql_extra = " AND `event`.`cid` = 0 " . $sql_perms;
|
||||
|
||||
// get the tab navigation bar
|
||||
$tabs = Profile::getTabs($a, 'cal', false, $a->data['user']['nickname']);
|
||||
$tabs = BaseProfile::getTabsHTML($a, 'cal', false, $a->data['user']['nickname']);
|
||||
|
||||
// The view mode part is similiar to /mod/events.php
|
||||
if ($mode == 'view') {
|
||||
|
|
|
@ -16,8 +16,8 @@ use Friendica\Database\DBA;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Event;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseProfile;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Strings;
|
||||
|
@ -251,7 +251,7 @@ function events_content(App $a)
|
|||
$tabs = '';
|
||||
// tabs
|
||||
if ($a->theme_events_in_profile) {
|
||||
$tabs = Profile::getTabs($a, 'events', true);
|
||||
$tabs = BaseProfile::getTabsHTML($a, 'events', true);
|
||||
}
|
||||
|
||||
$mode = 'view';
|
||||
|
|
|
@ -9,7 +9,7 @@ use Friendica\Content\Pager;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Module\BaseProfile;
|
||||
|
||||
function notes_init(App $a)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ function notes_content(App $a, $update = false)
|
|||
return;
|
||||
}
|
||||
|
||||
$o = Profile::getTabs($a, 'notes', true);
|
||||
$o = BaseProfile::getTabsHTML($a, 'notes', true);
|
||||
|
||||
if (!$update) {
|
||||
$o .= '<h3>' . DI::l10n()->t('Personal Notes') . '</h3>';
|
||||
|
|
|
@ -21,6 +21,7 @@ use Friendica\Model\Item;
|
|||
use Friendica\Model\Photo;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseProfile;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Object\Image;
|
||||
use Friendica\Protocol\Activity;
|
||||
|
@ -914,7 +915,7 @@ function photos_content(App $a)
|
|||
|
||||
// tabs
|
||||
$is_owner = (local_user() && (local_user() == $owner_uid));
|
||||
$o .= Profile::getTabs($a, 'photos', $is_owner, $a->data['user']['nickname']);
|
||||
$o .= BaseProfile::getTabsHTML($a, 'photos', $is_owner, $a->data['user']['nickname']);
|
||||
|
||||
// Display upload form
|
||||
if ($datatype === 'upload') {
|
||||
|
|
|
@ -15,6 +15,7 @@ use Friendica\Model\Contact;
|
|||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseProfile;
|
||||
use Friendica\Util\Security;
|
||||
|
||||
function videos_init(App $a)
|
||||
|
@ -171,7 +172,7 @@ function videos_content(App $a)
|
|||
|
||||
// tabs
|
||||
$_is_owner = (local_user() && (local_user() == $owner_uid));
|
||||
$o .= Profile::getTabs($a, 'videos', $_is_owner, $a->data['user']['nickname']);
|
||||
$o .= BaseProfile::getTabsHTML($a, 'videos', $_is_owner, $a->data['user']['nickname']);
|
||||
|
||||
//
|
||||
// dispatch request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue