Changeset 860 for trunk/Packages


Ignore:
Timestamp:
Jan 21, 2016, 2:49:19 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Now application modules are started according configuration file.
  • Added: Each module which want to show something in main page bars needs to register its callback.
Location:
trunk/Packages/Common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/AppModule.php

    r858 r860  
    197197    $this->Modules = array();
    198198    $this->System = &$System;
    199     $this->FileName = 'Config/Modules.php';
     199    $this->FileName = dirname(__FILE__).'/../../Config/ModulesConfig.php';
    200200    $this->ModulesDir = dirname(__FILE__).'/../../Modules';
    201201  }
     
    318318  }
    319319
     320  function ModuleEnabled($Name)
     321  {
     322    return(array_key_exists($Name, $this->Modules) and $this->Modules[$Name]->Enabled);
     323  }
     324
     325  function ModuleRunning($Name)
     326  {
     327    return(array_key_exists($Name, $this->Modules) and $this->Modules[$Name]->Running);
     328  }
     329
    320330  /* @return Module */
    321331  function SearchModuleById($Id)
  • trunk/Packages/Common/Setup.php

    r858 r860  
    362362  {
    363363    $Output = '';
    364     if(!$this->Database->Connected()) $Output .= 'Nelze se připojit k databázi.<br>';
     364    if(!$this->Database->Connected()) $Output .= T('Can\'t connect to database').'<br>';
    365365    else {
    366366      if(!$this->System->Setup->UpdateManager->IsInstalled())
    367         $Output .= 'Systém vyžaduje instalaci databáze.<br>';
     367        $Output .= T('System requires database initialization').'<br>';
    368368      else
    369369      if(!$this->System->Setup->UpdateManager->IsUpToDate())
    370         $Output .= 'Systém vyžaduje aktualizaci databáze.<br>';
    371     }
    372     $Output .= 'Pokračujte <a href="'.$this->System->Link('/setup/').'">zde</a>';
     370        $Output .= T('System requires database upgrade').'<br>';
     371    }
     372    $Output .= sprintf(T('Front page was not configured. Continue to %s'), '<a href="'.$this->System->Link('/setup/').'">'.T('setup').'</a>');
    373373    return($Output);
    374374  }
Note: See TracChangeset for help on using the changeset viewer.