aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Admin/Dbsync.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-21 11:20:23 +0200
committerMario <mario@mariovavti.com>2022-10-21 11:20:23 +0200
commit5edd13c6bb89c7434d8437f8cc74c038371fdbf8 (patch)
treebc7f29762e9aa306f80b4881128607a49b5bb74f /Zotlabs/Module/Admin/Dbsync.php
parent7ca289edd0d568a51dfdf225a5ef0e9663c38838 (diff)
downloadvolse-hubzilla-5edd13c6bb89c7434d8437f8cc74c038371fdbf8.tar.gz
volse-hubzilla-5edd13c6bb89c7434d8437f8cc74c038371fdbf8.tar.bz2
volse-hubzilla-5edd13c6bb89c7434d8437f8cc74c038371fdbf8.zip
fix various issues
Diffstat (limited to 'Zotlabs/Module/Admin/Dbsync.php')
-rw-r--r--Zotlabs/Module/Admin/Dbsync.php30
1 files changed, 9 insertions, 21 deletions
diff --git a/Zotlabs/Module/Admin/Dbsync.php b/Zotlabs/Module/Admin/Dbsync.php
index 183834301..b68e7bbc2 100644
--- a/Zotlabs/Module/Admin/Dbsync.php
+++ b/Zotlabs/Module/Admin/Dbsync.php
@@ -5,11 +5,11 @@ namespace Zotlabs\Module\Admin;
class Dbsync {
-
+
function get() {
$o = '';
-
+
if(argc() > 3 && intval(argv(3)) && argv(2) === 'mark') {
// remove the old style config if it exists
del_config('database', 'update_r' . intval(argv(3)));
@@ -29,7 +29,7 @@ class Dbsync {
if(method_exists($c,'verify')) {
$retval = $c->verify();
if($retval === UPDATE_FAILED) {
- $o .= sprintf( t('Verification of update %s failed. Check system logs.'), $s);
+ $o .= sprintf( t('Verification of update %s failed. Check system logs.'), $s);
}
elseif($retval === UPDATE_SUCCESS) {
$o .= sprintf( t('Update %s was successfully applied.'), $s);
@@ -44,20 +44,8 @@ class Dbsync {
}
else
$o .= sprintf( t('Update function %s could not be found.'), $s);
-
- return $o;
-
-
-
-
- // remove the old style config if it exists
- del_config('database', 'update_r' . intval(argv(3)));
- set_config('database', '_' . intval(argv(3)), 'success');
- if(intval(get_config('system','db_version')) < intval(argv(3)))
- set_config('system','db_version',intval(argv(3)));
- info( t('Update has been marked successful') . EOL);
- goaway(z_root() . '/admin/dbsync');
+ return $o;
}
if(argc() > 2 && intval(argv(2))) {
@@ -68,7 +56,7 @@ class Dbsync {
$c = new $cls();
$retval = $c->run();
if($retval === UPDATE_FAILED) {
- $o .= sprintf( t('Executing update procedure %s failed. Check system logs.'), $s);
+ $o .= sprintf( t('Executing update procedure %s failed. Check system logs.'), $s);
}
elseif($retval === UPDATE_SUCCESS) {
$o .= sprintf( t('Update %s was successfully applied.'), $s);
@@ -79,10 +67,10 @@ class Dbsync {
}
else
$o .= sprintf( t('Update function %s could not be found.'), $s);
-
+
return $o;
}
-
+
$failed = array();
$r = q("select * from config where cat = 'database' ");
if(count($r)) {
@@ -107,7 +95,7 @@ class Dbsync {
else {
return '<div class="generic-content-wrapper-styled"><h3>' . t('No failed updates.') . '</h3></div>';
}
-
+
return $o;
}
-} \ No newline at end of file
+}