mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
Rename Friendica\Database\dba to Friendica\Database\DBA
This commit is contained in:
parent
b6a1df0598
commit
af6dbc654f
127 changed files with 1169 additions and 1169 deletions
|
@ -4,7 +4,7 @@ namespace Friendica\Core\Console;
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Database\dba;
|
||||
use Friendica\Database\DBA;
|
||||
use RuntimeException;
|
||||
|
||||
/**
|
||||
|
@ -61,12 +61,12 @@ HELP;
|
|||
}
|
||||
|
||||
$nurl = normalise_link($this->getArgument(0));
|
||||
if (!dba::exists('contact', ['nurl' => $nurl, 'archive' => false])) {
|
||||
if (!DBA::exists('contact', ['nurl' => $nurl, 'archive' => false])) {
|
||||
throw new RuntimeException(L10n::t('Could not find any unarchived contact entry for this URL (%s)', $nurl));
|
||||
}
|
||||
if (dba::update('contact', ['archive' => true], ['nurl' => $nurl])) {
|
||||
if (DBA::update('contact', ['archive' => true], ['nurl' => $nurl])) {
|
||||
$condition = ["`cid` IN (SELECT `id` FROM `contact` WHERE `archive`)"];
|
||||
dba::delete('queue', $condition);
|
||||
DBA::delete('queue', $condition);
|
||||
$this->out(L10n::t('The contact entries have been archived'));
|
||||
} else {
|
||||
throw new RuntimeException('The contact archival failed.');
|
||||
|
|
|
@ -7,7 +7,7 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Install;
|
||||
use Friendica\Core\Theme;
|
||||
use Friendica\Database\dba;
|
||||
use Friendica\Database\DBA;
|
||||
use RuntimeException;
|
||||
|
||||
require_once 'mod/install.php';
|
||||
|
@ -155,7 +155,7 @@ HELP;
|
|||
);
|
||||
|
||||
|
||||
if (!dba::connect($db_host, $db_user, $db_pass, $db_data)) {
|
||||
if (!DBA::connect($db_host, $db_user, $db_pass, $db_data)) {
|
||||
$result['status'] = false;
|
||||
$result['help'] = 'Failed, please check your MySQL settings and credentials.';
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace Friendica\Core\Console;
|
||||
|
||||
use Friendica\Core;
|
||||
use Friendica\Database\dba;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBStructure;
|
||||
use RuntimeException;
|
||||
|
||||
|
@ -58,7 +58,7 @@ HELP;
|
|||
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
|
||||
}
|
||||
|
||||
if (!dba::connected()) {
|
||||
if (!DBA::connected()) {
|
||||
throw new RuntimeException('Unable to connect to database');
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
namespace Friendica\Core\Console;
|
||||
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Database\dba;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Network\Probe;
|
||||
use RuntimeException;
|
||||
|
@ -81,9 +81,9 @@ HELP;
|
|||
}
|
||||
|
||||
$nurl = normalise_link($net['url']);
|
||||
$contact = dba::selectFirst("contact", ["id"], ["nurl" => $nurl, "uid" => 0]);
|
||||
$contact = DBA::selectFirst("contact", ["id"], ["nurl" => $nurl, "uid" => 0]);
|
||||
if (DBM::is_result($contact)) {
|
||||
dba::update("contact", ["hidden" => true], ["id" => $contact["id"]]);
|
||||
DBA::update("contact", ["hidden" => true], ["id" => $contact["id"]]);
|
||||
$this->out('NOTICE: The account should be silenced from the global community page');
|
||||
} else {
|
||||
throw new RuntimeException('NOTICE: Could not find any entry for this URL (' . $nurl . ')');
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace Friendica\Core\Console;
|
|||
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Database\dba;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\User;
|
||||
use RuntimeException;
|
||||
|
@ -64,7 +64,7 @@ HELP;
|
|||
|
||||
$nick = $this->getArgument(0);
|
||||
|
||||
$user = dba::selectFirst('user', ['uid'], ['nickname' => $nick]);
|
||||
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $nick]);
|
||||
if (!DBM::is_result($user)) {
|
||||
throw new RuntimeException(L10n::t('User not found'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue