Changeset 1270

Show
Ignore:
Timestamp:
06/29/05 08:49:12 (3 years ago)
Author:
torben
Message:

Fixed #248 for this strain: We generate_error in cases where we can't access the root node as lastgoodnode.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/midcom/helper/_basicnav.php

    r1249 r1270  
    11101110             
    11111111            case MIDCOM_ERRFORBIDDEN: 
     1112                if ($this->_lastgoodnode == -1) 
     1113                { 
     1114                    // Hot fix for #248, MidCOM will loop infinitly if we don't catch this case. 
     1115                    // Will be superseeded by the ACL framework in the future. 
     1116                    $GLOBALS['midcom']->generate_error(MIDCOM_ERRFORBIDDEN, 
     1117                        "Access Denied: The root node is not accessible to you. This might be due to viewer groups, see debug level log for details."); 
     1118                    // this will exit. 
     1119                } 
    11121120                debug_add("The current node is hidden behind a undecendable one.", MIDCOM_LOG_INFO); 
    1113                 debug_add("Activating last good node (" . $this->_lastgoodnode . ") as current node"); 
     1121                debug_add("Activating last good node ({$this->_lastgoodnode}) as current node"); 
    11141122                $this->_current = $this->_lastgoodnode; 
    11151123                break;