]> git.mxchange.org Git - friendica.git/blobdiff - mod/uimport.php
Replaced all preg calls in the calls with the new function
[friendica.git] / mod / uimport.php
index 3c80b671be45a308f4449a418705211f059e8de0..436802265b2a85c1dc272534ff1b6ff4db913145 100644 (file)
@@ -9,10 +9,11 @@ use Friendica\Core\Config;
 use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\UserImport;
+use Friendica\Core\Renderer;
 
 function uimport_post(App $a)
 {
-       if ((Config::get('config', 'register_policy') != REGISTER_OPEN) && !is_site_admin()) {
+       if ((Config::get('config', 'register_policy') != \Friendica\Module\Register::OPEN) && !is_site_admin()) {
                notice(L10n::t('Permission denied.') . EOL);
                return;
        }
@@ -25,7 +26,7 @@ function uimport_post(App $a)
 
 function uimport_content(App $a)
 {
-       if ((Config::get('config', 'register_policy') != REGISTER_OPEN) && !is_site_admin()) {
+       if ((Config::get('config', 'register_policy') != \Friendica\Module\Register::OPEN) && !is_site_admin()) {
                notice(L10n::t('User imports on closed servers can only be done by an administrator.') . EOL);
                return;
        }
@@ -40,16 +41,8 @@ function uimport_content(App $a)
                }
        }
 
-
-       if (x($_SESSION, 'theme')) {
-               unset($_SESSION['theme']);
-       }
-       if (x($_SESSION, 'mobile-theme')) {
-               unset($_SESSION['mobile-theme']);
-       }
-
-       $tpl = get_markup_template("uimport.tpl");
-       return replace_macros($tpl, [
+       $tpl = Renderer::getMarkupTemplate("uimport.tpl");
+       return Renderer::replaceMacros($tpl, [
                '$regbutt' => L10n::t('Import'),
                '$import' => [
                        'title' => L10n::t("Move account"),