Move Contact::ACCOUNT_TYPE_* constants to User::ACCOUNT_TYPE_*
- Keep Contact::TYPE_* constants for comparison with contact.contact-type
This commit is contained in:
parent
ad9c67663d
commit
3d839bb176
12 changed files with 79 additions and 44 deletions
|
@ -1995,10 +1995,11 @@ function admin_page_users(App $a)
|
|||
User::PAGE_FLAGS_PRVGROUP => L10n::t('Private Forum')
|
||||
];
|
||||
$account_types = [
|
||||
Contact::ACCOUNT_TYPE_PERSON => L10n::t('Personal Page'),
|
||||
Contact::ACCOUNT_TYPE_ORGANISATION => L10n::t('Organisation Page'),
|
||||
Contact::ACCOUNT_TYPE_NEWS => L10n::t('News Page'),
|
||||
Contact::ACCOUNT_TYPE_COMMUNITY => L10n::t('Community Forum')
|
||||
User::ACCOUNT_TYPE_PERSON => L10n::t('Personal Page'),
|
||||
User::ACCOUNT_TYPE_ORGANISATION => L10n::t('Organisation Page'),
|
||||
User::ACCOUNT_TYPE_NEWS => L10n::t('News Page'),
|
||||
User::ACCOUNT_TYPE_COMMUNITY => L10n::t('Community Forum'),
|
||||
User::ACCOUNT_TYPE_RELAY => L10n::t('Relay'),
|
||||
];
|
||||
|
||||
$e['page_flags_raw'] = $e['page-flags'];
|
||||
|
|
|
@ -14,6 +14,7 @@ use Friendica\Core\Renderer;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\User;
|
||||
|
||||
function community_init(App $a)
|
||||
{
|
||||
|
@ -44,16 +45,16 @@ function community_content(App $a, $update = 0)
|
|||
if ($a->argc > 2) {
|
||||
switch ($a->argv[2]) {
|
||||
case 'person':
|
||||
$accounttype = Contact::ACCOUNT_TYPE_PERSON;
|
||||
$accounttype = User::ACCOUNT_TYPE_PERSON;
|
||||
break;
|
||||
case 'organisation':
|
||||
$accounttype = Contact::ACCOUNT_TYPE_ORGANISATION;
|
||||
$accounttype = User::ACCOUNT_TYPE_ORGANISATION;
|
||||
break;
|
||||
case 'news':
|
||||
$accounttype = Contact::ACCOUNT_TYPE_NEWS;
|
||||
$accounttype = User::ACCOUNT_TYPE_NEWS;
|
||||
break;
|
||||
case 'community':
|
||||
$accounttype = Contact::ACCOUNT_TYPE_COMMUNITY;
|
||||
$accounttype = User::ACCOUNT_TYPE_COMMUNITY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
|
||||
function noscrape_init(App $a)
|
||||
{
|
||||
|
@ -32,7 +33,7 @@ function noscrape_init(App $a)
|
|||
'guid' => $a->profile['guid'],
|
||||
'key' => $a->profile['pubkey'],
|
||||
'homepage' => System::baseUrl()."/profile/{$which}",
|
||||
'comm' => ($a->profile['account-type'] == Contact::ACCOUNT_TYPE_COMMUNITY),
|
||||
'comm' => ($a->profile['account-type'] == User::ACCOUNT_TYPE_COMMUNITY),
|
||||
'account-type' => $a->profile['account-type'],
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue