Rename DBM method calls to DBA method calls

This commit is contained in:
Hypolite Petovan 2018-07-21 08:40:21 -04:00 committed by Hypolite Petovan
parent 8ddb94ef06
commit 0ec44f3e8a
153 changed files with 813 additions and 918 deletions

View file

@ -7,7 +7,6 @@ use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Core\L10n;
use Friendica\Database\DBA;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\Profile;
@ -40,14 +39,14 @@ function common_content(App $a)
if ($cmd === 'loc' && $cid) {
$contact = DBA::selectFirst('contact', ['name', 'url', 'photo'], ['id' => $cid, 'uid' => $uid]);
if (DBM::is_result($contact)) {
if (DBA::is_result($contact)) {
$a->page['aside'] = "";
Profile::load($a, "", 0, Contact::getDetailsByURL($contact["url"]));
}
} else {
$contact = DBA::selectFirst('contact', ['name', 'url', 'photo'], ['self' => true, 'uid' => $uid]);
if (DBM::is_result($contact)) {
if (DBA::is_result($contact)) {
$vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"), [
'$name' => htmlentities($contact['name']),
'$photo' => $contact['photo'],
@ -61,17 +60,17 @@ function common_content(App $a)
}
}
if (!DBM::is_result($contact)) {
if (!DBA::is_result($contact)) {
return;
}
if (!$cid && Profile::getMyURL()) {
$contact = DBA::selectFirst('contact', ['id'], ['nurl' => normalise_link(Profile::getMyURL()), 'uid' => $uid]);
if (DBM::is_result($contact)) {
if (DBA::is_result($contact)) {
$cid = $contact['id'];
} else {
$gcontact = DBA::selectFirst('gcontact', ['id'], ['nurl' => normalise_link(Profile::getMyURL())]);
if (DBM::is_result($gcontact)) {
if (DBA::is_result($gcontact)) {
$zcid = $gcontact['id'];
}
}
@ -100,7 +99,7 @@ function common_content(App $a)
$r = GContact::commonFriendsZcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']);
}
if (!DBM::is_result($r)) {
if (!DBA::is_result($r)) {
return $o;
}