]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/UserImport.php
Merge pull request #8075 from annando/html-escaping
[friendica.git] / src / Core / UserImport.php
index 97a6e6028e3b4905e341506a5f4d540ccbbd219d..fdacd2b2bf484bb8bb52128d0f906e549ee7dcf7 100644 (file)
@@ -7,9 +7,11 @@ namespace Friendica\Core;
 use Friendica\App;
 use Friendica\Database\DBA;
 use Friendica\Database\DBStructure;
+use Friendica\DI;
 use Friendica\Model\Photo;
 use Friendica\Object\Image;
 use Friendica\Util\Strings;
+use Friendica\Worker\Delivery;
 
 /**
  * @brief UserImport class
@@ -84,12 +86,11 @@ class UserImport
        /**
         * @brief Import account file exported from mod/uexport
         *
-        * @param App   $a    Friendica App Class
         * @param array $file array from $_FILES
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public static function importAccount(App $a, $file)
+       public static function importAccount($file)
        {
                Logger::log("Start user import from " . $file['tmp_name']);
                /*
@@ -122,7 +123,7 @@ class UserImport
                }
 
                $oldbaseurl = $account['baseurl'];
-               $newbaseurl = System::baseUrl();
+               $newbaseurl = DI::baseUrl();
 
                $oldaddr = str_replace('http://', '@', Strings::normaliseLink($oldbaseurl));
                $newaddr = str_replace('http://', '@', Strings::normaliseLink($newbaseurl));
@@ -278,9 +279,9 @@ class UserImport
                }
 
                // send relocate messages
-               Worker::add(PRIORITY_HIGH, 'Notifier', 'relocate', $newuid);
+               Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, $newuid);
 
                info(L10n::t("Done. You can now login with your username and password"));
-               $a->internalRedirect('login');
+               DI::baseUrl()->redirect('login');
        }
 }