Class file relocations

Issue #3878
This commit is contained in:
Adam Magness 2017-11-07 22:57:46 -05:00
commit 4ca68c7af0
151 changed files with 987 additions and 8742 deletions

View file

@ -5,6 +5,7 @@ use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Network\Probe;
require_once 'include/Contact.php';
@ -23,7 +24,7 @@ function profiles_init(App $a) {
intval($a->argv[2]),
intval(local_user())
);
if (! dbm::is_result($r)) {
if (! DBM::is_result($r)) {
notice( t('Profile not found.') . EOL);
goaway('profiles');
return; // NOTREACHED
@ -42,7 +43,7 @@ function profiles_init(App $a) {
intval($a->argv[2]),
intval(local_user())
);
if (dbm::is_result($r)) {
if (DBM::is_result($r)) {
info(t('Profile deleted.').EOL);
}
@ -57,7 +58,7 @@ function profiles_init(App $a) {
$r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
intval(local_user()));
$num_profiles = (dbm::is_result($r0) ? count($r0) : 0);
$num_profiles = (DBM::is_result($r0) ? count($r0) : 0);
$name = t('Profile-') . ($num_profiles + 1);
@ -79,7 +80,7 @@ function profiles_init(App $a) {
);
info( t('New profile created.') . EOL);
if (dbm::is_result($r3) && count($r3) == 1) {
if (DBM::is_result($r3) && count($r3) == 1) {
goaway('profiles/' . $r3[0]['id']);
}
@ -93,14 +94,14 @@ function profiles_init(App $a) {
$r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
intval(local_user()));
$num_profiles = (dbm::is_result($r0) ? count($r0) : 0);
$num_profiles = (DBM::is_result($r0) ? count($r0) : 0);
$name = t('Profile-') . ($num_profiles + 1);
$r1 = q("SELECT * FROM `profile` WHERE `uid` = %d AND `id` = %d LIMIT 1",
intval(local_user()),
intval($a->argv[2])
);
if(! dbm::is_result($r1)) {
if(! DBM::is_result($r1)) {
notice( t('Profile unavailable to clone.') . EOL);
killme();
return;
@ -118,7 +119,7 @@ function profiles_init(App $a) {
dbesc($name)
);
info( t('New profile created.') . EOL);
if ((dbm::is_result($r3)) && (count($r3) == 1)) {
if ((DBM::is_result($r3)) && (count($r3) == 1)) {
goaway('profiles/'.$r3[0]['id']);
}
@ -133,7 +134,7 @@ function profiles_init(App $a) {
intval($a->argv[1]),
intval(local_user())
);
if (! dbm::is_result($r)) {
if (! DBM::is_result($r)) {
notice( t('Profile not found.') . EOL);
killme();
return;
@ -180,7 +181,7 @@ function profiles_post(App $a) {
intval($a->argv[1]),
intval(local_user())
);
if (! dbm::is_result($orig)) {
if (! DBM::is_result($orig)) {
notice( t('Profile not found.') . EOL);
return;
}
@ -274,13 +275,13 @@ function profiles_post(App $a) {
dbesc($newname),
intval(local_user())
);
if (! dbm::is_result($r)) {
if (! DBM::is_result($r)) {
$r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1",
dbesc($lookup),
intval(local_user())
);
}
if (dbm::is_result($r)) {
if (DBM::is_result($r)) {
$prf = $r[0]['url'];
$newname = $r[0]['name'];
}
@ -533,7 +534,7 @@ function profile_activity($changed, $value) {
intval(local_user())
);
if (! dbm::is_result($self)) {
if (! DBM::is_result($self)) {
return;
}
@ -616,7 +617,7 @@ function profiles_content(App $a) {
intval($a->argv[1]),
intval(local_user())
);
if (! dbm::is_result($r)) {
if (! DBM::is_result($r)) {
notice( t('Profile not found.') . EOL);
return;
}
@ -757,7 +758,7 @@ function profiles_content(App $a) {
$r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `is-default`=1",
local_user()
);
if (dbm::is_result($r)) {
if (DBM::is_result($r)) {
//Go to the default profile.
goaway('profiles/' . $r[0]['id']);
}
@ -766,7 +767,7 @@ function profiles_content(App $a) {
$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
local_user());
if (dbm::is_result($r)) {
if (DBM::is_result($r)) {
$tpl = get_markup_template('profile_entry.tpl');