mirror of
https://github.com/friendica/friendica
synced 2025-04-30 05:04:22 +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
|
@ -9,7 +9,6 @@ use Friendica\Core\Addon;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\Item;
|
||||
|
@ -66,7 +65,7 @@ class Notifier
|
|||
if ($cmd == Delivery::MAIL) {
|
||||
$normal_mode = false;
|
||||
$message = DBA::selectFirst('mail', ['uid', 'contact-id'], ['id' => $item_id]);
|
||||
if (!DBM::is_result($message)) {
|
||||
if (!DBA::is_result($message)) {
|
||||
return;
|
||||
}
|
||||
$uid = $message['uid'];
|
||||
|
@ -74,7 +73,7 @@ class Notifier
|
|||
} elseif ($cmd == Delivery::SUGGESTION) {
|
||||
$normal_mode = false;
|
||||
$suggest = DBA::selectFirst('fsuggest', ['uid', 'cid'], ['id' => $item_id]);
|
||||
if (!DBM::is_result($suggest)) {
|
||||
if (!DBA::is_result($suggest)) {
|
||||
return;
|
||||
}
|
||||
$uid = $suggest['uid'];
|
||||
|
@ -110,7 +109,7 @@ class Notifier
|
|||
$condition = ['id' => $item_id, 'visible' => true, 'moderated' => false];
|
||||
$target_item = Item::selectFirst([], $condition);
|
||||
|
||||
if (!DBM::is_result($target_item) || !intval($target_item['parent'])) {
|
||||
if (!DBA::is_result($target_item) || !intval($target_item['parent'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -122,7 +121,7 @@ class Notifier
|
|||
$params = ['order' => ['id']];
|
||||
$ret = Item::select([], $condition, $params);
|
||||
|
||||
if (!DBM::is_result($ret)) {
|
||||
if (!DBA::is_result($ret)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -224,7 +223,7 @@ class Notifier
|
|||
$fields = ['forum', 'prv'];
|
||||
$condition = ['id' => $target_item['contact-id']];
|
||||
$contact = DBA::selectFirst('contact', $fields, $condition);
|
||||
if (!DBM::is_result($contact)) {
|
||||
if (!DBA::is_result($contact)) {
|
||||
// Should never happen
|
||||
return false;
|
||||
}
|
||||
|
@ -261,7 +260,7 @@ class Notifier
|
|||
intval($uid),
|
||||
dbesc(NETWORK_DFRN)
|
||||
);
|
||||
if (DBM::is_result($r)) {
|
||||
if (DBA::is_result($r)) {
|
||||
foreach ($r as $rr) {
|
||||
$recipients_followup[] = $rr['id'];
|
||||
}
|
||||
|
@ -344,14 +343,14 @@ class Notifier
|
|||
|
||||
// Send a salmon to the parent author
|
||||
$probed_contact = DBA::selectFirst('contact', ['url', 'notify'], ['id' => $thr_parent['author-id']]);
|
||||
if (DBM::is_result($probed_contact) && !empty($probed_contact["notify"])) {
|
||||
if (DBA::is_result($probed_contact) && !empty($probed_contact["notify"])) {
|
||||
logger('Notify parent author '.$probed_contact["url"].': '.$probed_contact["notify"]);
|
||||
$url_recipients[$probed_contact["notify"]] = $probed_contact["notify"];
|
||||
}
|
||||
|
||||
// Send a salmon to the parent owner
|
||||
$probed_contact = DBA::selectFirst('contact', ['url', 'notify'], ['id' => $thr_parent['owner-id']]);
|
||||
if (DBM::is_result($probed_contact) && !empty($probed_contact["notify"])) {
|
||||
if (DBA::is_result($probed_contact) && !empty($probed_contact["notify"])) {
|
||||
logger('Notify parent owner '.$probed_contact["url"].': '.$probed_contact["notify"]);
|
||||
$url_recipients[$probed_contact["notify"]] = $probed_contact["notify"];
|
||||
}
|
||||
|
@ -388,7 +387,7 @@ class Notifier
|
|||
intval($uid),
|
||||
dbesc(NETWORK_MAIL)
|
||||
);
|
||||
if (DBM::is_result($r)) {
|
||||
if (DBA::is_result($r)) {
|
||||
foreach ($r as $rr) {
|
||||
$recipients[] = $rr['id'];
|
||||
}
|
||||
|
@ -412,7 +411,7 @@ class Notifier
|
|||
}
|
||||
|
||||
// delivery loop
|
||||
if (DBM::is_result($r)) {
|
||||
if (DBA::is_result($r)) {
|
||||
foreach ($r as $contact) {
|
||||
logger("Deliver ".$item_id." to ".$contact['url']." via network ".$contact['network'], LOGGER_DEBUG);
|
||||
|
||||
|
@ -462,7 +461,7 @@ class Notifier
|
|||
|
||||
$r = array_merge($r2, $r1);
|
||||
|
||||
if (DBM::is_result($r)) {
|
||||
if (DBA::is_result($r)) {
|
||||
logger('pubdeliver '.$target_item["guid"].': '.print_r($r,true), LOGGER_DEBUG);
|
||||
|
||||
foreach ($r as $rr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue