Changeset 795


Ignore:
Timestamp:
Feb 4, 2016, 3:42:03 PM (9 years ago)
Author:
chronos
Message:
  • Modified: In module IS use slow HAVING in SQL query for user filter. To show subtables use faster WHERE.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/System.php

    r791 r795  
    165165      $this->Database->ShowSQLError = $this->Config['Web']['ShowSQLError'];
    166166      $this->Database->ShowSQLQuery = $this->Config['Web']['ShowSQLQuery'];
     167      if(isset($this->Config['Web']['LogSQLQuery']))
     168        $this->Database->LogSQLQuery = $this->Config['Web']['LogSQLQuery'];
    167169    } catch (Exception $E) {
    168170      //$Output .= 'Nelze se připojit k databázi.';
  • trunk/Application/Version.php

    r793 r795  
    11<?php
    22
    3 $Revision = 793; // Subversion revision
     3$Revision = 794; // Subversion revision
    44$DatabaseRevision = 792; // SQL structure revision
    5 $ReleaseTime = strtotime('2016-02-03');
     5$ReleaseTime = strtotime('2016-02-04');
  • trunk/Modules/IS/IS.php

    r774 r795  
    414414      else $SourceTable = '`'.$FormClass['Table'].'` AS `TX`';
    415415
     416    $WhereFilter = $Filter;
     417    $HavingFilter = '';
     418
    416419    // Build form type filter
    417420    $TypeFilter = '';
     
    427430    if($TypeFilter != '')
    428431    {
    429       if($Filter != '') $Filter = ' AND';
    430       $Filter .= ' '.$TypeFilter;
     432      if($HavingFilter != '') $HavingFilter = ' AND';
     433      $HavingFilter .= ' '.$TypeFilter;
    431434    }
    432435
     
    465468    if($UserFilter != '')
    466469    {
    467       if($Filter != '') $Filter .= ' AND';
    468       $Filter .= ' '.$UserFilter;
    469     }
    470     if($Filter != '') $Filter = ' HAVING '.$Filter;
     470      if($HavingFilter != '') $Havingilter .= ' AND';
     471      $HavingFilter .= ' '.$UserFilter;
     472    }
     473    if($WhereFilter != '') $Filter = ' WHERE '.$WhereFilter;
     474    if($HavingFilter != '') $Filter = ' HAVING '.$HavingFilter;
     475
    471476
    472477    foreach($FormClass['Items'] as $ItemIndex => $FormItem)
  • trunk/Modules/Network/Network.php

    r785 r795  
    192192        'Signal' => array('Type' => 'TNetworkSignalListInterface', 'Caption' => 'Signál', 'Default' => ''),
    193193        'Wireless' => array('Type' => 'TNetworkInterfaceWirelessListInterface', 'Caption' => 'Bezdrátové spoje', 'Default' => ''),
    194 
    195194      ),
    196195    ));
Note: See TracChangeset for help on using the changeset viewer.