]> git.mxchange.org Git - friendica-addons.git/commitdiff
Additional work for PR 3778
authorMichael <heluecht@pirati.ca>
Thu, 12 Oct 2017 16:10:42 +0000 (16:10 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 12 Oct 2017 16:10:42 +0000 (16:10 +0000)
dav/friendica/database-init.inc.php
pumpio/pumpio_sync.php
twitter/twitter_sync.php

index f91ddb259cbe24ff07198af7c1c8b96a57168c81..e172b44dc810c0c017d1262816193b3a1a2fbc23 100644 (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;
index a23eb4b07d9202039ad1319e205da8c2009f6896..834bc1e6db05d661cf7d01891697aba0d28d0813 100644 (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");
 
index ed9f3f852406393161c9aff68cb8ad2aa7344359..5d6e8b2ffb28d30be9e5f19cda4b0490d587468d 100644 (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");