__ACL_ALLOW rewritten to and @TODO finished
authorRoland Häder <roland@mxchange.org>
Sun, 1 Mar 2009 05:18:37 +0000 (05:18 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 1 Mar 2009 05:18:37 +0000 (05:18 +0000)
DOCS/TODOs.txt
inc/functions.php
inc/modules/admin.php
inc/modules/admin/admin-inc.php
inc/modules/login.php

index d1aa0a4db126d353e5889225be3382338c726976..1d5b971344017f49b63947829d1204019b0f284c 100644 (file)
 ./inc/functions.php:1306:      // @TODO Remove this if() block if all is working fine
 ./inc/functions.php:2019:// @TODO Can this function be deprecated?
 ./inc/functions.php:2334:// @TODO Rewrite all language constants to this function.
 ./inc/functions.php:1306:      // @TODO Remove this if() block if all is working fine
 ./inc/functions.php:2019:// @TODO Can this function be deprecated?
 ./inc/functions.php:2334:// @TODO Rewrite all language constants to this function.
-./inc/functions.php:2582:      // @TODO Try to find all locations where an FQFN is given to these two
-./inc/functions.php:2583:      // @TODO functions and avoid it.
-./inc/functions.php:2647:              // @TODO Add a little more infos here
-./inc/functions.php:2753:// @TODO Implement $compress
-./inc/functions.php:2760:// @TODO Implement $decompress
-./inc/functions.php:2863:      // @TODO We may want to switch over to UTF-8 here!
-./inc/functions.php:2871:// @TODO Rewrite this function to use READ_FILE() and WRITE_FILE()
+./inc/functions.php:2636:              // @TODO Add a little more infos here
+./inc/functions.php:2742:// @TODO Implement $compress
+./inc/functions.php:2749:// @TODO Implement $decompress
+./inc/functions.php:2852:      // @TODO We may want to switch over to UTF-8 here!
+./inc/functions.php:2860:// @TODO Rewrite this function to use READ_FILE() and WRITE_FILE()
 ./inc/mysql-manager.php:162:                   // @TODO Nothing helped???
 ./inc/mysql-manager.php:599:   // @TODO Why is this global??? #100
 ./inc/mysql-manager.php:927:                   // @TODO Why does this lead into an endless loop but we still need it???
 ./inc/mysql-manager.php:162:                   // @TODO Nothing helped???
 ./inc/mysql-manager.php:599:   // @TODO Why is this global??? #100
 ./inc/mysql-manager.php:927:                   // @TODO Why does this lead into an endless loop but we still need it???
index e779bae69271a9e53f4a732f5eb7e9f254b7adbb..af966907f678950999a0501f479ee3d47b96c567 100644 (file)
@@ -2575,19 +2575,8 @@ function getActualVersion ($type = 0) {
 
 // Loads an include file and logs any missing files for debug purposes
 function LOAD_INC ($INC) {
 
 // Loads an include file and logs any missing files for debug purposes
 function LOAD_INC ($INC) {
-       // Get constant path
-       $PATH = constant('PATH');
-
-       // Use the include file name directly
-       // @TODO Try to find all locations where an FQFN is given to these two
-       // @TODO functions and avoid it.
-       $FQFN = $INC;
-
-       // Check if PATH is in $INC
-       if (substr($INC, 0, $PATH) != $PATH) {
-               // Add it. This is why we need a trailing slash in config.php
-               $FQFN = $PATH . $INC;
-       } // END - if
+       // Add the path. This is why we need a trailing slash in config.php
+       $FQFN = constant('PATH') . $INC;
 
        // Is the include file there?
        if (!FILE_READABLE($FQFN)) {
 
        // Is the include file there?
        if (!FILE_READABLE($FQFN)) {
index 18156e298ca26ac7c1766767bef3878527bf0e38..275e45d6059e203a9bc68ff7bacbfadc6da09a3d 100644 (file)
@@ -341,7 +341,7 @@ if (!isAdminRegistered()) {
        {
        case "done":
                // Check for access control line of current menu entry
        {
        case "done":
                // Check for access control line of current menu entry
-               define('__ACL_ALLOW', RUN_FILTER('check_admin_acl'));
+               $GLOBALS['acl_allow'] = RUN_FILTER('check_admin_acl');
 
                // When type of admin menu is not set fallback to old menu system
                if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', "OLD");
 
                // When type of admin menu is not set fallback to old menu system
                if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', "OLD");
index 228fdf50182478491ab3cc50fffe621900c055d1..288510d631cd95a701c338fb6a2a3765ebc7ea51 100644 (file)
@@ -270,10 +270,10 @@ LIMIT 1", array($act, $wht, $wht), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result_action) == 1) {
                // Is valid but does the inlcude file exists?
                $INC = sprintf("inc/modules/admin/action-%s.php", $act);
        if (SQL_NUMROWS($result_action) == 1) {
                // Is valid but does the inlcude file exists?
                $INC = sprintf("inc/modules/admin/action-%s.php", $act);
-               if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && (__ACL_ALLOW == true)) {
+               if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && ($GLOBALS['acl_allow'] === true)) {
                        // Ok, we finally load the admin action module
                        LOAD_INC($INC);
                        // Ok, we finally load the admin action module
                        LOAD_INC($INC);
-               } elseif (__ACL_ALLOW == false) {
+               } elseif ($GLOBALS['acl_allow'] === false) {
                        // Access denied
                        LOAD_TEMPLATE("admin_menu_failed", false, getMessage('ADMIN_ACCESS_DENIED'));
                        addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACCESS_DENIED'));
                        // Access denied
                        LOAD_TEMPLATE("admin_menu_failed", false, getMessage('ADMIN_ACCESS_DENIED'));
                        addFatalMessage(__FUNCTION__, __LINE__, getMessage('ADMIN_ACCESS_DENIED'));
index 229c0747c6a46c2fcbb86f9fab4884853dd59875..a4938ec811767e5525a6613757bb5b7f89773271 100644 (file)
@@ -78,10 +78,10 @@ if ((getConfig('member_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true)))
 OUTPUT_HTML("   </td>
   <td valign=\"top\" align=\"center\" rowspan=\"3\" class=\"member_content\">");
 
 OUTPUT_HTML("   </td>
   <td valign=\"top\" align=\"center\" rowspan=\"3\" class=\"member_content\">");
 
-$INC_ACTION = sprintf("inc/modules/member/action-%s.php", $act);
-if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("member", $GLOBALS['action'], $GLOBALS['what']))) {
+$INC = sprintf("inc/modules/member/action-%s.php", $act);
+if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION("member", $GLOBALS['action'], $GLOBALS['what']))) {
        // Requested module is available so we load it
        // Requested module is available so we load it
-       LOAD_INC($INC_ACTION);
+       LOAD_INC($INC);
 } else {
        // Invalid module specified or not found...
        LOAD_URL("modules.php?module=login");
 } else {
        // Invalid module specified or not found...
        LOAD_URL("modules.php?module=login");