From: Trevor Parscal Date: Mon, 27 Sep 2010 15:59:58 +0000 (+0000) Subject: * Improved on r73567, this makes WebRequest::getFuzzyBool case insensitive, making... X-Git-Tag: 1.31.0-rc.0~34782 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=dc723fc71014b61d3abe1393a5207ff836ce441d;p=lhc%2Fweb%2Fwiklou.git * Improved on r73567, this makes WebRequest::getFuzzyBool case insensitive, making 'false', 'FALSE', 'FaLsE', etc to be boolean false * Fixed syntax error in Skin.php --- diff --git a/includes/Skin.php b/includes/Skin.php index f7520fe298..8fd1d73c95 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -2046,7 +2046,7 @@ class Skin extends Linker { return array( 'href' => $title->getLocalURL( $urlaction ), - 'exists' => $title->getArticleID() != 0; + 'exists' => $title->getArticleID() != 0, ); } diff --git a/includes/WebRequest.php b/includes/WebRequest.php index 09eded6f21..37be786e3b 100644 --- a/includes/WebRequest.php +++ b/includes/WebRequest.php @@ -358,7 +358,7 @@ class WebRequest { * @return Boolean */ public function getFuzzyBool( $name, $default = false ) { - return $this->getBool( $name, $default ) && $this->getVal( $name ) !== 'false'; + return $this->getBool( $name, $default ) && strcasecmp( $this->getVal( $name ), 'false' ) !== 0; } /**