r111324 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111323‎ | r111324 | r111325 >
Date:19:51, 12 February 2012
Author:hashar
Status:resolved
Tags:
Comment:
Fix some injection from r110871
Modified paths:
  • /trunk/phase3/includes/cache/FileCacheBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/cache/FileCacheBase.php
@@ -116,9 +116,12 @@
117117 * @return string
118118 */
119119 public function fetchText() {
120 - // gzopen can transparently read from gziped or plain text
121 - $fh = gzopen( $this->cachePath(), 'rb' );
122 - return stream_get_contents( $fh );
 120+ if( $this->useGzip() ) {
 121+ $fh = gzopen( $this->cachePath(), 'rb' );
 122+ return stream_get_contents( $fh );
 123+ } else {
 124+ return file_get_contents( $this-cachePath() );
 125+ }
123126 }
124127
125128 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r111611Add missing >...reedy02:34, 16 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110871simplify FileCacheBase::fetchText...hashar20:47, 7 February 2012

Status & tagging log