From: Brion Vibber Date: Wed, 9 Jan 2008 02:18:58 +0000 (+0000) Subject: * (bug 12505) Fixed section=0 with action=raw X-Git-Tag: 1.31.0-rc.0~50090 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=669a6b4bab141116160838c932870f867d3de2af;p=lhc%2Fweb%2Fwiklou.git * (bug 12505) Fixed section=0 with action=raw PHP's fuzzy type comparisons strike again! A check for $this->mSection != '', probably intended to protect against an unset value, matched for integer values of 0 as well. (The fun part is that 0=='' and 0=='0' but '0'!='' :) Since the parameter is validated through getIntOrNull(), only the null check is necessary here. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 45bdc1a1e6..5d74b846e8 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -292,6 +292,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 12493) Removed hardcoded MAX_FILE_SIZE from Special:Import upload form * (bug 12489) Special:Userrights listed in restricted section again * (bug 12553) Fixed invalid XHTML in edit conflict screen +* (bug 12505) Fixed section=0 with action=raw == Parser changes in 1.12 == diff --git a/includes/RawPage.php b/includes/RawPage.php index 22a5ac4e63..f96c8b91b0 100644 --- a/includes/RawPage.php +++ b/includes/RawPage.php @@ -193,7 +193,7 @@ class RawPage { $lastmod = wfTimestamp( TS_RFC2822, $rev->getTimestamp() ); header( "Last-modified: $lastmod" ); - if ( !is_null($this->mSection) && $this->mSection != '' ) { + if ( !is_null($this->mSection ) ) { global $wgParser; return $wgParser->getSection ( $rev->getText(), $this->mSection ); } else