mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:05:16 +02:00
Rename DBM method calls to DBA method calls
This commit is contained in:
parent
8ddb94ef06
commit
0ec44f3e8a
153 changed files with 813 additions and 918 deletions
|
@ -14,7 +14,6 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Profile;
|
||||
|
@ -35,7 +34,7 @@ function profiles_init(App $a) {
|
|||
intval($a->argv[2]),
|
||||
intval(local_user())
|
||||
);
|
||||
if (! DBM::is_result($r)) {
|
||||
if (! DBA::is_result($r)) {
|
||||
notice(L10n::t('Profile not found.') . EOL);
|
||||
goaway('profiles');
|
||||
return; // NOTREACHED
|
||||
|
@ -54,7 +53,7 @@ function profiles_init(App $a) {
|
|||
intval($a->argv[2]),
|
||||
intval(local_user())
|
||||
);
|
||||
if (DBM::is_result($r)) {
|
||||
if (DBA::is_result($r)) {
|
||||
info(L10n::t('Profile deleted.').EOL);
|
||||
}
|
||||
|
||||
|
@ -69,7 +68,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 = (DBA::is_result($r0) ? count($r0) : 0);
|
||||
|
||||
$name = L10n::t('Profile-') . ($num_profiles + 1);
|
||||
|
||||
|
@ -91,7 +90,7 @@ function profiles_init(App $a) {
|
|||
);
|
||||
|
||||
info(L10n::t('New profile created.') . EOL);
|
||||
if (DBM::is_result($r3) && count($r3) == 1) {
|
||||
if (DBA::is_result($r3) && count($r3) == 1) {
|
||||
goaway('profiles/' . $r3[0]['id']);
|
||||
}
|
||||
|
||||
|
@ -105,14 +104,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 = (DBA::is_result($r0) ? count($r0) : 0);
|
||||
|
||||
$name = L10n::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(! DBA::is_result($r1)) {
|
||||
notice(L10n::t('Profile unavailable to clone.') . EOL);
|
||||
killme();
|
||||
return;
|
||||
|
@ -130,7 +129,7 @@ function profiles_init(App $a) {
|
|||
dbesc($name)
|
||||
);
|
||||
info(L10n::t('New profile created.') . EOL);
|
||||
if ((DBM::is_result($r3)) && (count($r3) == 1)) {
|
||||
if ((DBA::is_result($r3)) && (count($r3) == 1)) {
|
||||
goaway('profiles/'.$r3[0]['id']);
|
||||
}
|
||||
|
||||
|
@ -145,7 +144,7 @@ function profiles_init(App $a) {
|
|||
intval($a->argv[1]),
|
||||
intval(local_user())
|
||||
);
|
||||
if (! DBM::is_result($r)) {
|
||||
if (! DBA::is_result($r)) {
|
||||
notice(L10n::t('Profile not found.') . EOL);
|
||||
killme();
|
||||
return;
|
||||
|
@ -192,7 +191,7 @@ function profiles_post(App $a) {
|
|||
intval($a->argv[1]),
|
||||
intval(local_user())
|
||||
);
|
||||
if (! DBM::is_result($orig)) {
|
||||
if (! DBA::is_result($orig)) {
|
||||
notice(L10n::t('Profile not found.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
@ -287,13 +286,13 @@ function profiles_post(App $a) {
|
|||
dbesc($newname),
|
||||
intval(local_user())
|
||||
);
|
||||
if (! DBM::is_result($r)) {
|
||||
if (! DBA::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 (DBA::is_result($r)) {
|
||||
$prf = $r[0]['url'];
|
||||
$newname = $r[0]['name'];
|
||||
}
|
||||
|
@ -522,7 +521,7 @@ function profiles_content(App $a) {
|
|||
intval($a->argv[1]),
|
||||
intval(local_user())
|
||||
);
|
||||
if (! DBM::is_result($r)) {
|
||||
if (! DBA::is_result($r)) {
|
||||
notice(L10n::t('Profile not found.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
@ -654,7 +653,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 (DBA::is_result($r)) {
|
||||
//Go to the default profile.
|
||||
goaway('profiles/' . $r[0]['id']);
|
||||
}
|
||||
|
@ -663,7 +662,7 @@ function profiles_content(App $a) {
|
|||
$r = q("SELECT * FROM `profile` WHERE `uid` = %d",
|
||||
local_user());
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
if (DBA::is_result($r)) {
|
||||
|
||||
$tpl = get_markup_template('profile_entry.tpl');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue