r110126 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110125‎ | r110126 | r110127 >
Date:14:33, 27 January 2012
Author:demon
Status:ok
Tags:filebackend 
Comment:
Self-revert r110124, needs more than that to support 5.2 since $flags don't exist in 5.2.

Either this needs to be fixed to really support 5.2 or we'll bumping the minimum version to 5.3 this release.
Modified paths:
  • /trunk/phase3/includes/filerepo/backend/FSFileBackend.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/backend/FSFileBackend.php
@@ -22,14 +22,6 @@
2323 * @since 1.19
2424 */
2525 class FSFileBackend extends FileBackend {
26 -
27 - /**
28 - * These constants are the same as the ones in FilesystemIterator, but
29 - * that's only 5.3+ so copy them here. When we drop 5.2 we can remove this
30 - */
31 - const CURRENT_AS_FILEINFO = 0;
32 - const SKIP_DOTS = 4096;
33 -
3426 protected $basePath; // string; directory holding the container directories
3527 /** @var Array Map of container names to root paths */
3628 protected $containerPaths = array(); // for custom container paths
@@ -556,7 +548,7 @@
557549 $dir = realpath( $dir ); // normalize
558550 $this->suffixStart = strlen( $dir ) + 1; // size of "path/to/dir/"
559551 try {
560 - $flags = self::CURRENT_AS_FILEINFO | self::SKIP_DOTS;
 552+ $flags = FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS;
561553 $this->iter = new RecursiveIteratorIterator(
562554 new RecursiveDirectoryIterator( $dir, $flags ) );
563555 } catch ( UnexpectedValueException $e ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110124Copy FilesystemIterator constants so we can still pretend to support 5.2demon14:29, 27 January 2012

Status & tagging log