enabled domainnames with . in the name

kneschke.de becomes kneschke_de as variable name
This commit is contained in:
Lars Kneschke 2003-12-22 11:43:06 +00:00
parent 9452e2f19b
commit 65d2177084

View File

@ -22,6 +22,9 @@
*/ */
function generate_header() function generate_header()
{ {
// PHP will automatically replace any dots in incoming
// variable names with underscores.
$GLOBALS['header_template']->set_file(array('header' => 'header.inc.php.template')); $GLOBALS['header_template']->set_file(array('header' => 'header.inc.php.template'));
$GLOBALS['header_template']->set_block('header','domain','domain'); $GLOBALS['header_template']->set_block('header','domain','domain');
$var = Array(); $var = Array();
@ -35,7 +38,8 @@
{ {
continue; continue;
} }
$dom = get_var('setting_'.$k,Array('POST')); $variableName = str_replace('.','_',$k);
$dom = get_var('setting_'.$variableName,Array('POST'));
$GLOBALS['header_template']->set_var('DB_DOMAIN',$v); $GLOBALS['header_template']->set_var('DB_DOMAIN',$v);
while(list($x,$y) = @each($dom)) while(list($x,$y) = @each($dom))
{ {