mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-19 22:43:40 +00:00
Merge pull request #433 from annando/dba-things
Additional work for PR 3778
This commit is contained in:
commit
6a809a926c
3 changed files with 11 additions and 8 deletions
|
@ -242,10 +242,11 @@ function dav_create_tables()
|
||||||
$stms = dav_get_create_statements();
|
$stms = dav_get_create_statements();
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
||||||
global $db;
|
|
||||||
foreach ($stms as $st) { // @TODO Friendica-dependent
|
foreach ($stms as $st) { // @TODO Friendica-dependent
|
||||||
$db->q($st);
|
dba::e($st);
|
||||||
if ($db->error) $errors[] = $db->error;
|
if (dba::errorMessage()) {
|
||||||
|
$errors[] = dba::errorMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $errors;
|
return $errors;
|
||||||
|
@ -261,10 +262,12 @@ function dav_upgrade_tables()
|
||||||
$stms = dav_get_update_statements($ver);
|
$stms = dav_get_update_statements($ver);
|
||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
global $db;
|
|
||||||
foreach ($stms as $st) { // @TODO Friendica-dependent
|
foreach ($stms as $st) { // @TODO Friendica-dependent
|
||||||
$db->q($st);
|
dba::e($st);
|
||||||
if ($db->error) $errors[] = $db->error;
|
if (dba::errorMessage()) {
|
||||||
|
$errors[] = dba::errorMessage();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $errors;
|
return $errors;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
|
||||||
function pumpio_sync_run(&$argv, &$argc) {
|
function pumpio_sync_run(&$argv, &$argc) {
|
||||||
global $a, $db;
|
global $a;
|
||||||
|
|
||||||
require_once("addon/pumpio/pumpio.php");
|
require_once("addon/pumpio/pumpio.php");
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
|
|
||||||
function twitter_sync_run($argv, $argc) {
|
function twitter_sync_run($argv, $argc) {
|
||||||
global $a, $db;
|
global $a;
|
||||||
|
|
||||||
require_once("addon/twitter/twitter.php");
|
require_once("addon/twitter/twitter.php");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue