aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Admin
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
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')
-rw-r--r--Zotlabs/Module/Admin/Addons.php3
-rw-r--r--Zotlabs/Module/Admin/Dbsync.php30
-rw-r--r--Zotlabs/Module/Admin/Site.php2
3 files changed, 13 insertions, 22 deletions
diff --git a/Zotlabs/Module/Admin/Addons.php b/Zotlabs/Module/Admin/Addons.php
index b67ab7b3a..e088353e3 100644
--- a/Zotlabs/Module/Admin/Addons.php
+++ b/Zotlabs/Module/Admin/Addons.php
@@ -77,6 +77,7 @@ class Addons {
} catch (\PHPGit\Exception\GitException $e) {
json_return_and_die(array('message' => 'Error updating addon repo.', 'success' => false));
}
+ break;
case 'removerepo':
if (array_key_exists('repoName', $_REQUEST)) {
$repoName = $_REQUEST['repoName'];
@@ -111,6 +112,7 @@ class Addons {
} else {
json_return_and_die(array('message' => 'Error deleting addon repo.', 'success' => false));
}
+ break;
case 'installrepo':
if (array_key_exists('repoURL', $_REQUEST)) {
require_once('library/PHPGit.autoload.php'); // Load PHPGit dependencies
@@ -172,6 +174,7 @@ class Addons {
$repo = $git->probeRepo();
json_return_and_die(array('repo' => $repo, 'message' => '', 'success' => true));
}
+ break;
case 'addrepo':
if (array_key_exists('repoURL', $_REQUEST)) {
require_once('library/PHPGit.autoload.php'); // Load PHPGit dependencies
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
+}
diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php
index f6e3ab12b..85f81e344 100644
--- a/Zotlabs/Module/Admin/Site.php
+++ b/Zotlabs/Module/Admin/Site.php
@@ -129,7 +129,7 @@ class Site {
set_config('system', 'register_duty', $this->register_duty);
set_config('system', 'register_duty_jso', $this->joo);
} else {
- notice('ZAR0130E,'.t('Errors') . ': ' . $this->error) . EOL . $this->msgfg;
+ notice('ZAR0130E,' . t('Errors') . ': ' . $this->error . EOL . $this->msgfg . EOL);
}
}
}