]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Admin/DBSync.php
Merge pull request #12424 from MrPetovan/task/10100-contact-relationship-prominence
[friendica.git] / src / Module / Admin / DBSync.php
index 662fe08e27c5143199720d001c26da6adcffd847..bb1fa903305552b7aa3af6c8a01d95e9b6abcf83 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -30,14 +30,14 @@ use Friendica\Module\BaseAdmin;
 
 class DBSync extends BaseAdmin
 {
-       public static function content(array $parameters = [])
+       protected function content(array $request = []): string
        {
-               parent::content($parameters);
+               parent::content();
 
                $a = DI::app();
 
-               $action = $parameters['action'] ?? '';
-               $update = $parameters['update'] ?? 0;
+               $action = $this->parameters['action'] ?? '';
+               $update = $this->parameters['update'] ?? 0;
 
                switch ($action) {
                        case 'mark':
@@ -48,13 +48,13 @@ class DBSync extends BaseAdmin
                                                DI::config()->set('system', 'build', intval($curr) + 1);
                                        }
 
-                                       info(DI::l10n()->t('Update has been marked successful'));
+                                       DI::sysmsg()->addInfo(DI::l10n()->t('Update has been marked successful'));
                                }
 
                                break;
                        case 'check':
                                // @TODO Seems like a similar logic like Update::check()
-                               $retval = DBStructure::update($a->getBasePath(), false, true);
+                               $retval = DBStructure::performUpdate();
                                if ($retval === '') {
                                        $o = DI::l10n()->t("Database structure update %s was successfully applied.", DB_UPDATE_VERSION) . "<br />";
                                } else {