[Phpmyadmin-devel] curious logic

Rabus rabus at bugfixes.info
Fri Jul 25 01:38:03 CEST 2003


Hi Marc & list,

Am Wed, 23 Jul 2003 07:19:53 -0400 hat Marc Delisle 
<DelislMa at CollegeSherbrooke.qc.ca> geschrieben:

> Hi,
>
> in libraries/grab_globals:
>
> -------------
> if (!empty($_SERVER)) {
> if (isset($_SERVER['PHP_SELF'])) {
> $PHP_SELF = $_SERVER['PHP_SELF'];
> }
> if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
> $HTTP_ACCEPT_LANGUAGE = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
> }
> } else if (!empty($HTTP_SERVER_VARS)) {
> if (isset($HTTP_SERVER_VARS['PHP_SELF'])) {
> $PHP_SELF = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];
> }
> if (isset($HTTP_SERVER_VARS['PHP_SELF'])) {
> $HTTP_ACCEPT_LANGUAGE = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];
> }
> } // end if
> --------------
>
> I think should be replaced by:
>
> --------------
> if (!empty($_SERVER)) {
> if (isset($_SERVER['PHP_SELF'])) {
> $PHP_SELF = $_SERVER['PHP_SELF'];
> }
> if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
> $HTTP_ACCEPT_LANGUAGE = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
> }
> } else if (!empty($HTTP_SERVER_VARS)) {
> if (isset($HTTP_SERVER_VARS['PHP_SELF'])) {
> $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
> }
> if (isset($HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'])) {
> $HTTP_ACCEPT_LANGUAGE = $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];
> }
> } // end if
> -------------------
>
> Objections?
>

Of course. This appears to me like a copy&paste error.

Alexander





More information about the Developers mailing list