mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-18 03:11:40 +01:00
added "custom" (custom instance-specific translations) to apps which have to use home as app-name, also moved sanitrary checks before header-include
This commit is contained in:
parent
28f90f8554
commit
2175421d42
@ -11,9 +11,13 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// just to be sure, noone tries something nasty ...
|
||||||
|
if (!preg_match('/^[a-z0-9_]+$/i', $_GET['app'])) die('No valid application-name given!');
|
||||||
|
if (!preg_match('/^[a-z]{2}(-[a-z]{2})?$/i', $_GET['lang'])) die('No valid lang-name given!');
|
||||||
|
|
||||||
$GLOBALS['egw_info'] = array(
|
$GLOBALS['egw_info'] = array(
|
||||||
'flags' => array(
|
'flags' => array(
|
||||||
'currentapp' => in_array($_GET['app'],array('etemplate','common')) ? 'home' : $_GET['app'],
|
'currentapp' => in_array($_GET['app'],array('etemplate','common','custom')) ? 'home' : $_GET['app'],
|
||||||
'noheader' => true,
|
'noheader' => true,
|
||||||
'load_translations' => false, // do not automatically load translations
|
'load_translations' => false, // do not automatically load translations
|
||||||
'nocachecontrol' => true,
|
'nocachecontrol' => true,
|
||||||
@ -22,10 +26,6 @@ $GLOBALS['egw_info'] = array(
|
|||||||
|
|
||||||
include '../header.inc.php';
|
include '../header.inc.php';
|
||||||
|
|
||||||
// just to be sure, noone tries something nasty ...
|
|
||||||
if (!preg_match('/^[a-z0-9_]+$/i', $_GET['app'])) die('No valid application-name given!');
|
|
||||||
if (!preg_match('/^[a-z]{2}(-[a-z]{2})?$/i', $_GET['lang'])) die('No valid lang-name given!');
|
|
||||||
|
|
||||||
// use an etag with app, lang and a hash over the creation-times of all lang-files
|
// use an etag with app, lang and a hash over the creation-times of all lang-files
|
||||||
$etag = '"'.$_GET['app'].'-'.$_GET['lang'].'-'.md5(serialize($GLOBALS['egw_info']['server']['lang_ctimes'])).'"';
|
$etag = '"'.$_GET['app'].'-'.$_GET['lang'].'-'.md5(serialize($GLOBALS['egw_info']['server']['lang_ctimes'])).'"';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user