Ignore:
Timestamp:
Apr 6, 2020, 11:17:40 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Improved code format.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/VCL/Database.php

    r738 r873  
    2828
    2929    $ColumnSQL = array();
    30     foreach($this->Columns as $Column)
     30    foreach ($this->Columns as $Column)
    3131    {
    3232      $ColumnSQL[] = $Column->Name;
     
    3535
    3636    // Get total filtered item count in database
    37     if($this->Filter != '')
     37    if ($this->Filter != '')
    3838    {
    3939      $Query = 'SELECT COUNT(*) FROM (SELECT '.$ColumnSQL.' FROM '.$this->SQL.') AS `TS` '.$this->Filter;
     
    4646    $this->Rows = array();
    4747    $VisibleItemCount = 0;
    48     if(($this->SortOrder != 0) and ($this->SortOrder != 1)) $this->SortOrder = 0;
    49     //if($this->SortColumn)
     48    if (($this->SortOrder != 0) and ($this->SortOrder != 1)) $this->SortOrder = 0;
     49    //if ($this->SortColumn)
    5050    $this->SortColumn = $this->Columns[0]->Name;
    5151    $this->OrderSQL = ' ORDER BY `'.$this->SortColumn.'` '.$this->OrderDirSQL[$this->SortOrder];
     
    5454      $this->Filter.' '.$this->OrderSQL.$SQLLimit;
    5555    $DbResult = $this->Database->query($Query);
    56     while($DbRow = $DbResult->fetch_assoc())
     56    while ($DbRow = $DbResult->fetch_assoc())
    5757    {
    58       if(method_exists($this->OnRowDraw[0], $this->OnRowDraw[1]))
     58      if (method_exists($this->OnRowDraw[0], $this->OnRowDraw[1]))
    5959        $DbRow = call_user_func($this->OnRowDraw, $DbRow);
    6060      $this->Rows[] = $DbRow;
     
    6262    }
    6363    $Row = '<td colspan="'.count($this->Columns).'" style="text-align: right;">Zobrazeno <strong>'.$VisibleItemCount.'</strong>';
    64     if($this->Filter != '') $Row .= ' z filtrovaných <strong>'.$TotalFilteredCount.'</strong>';
     64    if ($this->Filter != '') $Row .= ' z filtrovaných <strong>'.$TotalFilteredCount.'</strong>';
    6565    $Row .= ' z celkem <strong>'.$TotalCount.'</strong>';
    6666    $ListView->Rows[] = $Row;
    6767    $Output = parent::Show();
    68     return($Output);
     68    return ($Output);
    6969  }
    7070}
Note: See TracChangeset for help on using the changeset viewer.