$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;
$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;
use Friendica\Core\Config;
function pumpio_sync_run(&$argv, &$argc) {
- global $a, $db;
+ global $a;
require_once("addon/pumpio/pumpio.php");
use Friendica\Core\Config;
function twitter_sync_run($argv, $argc) {
- global $a, $db;
+ global $a;
require_once("addon/twitter/twitter.php");