aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/DB_Upgrade.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-05-03 15:13:13 +0200
committerMario Vavti <mario@mariovavti.com>2019-05-03 15:13:13 +0200
commit1da46025676d2aae84e4f90e8f6fef733ff156eb (patch)
treebc114b2a58f10ebf3422bfa297bfe135bbc9a896 /Zotlabs/Lib/DB_Upgrade.php
parent98b6362c075167eb2260b8b07d7f5e5a56ab8601 (diff)
downloadvolse-hubzilla-1da46025676d2aae84e4f90e8f6fef733ff156eb.tar.gz
volse-hubzilla-1da46025676d2aae84e4f90e8f6fef733ff156eb.tar.bz2
volse-hubzilla-1da46025676d2aae84e4f90e8f6fef733ff156eb.zip
port db update improvements from zap
Diffstat (limited to 'Zotlabs/Lib/DB_Upgrade.php')
-rw-r--r--Zotlabs/Lib/DB_Upgrade.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/Zotlabs/Lib/DB_Upgrade.php b/Zotlabs/Lib/DB_Upgrade.php
index 4038a2d53..b6e3f7b7b 100644
--- a/Zotlabs/Lib/DB_Upgrade.php
+++ b/Zotlabs/Lib/DB_Upgrade.php
@@ -58,10 +58,15 @@ class DB_Upgrade {
$c = new $cls();
+
$retval = $c->run();
if($retval != UPDATE_SUCCESS) {
+
+ $source = t('Source code of failed update: ') . "\n\n" . @file_get_contents('Zotlabs/Update/' . $s . '.php');
+
+
// Prevent sending hundreds of thousands of emails by creating
// a lockfile.
@@ -86,7 +91,9 @@ class DB_Upgrade {
'$sitename' => \App::$config['system']['sitename'],
'$siteurl' => z_root(),
'$update' => $x,
- '$error' => sprintf( t('Update %s failed. See error logs.'), $x)
+ '$error' => sprintf( t('Update %s failed. See error logs.'), $x),
+ '$baseurl' => z_root(),
+ '$source' => $source
]
)
]