Several more constants rewritten to getConfig()
[mailer.git] / inc / modules / admin.php
index 3b196b40d1292cfb5bd02c4c70e68012d70586b1..6aa04a68692fd6f8b4f8caf53bbcb9a88de14740 100644 (file)
@@ -66,12 +66,12 @@ if (!isAdminRegistered()) {
                destroyAdminSession(false);
 
                // Do registration
-               $ret = REGISTER_ADMIN(REQUEST_POST('login'), $hashedPass, constant('WEBMASTER'));
+               $ret = REGISTER_ADMIN(REQUEST_POST('login'), $hashedPass, getConfig('WEBMASTER'));
 
                // Check if registration wents fine
                switch ($ret) {
                        case 'done':
-                               $done = changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
+                               $done = changeDataInFile(getConfig('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
                                if ($done === true) {
                                        // Registering is done
                                        redirectToUrl('modules.php?module=admin&register=done');
@@ -99,7 +99,7 @@ if (!isAdminRegistered()) {
                                // Admin still not registered?
                                if (!isAdminRegistered()) {
                                        // Write to config that registration is done
-                                       changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
+                                       changeDataInFile(getConfig('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
 
                                        // Load URL for login
                                        redirectToUrl('modules.php?module=admin');
@@ -243,7 +243,7 @@ if (!isAdminRegistered()) {
 
                        case 'pass': // Wrong password
                                REQUEST_SET_POST('ok', $ret);
-                               $ret = '{--WRONG_PASS--} [<a href="{!URL!}/modules.php?module=admin&amp;reset_pass=1">{--ADMIN_RESET_PASS--}</a>]';
+                               $ret = '{--WRONG_PASS--} [<a href="{?URL?}/modules.php?module=admin&amp;reset_pass=1">{--ADMIN_RESET_PASS--}</a>]';
                                destroyAdminSession();
                                break;