Changeset 525


Ignore:
Timestamp:
Apr 20, 2013, 11:47:25 PM (11 years ago)
Author:
chronos
Message:
  • Opraveno: Třída Page dědí Module a tedy v konstruktoru očekává odkaz na System.
Location:
trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Global.php

    r524 r525  
    2222 
    2323// Application modules
     24// TODO: Should be configurable
    2425include_once(dirname(__FILE__).'/../Modules/System/System.php');
    2526include_once(dirname(__FILE__).'/../Modules/Error/Error.php');
     
    6364
    6465  $System = new System();
     66  // TODO: unset general global variable $Config after setting is loaded to objects
    6567  $System->Config = &$Config;
    6668  $System->Database->Connect($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password'], $Config['Database']['Database']);
     
    8284 
    8385  // Register new modules
     86  // TODO: Should be configurable
    8487  $System->ModuleManager->RegisterModule(new ModuleError($System));
    8588  $System->ModuleManager->RegisterModule(new ModuleSystem($System));
    8689  $System->ModuleManager->RegisterModule(new ModuleLog($System));
    8790  $System->ModuleManager->RegisterModule(new ModuleFile($System));
     91  $System->ModuleManager->RegisterModule(new ModuleUser($System));
    8892  $System->ModuleManager->RegisterModule(new ModuleMeteostation($System));
    8993  $System->ModuleManager->RegisterModule(new ModulePortal($System));
     
    9599  $System->ModuleManager->RegisterModule(new ModuleChat($System));
    96100  $System->ModuleManager->RegisterModule(new ModuleWebCam($System));
    97   $System->ModuleManager->RegisterModule(new ModuleUser($System));
    98101  $System->ModuleManager->RegisterModule(new ModuleFinance($System));
    99102  $System->ModuleManager->RegisterModule(new ModuleFinanceBankAPI($System));
  • trunk/Common/Page.php

    r524 r525  
    1313  var $FullTitle;
    1414 
    15   function __construct()
     15  function __construct($System)
    1616  {
    1717    global $Config;
     18   
     19    parent::__construct($System);
    1820   
    1921    $this->FormatHTML = $Config['Web']['FormatHTML'];
     
    4648      {
    4749        $PageClass = $Page->ParentClass;
    48         $Page = new $PageClass();
     50        $Page = new $PageClass($this->System);
    4951        $ScriptName = substr($ScriptName, 0, strrpos($ScriptName, '/'));
    5052      } else $Page = null;
  • trunk/Modules/Chat/Chat.php

    r524 r525  
    33class PageChatHistory extends Page
    44{
    5   function __construct()
     5  function __construct($System)
    66  {
    7     parent::__construct();
     7    parent::__construct($System);
    88    $this->FullTitle = 'Výpis z historie chatu';
    99    $this->ShortTitle = 'Historie chatu';
  • trunk/Modules/Network/Administration.php

    r524 r525  
    33class PageNetworkAdministration extends Page
    44{
    5   function __construct()
     5  function __construct($System)
    66  {
    7     parent::__construct();
     7    parent::__construct($System);
    88    $this->FullTitle = 'Administrace sítě';
    99    $this->ShortTitle = 'Administrace sítě';
  • trunk/Modules/Network/Subnet.php

    r519 r525  
    33class PageSubnet extends Page
    44{
    5   function __construct()
     5  function __construct($System)
    66  {
    7     parent::__construct();
     7    parent::__construct($System);
    88    $this->FullTitle = 'Informace o podsítích';
    99    $this->ShortTitle = 'Podsítě';
  • trunk/Modules/News/NewsPage.php

    r524 r525  
    163163        $DbResult = $this->Database->query('SELECT * FROM News WHERE Id='.$_GET['id']);
    164164        $Row = $DbResult->fetch_array();
    165         if($this->System->Modules['User']->User['Id'] == $Row['User'])
     165        if($this->System->User->User['Id'] == $Row['User'])
    166166        {
    167167          if($Row['Enclosure'] != '')
     
    179179        break;
    180180      default:
    181         if($this->System->Modules['User']->CheckPermission('News', 'Display', 'Group', $Category))
     181        if($this->System->User->CheckPermission('News', 'Display', 'Group', $Category))
    182182        {
    183183          $PerPage = 20;
     
    197197              else $Author = $Row['Name'];
    198198            $Output .= '<div class="Panel"><div class="Title"><a href="?action=view&amp;id='.$Row['Id'].'">'.$Row['Title'].'</a> ('.HumanDate($Row['Date']).', '.$Author.')';
    199             if($this->System->Modules['User']->User['Id'] == $Row['User'])
     199            if($this->System->User->User['Id'] == $Row['User'])
    200200            {
    201201              $Output .= '<div class="Action">';
  • trunk/Modules/System/System.php

    r523 r525  
    33class PageModules extends Page
    44{
    5   function __construct()
    6   {
    7     parent::__construct();
     5  function __construct($System)
     6  {
     7    parent::__construct($System);
    88    $this->FullTitle = 'Správa modulů';
    99    $this->ShortTitle = 'Moduly';
Note: See TracChangeset for help on using the changeset viewer.