From 20a06616b67427859de74a0bfd9d40732c4ec68d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 28 Oct 2009 16:20:55 +0000 Subject: [PATCH] Redirects fixed --- DOCS/TODOs.txt | 8 +++----- inc/modules/admin.php | 2 +- inc/modules/admin/what-config_secure.php | 2 +- inc/modules/guest/what-admin.php | 2 +- inc/modules/index.php | 5 +---- inc/mysql-manager.php | 5 ++--- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 705aa95944..0e69ce018b 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -169,16 +169,14 @@ ./inc/modules/member/what-unconfirmed.php:132: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() ./inc/modules/order.php:75: // @TODO Unused: 2,4 ./inc/monthly/monthly_bonus.php:70: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1000: // @TODO Commented out redirectToUrl('admin.php'); -./inc/mysql-manager.php:1600: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() -./inc/mysql-manager.php:1808: // @TODO Rewrite this to $content = SQL_FETCHARRAY() -./inc/mysql-manager.php:2124: // @TODO This can be somehow rewritten +./inc/mysql-manager.php:1599: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() +./inc/mysql-manager.php:1807: // @TODO Rewrite this to $content = SQL_FETCHARRAY() +./inc/mysql-manager.php:2123: // @TODO This can be somehow rewritten ./inc/mysql-manager.php:220: // @TODO Nothing helped??? ./inc/mysql-manager.php:255: // @TODO Rewrite this to a filter ./inc/mysql-manager.php:576: // @TODO Try to rewrite this to one or more functions ./inc/mysql-manager.php:605: // @TODO Try to rewrite this to one or more functions ./inc/mysql-manager.php:93:// @TODO Can we cache this? -./inc/mysql-manager.php:999: // @TODO Why does this lead into an endless loop but we still need it??? ./inc/reset/reset_birthday.php:91: // @TODO 4 is hard-coded here, should we move it out in config? ./inc/wrapper-functions.php:127:// @TODO Implement $compress ./inc/wrapper-functions.php:134:// @TODO Implement $decompress diff --git a/inc/modules/admin.php b/inc/modules/admin.php index 401dfc75d0..eda91788cf 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -101,7 +101,7 @@ if (!isAdminRegistered()) { changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'ADMIN-SETUP', "setConfigEntry('ADMIN_REGISTERED', '", "');", 'Y', 0); // Load URL for login - redirectToUrl('modules.php?module=admin'); + redirectToUrl('admin.php'); } // END - if break; } // END - switch diff --git a/inc/modules/admin/what-config_secure.php b/inc/modules/admin/what-config_secure.php index f140678842..47623c479e 100644 --- a/inc/modules/admin/what-config_secure.php +++ b/inc/modules/admin/what-config_secure.php @@ -54,7 +54,7 @@ if (isFormSent()) { unsetPostRequestElement(('salt_length')); // Redirect to logout link - redirectToUrl('modules.php?module=admin&logout=1'); + redirectToUrl('modules.php?module=admin&logout=1'); } // END - if // Save settings diff --git a/inc/modules/guest/what-admin.php b/inc/modules/guest/what-admin.php index 467a676f2f..3a94cfe4be 100644 --- a/inc/modules/guest/what-admin.php +++ b/inc/modules/guest/what-admin.php @@ -42,7 +42,7 @@ if (!defined('__SECURITY')) { } // END - if // A simple redirect... -redirectToUrl('modules.php?module=admin'); +redirectToUrl('admin.php'); // [EOF] ?> diff --git a/inc/modules/index.php b/inc/modules/index.php index 128dc6e3a7..ab37b5baa2 100644 --- a/inc/modules/index.php +++ b/inc/modules/index.php @@ -39,10 +39,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif (!isExtensionActive('sql_patches')) { - // The extension 'sql_patches' *MUST* be activated or you have lot's of problems! - redirectToUrl('modules.php?module=admin&ext_missing=sql_patches'); -} +} // END - if // Generate a tableset for the menu title and content loadTemplate('guest_header'); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 519d73c98a..958e54ac6b 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -995,9 +995,8 @@ function getModeAction ($mode, $what) { } elseif ((!isExtensionInstalled('sql_patches')) && ($mode != 'admin')) { // No sql_patches installed, but maybe we need to register an admin? if (isAdminRegistered()) { - // Redirect - // @TODO Why does this lead into an endless loop but we still need it??? - // @TODO Commented out redirectToUrl('admin.php'); + // Redirect to admin area + redirectToUrl('admin.php'); } // END - if } -- 2.30.2