Changeset 858 for trunk/Application


Ignore:
Timestamp:
May 8, 2019, 7:59:39 PM (5 years ago)
Author:
chronos
Message:
  • Fixed: Missing intialization of some variables.
  • Fixed: Missing appmodule dependencies.
Location:
trunk/Application
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/System.php

    r839 r858  
    141141  {
    142142    global $Database, $ScriptTimeStart, $ConfigFileName, $Mail, $Type,
    143       $DatabaseRevision, $Config;
     143      $DatabaseRevision, $Config, $GlobalLocaleManager;
    144144
    145145    date_default_timezone_set('Europe/Prague');
     
    171171      //$Output .= 'Nelze se připojit k databázi.';
    172172    }
     173
     174    $this->LocaleManager = new LocaleManager($this);
     175    $this->LocaleManager->Dir = dirname(dirname(__FILE__)).'/locale';
     176    $this->LocaleManager->Available = array(
     177      'cs' => array('Code' => 'cs', 'Title' => 'Česky'),
     178      'en' => array('Code' => 'en', 'Title' => 'English'),
     179    );
     180    $GlobalLocaleManager = $this->LocaleManager;
     181    $this->LinkLocaleExceptions = array('images', 'style', 'files');
     182
    173183    if(isset($this->Config['Web']['RootFolder']))
    174184      $this->RootURLFolder = $this->Config['Web']['RootFolder'];
     
    195205    {
    196206      $this->PathItems = ProcessURL();
     207
     208      // Detect interface locale
     209      if(isset($this->Config['Web']['Locale']))
     210        $this->LocaleManager->DefaultLangCode = $this->Config['Web']['Locale'];
     211      $this->LocaleManager->LangCode = $this->LocaleManager->DefaultLangCode;
     212      if(count($this->PathItems) > 0)
     213      {
     214         $NewLangCode = $this->PathItems[0];
     215         if(array_key_exists($NewLangCode, $this->LocaleManager->Available))
     216         {
     217           array_shift($this->PathItems);
     218           $this->LocaleManager->LangCode = $NewLangCode;
     219         }
     220      }
     221      if(array_key_exists($this->LocaleManager->LangCode, $this->LocaleManager->Available))
     222        $this->LocaleManager->LoadLocale($this->LocaleManager->LangCode);
     223
    197224      $this->ShowPage();
    198225    }
  • trunk/Application/Version.php

    r855 r858  
    11<?php
    22
    3 $Revision = 855; // Subversion revision
     3$Revision = 857; // Subversion revision
    44$DatabaseRevision = 855; // SQL structure revision
    5 $ReleaseTime = strtotime('2018-04-08');
     5$ReleaseTime = strtotime('2019-05-08');
Note: See TracChangeset for help on using the changeset viewer.