diff options
author | Max Kostikov <max@kostikov.co> | 2019-05-04 22:37:21 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2019-05-04 22:37:21 +0200 |
commit | 2aa76d257ccd29144234408563c46d5af10a83c0 (patch) | |
tree | 33390ef8c49a2fe1695841d5123dfaccfd50f68a /Zotlabs/Lib | |
parent | 32c0be8bde0f59f23231b0094163a1c4295d4fc8 (diff) | |
parent | 1da46025676d2aae84e4f90e8f6fef733ff156eb (diff) | |
download | volse-hubzilla-2aa76d257ccd29144234408563c46d5af10a83c0.tar.gz volse-hubzilla-2aa76d257ccd29144234408563c46d5af10a83c0.tar.bz2 volse-hubzilla-2aa76d257ccd29144234408563c46d5af10a83c0.zip |
Merge branch 'db_update' into 'dev'
port db update improvements from zap
See merge request hubzilla/core!1628
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/DB_Upgrade.php | 9 |
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 ] ) ] |