Additional work for PR 3778 #433

Merged
annando merged 1 commit from dba-things into master 2017-10-12 23:37:27 +02:00
3 changed files with 11 additions and 8 deletions

View file

@ -242,10 +242,11 @@ function dav_create_tables()
$stms = dav_get_create_statements();
$errors = array();
global $db;
foreach ($stms as $st) { // @TODO Friendica-dependent
$db->q($st);
if ($db->error) $errors[] = $db->error;
dba::e($st);
if (dba::errorMessage()) {
$errors[] = dba::errorMessage();
}
}
return $errors;
@ -261,10 +262,12 @@ function dav_upgrade_tables()
$stms = dav_get_update_statements($ver);
$errors = array();
global $db;
foreach ($stms as $st) { // @TODO Friendica-dependent
$db->q($st);
if ($db->error) $errors[] = $db->error;
dba::e($st);
if (dba::errorMessage()) {
$errors[] = dba::errorMessage();
}
}
return $errors;

View file

@ -2,7 +2,7 @@
use Friendica\Core\Config;
function pumpio_sync_run(&$argv, &$argc) {
global $a, $db;
global $a;
require_once("addon/pumpio/pumpio.php");

View file

@ -2,7 +2,7 @@
use Friendica\Core\Config;
function twitter_sync_run($argv, $argc) {
global $a, $db;
global $a;
require_once("addon/twitter/twitter.php");