]> git.mxchange.org Git - friendica.git/blobdiff - mod/uimport.php
Remove mod/profile.php
[friendica.git] / mod / uimport.php
index 2061d4552047c26f1693c144f986b1bf0476f304..22a3161559d46d48cf29149a906a49e6a1de9c2f 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;
        }
@@ -42,14 +42,14 @@ function uimport_content(App $a)
        }
 
 
-       if (x($_SESSION, 'theme')) {
+       if (!empty($_SESSION['theme'])) {
                unset($_SESSION['theme']);
        }
-       if (x($_SESSION, 'mobile-theme')) {
+       if (!empty($_SESSION['mobile-theme'])) {
                unset($_SESSION['mobile-theme']);
        }
 
-       $tpl = get_markup_template("uimport.tpl");
+       $tpl = Renderer::getMarkupTemplate("uimport.tpl");
        return Renderer::replaceMacros($tpl, [
                '$regbutt' => L10n::t('Import'),
                '$import' => [