respect arg_separator.input from php.ini

This commit is contained in:
Sebastian Mendel
2005-11-25 10:39:45 +00:00
parent 42feed2cca
commit ea2720fe2f
2 changed files with 21 additions and 1 deletions

View File

@@ -6,7 +6,9 @@ $Id$
$Source$
2005-11-24 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* libraries/url_generating.lib.php: do not htmlentities on whole string
* libraries/url_generating.lib.php:
- do not htmlentities on whole string
- respect arg_separator.input from php.ini
* libraries/common.lib.php:
- make PMA_sendHeaderLocation() earlier available
- add SID only if set

View File

@@ -147,6 +147,24 @@ function PMA_generate_common_url ($db = '', $table = '', $delim = '&amp;')
$questionmark = '';
}
// use seperators defined by php, but prefer ';'
// as recommended by W3C
$php_arg_separator_input = ini_get( 'arg_separator.input' );
if ( strpos( $php_arg_separator_input, ';' ) !== false ) {
$separator = ';';
} elseif ( strlen( $php_arg_separator_input ) > 0 ) {
$separator = $php_arg_separator_input{0};
} else {
$separator = '&';
}
// check wether to htmlentity the separator or not
if ( $delim === '&amp;' ) {
$delim = htmlentities( $separator );
} else {
$delim = $separator;
}
if ( $GLOBALS['server'] != $GLOBALS['cfg']['ServerDefault']
&& ! empty( $GLOBALS['server'] ) ) {
$params['server'] = $GLOBALS['server'];