Moved global PAGE_* to Profile class (#5500)

* Rewrites:
- moved PAGE_* to Friendica\Model\Profile class

* Fixed more rewrites from plain (global namespace) PAGE_* to Friendica\Models\Profile class

* CR request:
- moved all PAGE_* constants to Friendica\Model\Contact class
- fixed all references of both classes

* CR request:
- moved ACCOUNT_TYPE_* constants from boot.php to Contact::ACCOUNT_TYPE_*

* Just copy-pasted this code from boot.php, needs to be changed to `const ACCOUNT_TYPE_FOO = x;`

* Ops, melting brain cells here ... :-/
This commit is contained in:
Roland Häder 2018-07-28 01:25:57 +02:00 committed by Hypolite Petovan
parent 5f77e98d76
commit 4a22710b3b
27 changed files with 185 additions and 172 deletions

View file

@ -546,7 +546,7 @@ function dfrn_request_content(App $a)
$auto_confirm = false;
if (DBA::isResult($r)) {
if ($r[0]['page-flags'] != PAGE_NORMAL && $r[0]['page-flags'] != PAGE_PRVGROUP) {
if ($r[0]['page-flags'] != Contact::PAGE_NORMAL && $r[0]['page-flags'] != Contact::PAGE_PRVGROUP) {
$auto_confirm = true;
}
@ -574,7 +574,7 @@ function dfrn_request_content(App $a)
'node' => $r[0]['nickname'],
'dfrn_id' => $r[0]['issued-id'],
'intro_id' => $intro[0]['id'],
'duplex' => (($r[0]['page-flags'] == PAGE_FREELOVE) ? 1 : 0),
'duplex' => (($r[0]['page-flags'] == Contact::PAGE_FREELOVE) ? 1 : 0),
];
dfrn_confirm_post($a, $handsfree);
}
@ -626,7 +626,7 @@ function dfrn_request_content(App $a)
* because nobody is going to read the comments and
* it doesn't matter if they know you or not.
*/
if ($a->profile['page-flags'] == PAGE_NORMAL) {
if ($a->profile['page-flags'] == Contact::PAGE_NORMAL) {
$tpl = get_markup_template('dfrn_request.tpl');
} else {
$tpl = get_markup_template('auto_request.tpl');