Exemplo n.º 1
0
Arquivo: init.php Projeto: efoft/hydra
    return;
}
/* Memory
  ------------------------------------------------------------------------ */
$mem = new Memory();
/* Favorite icon
  ------------------------------------------------------------------------ */
$view->set('icons', $cfg->val('icons') ? $cfg->val('icons') : array());
/* Languages support
  ------------------------------------------------------------------------ */
$lang = new Lang();
if ($cfg->val('LANGUAGES')) {
    $lang->loadConfig($cfg->val('LANGUAGES'));
    require 'language.php';
} else {
    $mem->destroy('langdir');
    $view->set('multilang', false);
}
// by default we always store templates under `ru/`
// it won't override if already set smth different.
$mem->tryStore('langdir', 'ru' . DIRECTORY_SEPARATOR);
/* Page manager
   * Singleton since it might have been declared in language.php
  ------------------------------------------------------------------------ */
$pmgr = PageMgr::getInstance($cfg->val('pages_ru', true), $loc->path('pages'));
/* Auth
  ------------------------------------------------------------------------ */
$auth = new Auth();
if ($cfg->val('AUTHMETHOD')) {
    $auth->setMethod($cfg->val('AUTHMETHOD'));
    $auth->setAuthList($cfg->val('auth_users'));