Ignore:
Timestamp:
Sep 17, 2016, 7:04:12 PM (8 years ago)
Author:
chronos
Message:
  • Added: Checks for existence of table given in URL.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/IS/IS.php

    r828 r837  
    155155  {
    156156    $Output = '';
     157    if(!array_key_exists($Table, $this->System->FormManager->Classes))
     158      return($this->SystemMessage('Chyba', 'Tabulka '.$Table.' nenalezena'));
    157159    if(defined('NEW_PERMISSION') and !$this->System->User->CheckPermission($this->TableToModule($Table), 'Write'))
    158160      return($this->SystemMessage('Oprávnění', 'Nemáte oprávnění'));
     
    223225  {
    224226    $Output = '';
     227    if(!array_key_exists($Table, $this->System->FormManager->Classes))
     228      return($this->SystemMessage('Chyba', 'Tabulka '.$Table.' nenalezena'));
     229    $FormClass = $this->System->FormManager->Classes[$Table];
    225230    if(defined('NEW_PERMISSION') and !$this->System->User->CheckPermission($this->TableToModule($Table), 'Write'))
    226231      return('Nemáte oprávnění');
     
    259264  {
    260265    $Output = '';
     266    if(!array_key_exists($Table, $this->System->FormManager->Classes))
     267      return($this->SystemMessage('Chyba', 'Tabulka '.$Table.' nenalezena'));
    261268    if(defined('NEW_PERMISSION') and !$this->System->User->CheckPermission($this->TableToModule($Table), 'Write'))
    262269      return('Nemáte oprávnění');
     
    354361  function ShowView($Table, $Id, $WithoutActions = false)
    355362  {
    356     if($Table != '') $FormClass = $this->System->FormManager->Classes[$Table];
    357       else return($this->SystemMessage('Chyba', 'Tabulka nenalezena'));
     363    if(!array_key_exists($Table, $this->System->FormManager->Classes))
     364      return($this->SystemMessage('Chyba', 'Tabulka '.$Table.' nenalezena'));
     365    $FormClass = $this->System->FormManager->Classes[$Table];
    358366    if(defined('NEW_PERMISSION') and !$this->System->User->CheckPermission($this->TableToModule($Table), 'Read'))
    359367      return('Nemáte oprávnění');
     
    412420  function ShowTable($Table, $Filter = '', $Title = '', $RowActions = array(), $ExcludeColumn = '')
    413421  {
    414     if($Table != '') $FormClass = $this->System->FormManager->Classes[$Table];
    415       else return($this->SystemMessage('Chyba', 'Tabulka nenalezena'));
     422    if(!array_key_exists($Table, $this->System->FormManager->Classes))
     423      return($this->SystemMessage('Chyba', 'Tabulka '.$Table.' nenalezena'));
     424    $FormClass = $this->System->FormManager->Classes[$Table];
    416425
    417426    if(array_key_exists('SQL', $FormClass))
     
    642651    if(defined('NEW_PERMISSION') and !$this->System->User->CheckPermission($this->TableToModule($Table), 'Read'))
    643652      return('Nemáte oprávnění');
     653    if(!array_key_exists($Table, $this->System->FormManager->Classes))
     654      return($this->SystemMessage('Chyba', 'Tabulka '.$Table.' nenalezena'));
    644655    $FormClass = $this->System->FormManager->Classes[$Table];
    645656    if(array_key_exists('BaseTable', $FormClass)) $TableModify = $FormClass['BaseTable'];
Note: See TracChangeset for help on using the changeset viewer.