From dc723fc71014b61d3abe1393a5207ff836ce441d Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Mon, 27 Sep 2010 15:59:58 +0000 Subject: [PATCH] * Improved on r73567, this makes WebRequest::getFuzzyBool case insensitive, making 'false', 'FALSE', 'FaLsE', etc to be boolean false * Fixed syntax error in Skin.php --- includes/Skin.php | 2 +- includes/WebRequest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } /** -- 2.20.1