Ignore:
Timestamp:
Nov 18, 2013, 10:32:30 PM (11 years ago)
Author:
chronos
Message:
  • Fixed: If referenced unknown subpage then show main page with error message and log event.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/system.php

    r584 r589  
    190190        array_shift($PathItems);
    191191        return($this->SearchPage($PathItems, $Pages[$PathItem]));
    192       } else return($Pages[$PathItem]);
     192      } else
     193      {
     194        if(count($PathItems) == 1) return($Pages[$PathItem]);           
     195          else return(''); // Unexpected subpages
     196      }
    193197    } else return('');
    194198  }
     
    196200  function PageNotFound()
    197201  {
     202        if(isset($this->ModuleManager->Modules['Log']))
     203          $this->ModuleManager->Modules['Log']->WriteLog('Stránka "'.
     204          implode('/', $this->PathItems).'" nenalezena', LOG_TYPE_ERROR);
    198205    return(ShowMessage('Stránka "'.implode('/', $this->PathItems).'" nenalezena.', MESSAGE_CRITICAL));
    199206  }
     
    202209  {
    203210    /* @var $Page Page */
    204     $ClassName = $this->SearchPage($this->PathItems, $this->Pages);     
     211    $ClassName = $this->SearchPage($this->PathItems, $this->Pages);
    205212    if($ClassName != '')
    206213    {
Note: See TracChangeset for help on using the changeset viewer.