From: Tobias Hößl Date: Sat, 4 Aug 2012 08:48:42 +0000 (+0200) Subject: Merge branch 'master' of github.com:CatoTH/friendica-addons X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8751d2221b2be61e81219d0b8d9dfc38483f2f09;p=friendica-addons.git Merge branch 'master' of github.com:CatoTH/friendica-addons --- 8751d2221b2be61e81219d0b8d9dfc38483f2f09 diff --cc dav/friendica/database-init.inc.php index 00000000,7c0d23a3..527b7671 mode 000000,100644..100644 --- a/dav/friendica/database-init.inc.php +++ b/dav/friendica/database-init.inc.php @@@ -1,0 -1,270 +1,270 @@@ + q($st); + if ($db->error) $errors[] = $db->error; + } + + return $errors; + } + + /** + * @return array + */ + function dav_upgrade_tables() + { + $ver = dav_check_tables(); + if (!in_array($ver, array(1))) return array("Unknown error"); + + $stms = dav_get_update_statements($ver); + $errors = array(); + + global $db; - foreach ($stms as $st) { ++ foreach ($stms as $st) { // @TODO Friendica-dependent + $db->q($st); + if ($db->error) $errors[] = $db->error; + } + + return $errors; + }