1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-28 11:41:57 +03:00

common.php:

- merge with scripts/common.php
- don't start/use session in CLI mode
- don't load smarty.inc.php in CLI mode
- hardcode language to 'en' in CLI mode (was done in postfixadmin-cli.php before)

scripts/postfixadmin-cli.php - __bootstrap():
- use common.php instead of scripts/common.php
- don't load languages/language.php and languages/en.lang (already
  done via common.php)
- don't call language_hook (already done via common.php)

scripts/common.php:
- deleted
- dropped helper functions low(), up(), r() and pr() which were just
  shortnames for existing PHP functions


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1214 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz
2011-10-17 23:19:57 +00:00
parent 7bcd041d45
commit 4611b111e3
3 changed files with 23 additions and 133 deletions

View File

@ -213,10 +213,8 @@ class PostfixAdmin {
}
$includes = array(
PATH.'/config.inc.php',
PATH.'/languages/language.php',
PATH.'/functions.inc.php',
PATH.'/languages/en.lang', # TODO: honor $CONF[default_language] and/or language from $_ENV
CORE_INCLUDE_PATH.'/common.php',
PATH.'/common.php',
CORE_INCLUDE_PATH.'/inflector.php',
);
@ -226,16 +224,11 @@ class PostfixAdmin {
return false;
}
}
Config::getInstance();
Config::write($CONF);
Lang::getInstance();
if($CONF['language_hook'] != '' && function_exists($CONF['language_hook'])) {
$hook_func = $CONF['language_hook'];
$PALANG = $hook_func ($PALANG, 'en'); # $includes is also hardcoded to 'en' - see TODO above
}
Lang::write($PALANG);
return true;