SF.net SVN: postfixadmin:[872] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2010-09-30 20:43:58
|
Revision: 872 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=872&view=rev Author: christian_boltz Date: 2010-09-30 20:43:52 +0000 (Thu, 30 Sep 2010) Log Message: ----------- common.php: - store language in session variable (BTW: storing it only at login instead of calling check_language() on every page would save some processor cycles ;-) templates/header.tpl: - add class="lang-XY" (where XY is the language to the body tag. This allows language-specific CSS code: .lang-XY table {...} This commit implements the feature request from J.Kruis (jan-kruis) https://sourceforge.net/tracker/?func=detail&aid=2903088&group_id=191583&atid=937967 Modified Paths: -------------- trunk/common.php trunk/templates/header.tpl Modified: trunk/common.php =================================================================== --- trunk/common.php 2010-09-29 20:41:52 UTC (rev 871) +++ trunk/common.php 2010-09-30 20:43:52 UTC (rev 872) @@ -45,7 +45,8 @@ require_once("$incpath/languages/language.php"); require_once("$incpath/functions.inc.php"); -require_once("$incpath/languages/" . check_language () . ".lang"); +$_SESSION['lang'] = $language = check_language (); # TODO: storing the language only at login instead of calling check_language() on every page would save some processor cycles ;-) +require_once("$incpath/languages/" . $_SESSION['lang'] . ".lang"); /** * @param string $class Modified: trunk/templates/header.tpl =================================================================== --- trunk/templates/header.tpl 2010-09-29 20:41:52 UTC (rev 871) +++ trunk/templates/header.tpl 2010-09-30 20:43:52 UTC (rev 872) @@ -15,7 +15,7 @@ <link rel="stylesheet" type="text/css" href="{$CONF.theme_css}"/> <title>Postfix Admin - {$smarty.server.HTTP_HOST}</title> </head> - <body> + <body class="lang-{$smarty.session.lang}"> <div id="login_header"> <img id="login_header_logo" src="{$CONF.theme_logo}" alt="Logo"/> {if $CONF.show_header_text==='YES' && $CONF.header_text} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |