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/Modules/Search/Search.php

    r738 r873  
    1414  {
    1515    $Output = '';
    16     if(array_key_exists('t', $_GET)) $Text = $_GET['t'];
     16    if (array_key_exists('t', $_GET)) $Text = $_GET['t'];
    1717      else $Text = '';
    1818    $Output .= '<form action="?" method="get">'.
     
    2020    '<input type="submit" value="Hledat"/>'.
    2121    '</form>';
    22     if($Text != '')
    23     foreach($this->System->ModuleManager->Modules['Search']->Items as $Item)
     22    if ($Text != '')
     23    foreach ($this->System->ModuleManager->Modules['Search']->Items as $Item)
    2424    {
    2525      $Columns = '';
    2626      $Condition = '';
    27       foreach($Item['Columns'] as $Column)
     27      foreach ($Item['Columns'] as $Column)
    2828      {
    2929        $Columns .= ', `'.$Column.'`';
     
    3434      $DbResult = $this->Database->Select($Item['Table'], $Columns, $Condition.' LIMIT '.
    3535        $this->System->ModuleManager->Modules['Search']->MaxItemCount);
    36       if($DbResult->num_rows > 0) $Output .= '<strong>'.$Item['Name'].'</strong><br/>';
    37       while($Row = $DbResult->fetch_assoc())
     36      if ($DbResult->num_rows > 0) $Output .= '<strong>'.$Item['Name'].'</strong><br/>';
     37      while ($Row = $DbResult->fetch_assoc())
    3838      {
    3939        $Output .= '<p>';
    40         foreach($Item['Columns'] as $Column)
     40        foreach ($Item['Columns'] as $Column)
    4141          $Output .= $Row[$Column].'<br/>';
    4242        $Output .= '</p>';
    4343      }
    4444    }
    45     return($Output);
     45    return ($Output);
    4646  }
    4747}
Note: See TracChangeset for help on using the changeset viewer.