]> 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 5df919d7d6d9f880ffd02a0db9a56fbb7913a893..436802265b2a85c1dc272534ff1b6ff4db913145 100644 (file)
@@ -13,7 +13,7 @@ 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;
        }
@@ -26,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;
        }
@@ -41,14 +41,6 @@ function uimport_content(App $a)
                }
        }
 
-
-       if (x($_SESSION, 'theme')) {
-               unset($_SESSION['theme']);
-       }
-       if (x($_SESSION, 'mobile-theme')) {
-               unset($_SESSION['mobile-theme']);
-       }
-
        $tpl = Renderer::getMarkupTemplate("uimport.tpl");
        return Renderer::replaceMacros($tpl, [
                '$regbutt' => L10n::t('Import'),