mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 01:25:21 +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
|
@ -2,7 +2,6 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Protocol\OStatus;
|
||||
|
||||
require_once('include/security.php');
|
||||
|
@ -45,7 +44,7 @@ function pubsub_init(App $a)
|
|||
$subscribe = (($hub_mode === 'subscribe') ? 1 : 0);
|
||||
|
||||
$owner = DBA::selectFirst('user', ['uid'], ['nickname' => $nick, 'account_expired' => false, 'account_removed' => false]);
|
||||
if (!DBM::is_result($owner)) {
|
||||
if (!DBA::is_result($owner)) {
|
||||
logger('Local account not found: ' . $nick);
|
||||
hub_return(false, '');
|
||||
}
|
||||
|
@ -57,7 +56,7 @@ function pubsub_init(App $a)
|
|||
}
|
||||
|
||||
$contact = DBA::selectFirst('contact', ['id', 'poll'], $condition);
|
||||
if (!DBM::is_result($contact)) {
|
||||
if (!DBA::is_result($contact)) {
|
||||
logger('Contact ' . $contact_id . ' not found.');
|
||||
hub_return(false, '');
|
||||
}
|
||||
|
@ -94,21 +93,21 @@ function pubsub_post(App $a)
|
|||
$contact_id = (($a->argc > 2) ? intval($a->argv[2]) : 0 );
|
||||
|
||||
$importer = DBA::selectFirst('user', [], ['nickname' => $nick, 'account_expired' => false, 'account_removed' => false]);
|
||||
if (!DBM::is_result($importer)) {
|
||||
if (!DBA::is_result($importer)) {
|
||||
hub_post_return();
|
||||
}
|
||||
|
||||
$condition = ['id' => $contact_id, 'uid' => $importer['uid'], 'subhub' => true, 'blocked' => false];
|
||||
$contact = DBA::selectFirst('contact', [], $condition);
|
||||
|
||||
if (!DBM::is_result($contact)) {
|
||||
if (!DBA::is_result($contact)) {
|
||||
$author = OStatus::salmonAuthor($xml, $importer);
|
||||
if (!empty($author['contact-id'])) {
|
||||
$condition = ['id' => $author['contact-id'], 'uid' => $importer['uid'], 'subhub' => true, 'blocked' => false];
|
||||
$contact = DBA::selectFirst('contact', [], $condition);
|
||||
logger('No record for ' . $nick .' with contact id ' . $contact_id . ' - using '.$author['contact-id'].' instead.');
|
||||
}
|
||||
if (!DBM::is_result($contact)) {
|
||||
if (!DBA::is_result($contact)) {
|
||||
logger('Contact ' . $author["author-link"] . ' (' . $contact_id . ') for user ' . $nick . " wasn't found - ignored. XML: " . $xml);
|
||||
hub_post_return();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue