Changeset 878 for trunk/Modules


Ignore:
Timestamp:
Jun 25, 2020, 10:21:26 AM (4 years ago)
Author:
chronos
Message:
  • Fixed: Import of news from zdechov.cz and obec-hovezi.cz.
Location:
trunk/Modules
Files:
3 added
3 deleted
3 edited

Legend:

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

    r874 r878  
    22
    33include_once(dirname(__FILE__).'/NewsPage.php');
     4include_once(dirname(__FILE__).'/NewsSource.php');
     5include_once(dirname(__FILE__).'/Import/Vismo.php');
    46
    57function CategoryItemCompare($Item1, $Item2)
     
    3739  {
    3840    $this->System->RegisterPage('aktuality', 'PageNews');
     41    $this->System->RegisterPage(array('aktuality', 'aktualizace'), 'PageNewsUpdate');
    3942    $this->System->FormManager->RegisterClass('News', array(
    4043      'Title' => 'Aktualita',
  • trunk/Modules/News/NewsPage.php

    r874 r878  
    432432  }
    433433}
     434
     435class PageNewsUpdate extends Page
     436{
     437  function __construct($System)
     438  {
     439    parent::__construct($System);
     440    $this->FullTitle = 'Aktualizace aktualit';
     441    $this->ShortTitle = 'Aktualizace aktualit';
     442    $this->ParentClass = 'PageNews';
     443  }
     444
     445  function Show()
     446  {
     447    $NewsSources = new NewsSources();
     448    $NewsSources->Database = $this->Database;
     449    if (array_key_exists('i', $_GET)) $Output = $NewsSources->Parse($_GET['i']);
     450      else $Output = $NewsSources->Parse();
     451    return $Output;
     452  }
     453}
     454
  • trunk/Modules/User/UserModel.php

    r874 r878  
    283283    } else
    284284    {
     285      $this->PermissionGroupCache[$GroupId] = array();
     286
    285287      // If no permission combination exists in cache, do new check of database items
    286288      $DbResult = $this->Database->select('PermissionGroupAssignment', '*', '(`Group`="'.$GroupId.
    287289        '") AND (`AssignedGroup` IS NOT NULL)');
    288       $DbRow = array();
    289       while ($DbRow[] = $DbResult->fetch_array());
    290         $this->PermissionGroupCache[$GroupId] = $DbRow;
     290      while ($DbRow = $DbResult->fetch_array())
     291      {
     292        $this->PermissionGroupCache[$GroupId][] = $DbRow;
     293      }
    291294      $PermissionExists = true;
    292295    }
Note: See TracChangeset for help on using the changeset viewer.