Ignore:
Timestamp:
Feb 3, 2024, 11:21:34 PM (11 months ago)
Author:
chronos
Message:
  • Fixed: RSS channel generation error.
  • Fixed: Show error message instead of generation of empty RSS channel.
  • Fixed: Wait minimum time if user not logged correctly.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/News/NewsPage.php

    r958 r963  
    361361        if (substr($Index, 0, 8) == 'category') $Select .= '-'.substr($Index, 8);
    362362      }
    363       $Select = Core::Cast($this->System)->Config['Web']['RootFolder'].'/aktuality/rss/?select='.substr($Select, 1);
    364       $Output = 'Výsledný RSS kanál: <a href="'.$Select.'">'.$Select.'</a>';
     363      if ($Select != '')
     364      {
     365        $Select = Core::Cast($this->System)->Config['Web']['RootFolder'].'/aktuality/rss/?select='.substr($Select, 1);
     366        $Output = 'Výsledný RSS kanál: <a href="'.$Select.'">'.$Select.'</a>';
     367      } else
     368      {
     369        $Output = 'Nevybrána žádná kategorie pro vytvoření RSS kanálu.';
     370      }
    365371    } else
    366372    {
     
    409415    {
    410416      $Where = '';
    411       $Parts = explode('-', $_GET['select']);
    412       foreach ($Parts as $Part)
    413       {
    414         if (is_numeric($Part)) $Where .= 'OR (`Category`='.($Part * 1).')';
    415       }
    416       $Where = substr($Where, 2);
     417      $Parts = array_filter(explode('-', $_GET['select']));
     418      if (count($Parts) > 0)
     419      {
     420        foreach ($Parts as $Part)
     421        {
     422          if (is_numeric($Part)) $Where .= 'OR (`Category`='.($Part * 1).')';
     423        }
     424        if (strlen($Where) > 2) $Where = substr($Where, 2);
     425          else $Where = 1;
     426      } else $Where = 1;     
    417427    } else $Where = 1;
    418428
Note: See TracChangeset for help on using the changeset viewer.