Self-revert r110124, needs more than that to support 5.2 since $flags don't exist...
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 27 Jan 2012 14:33:43 +0000 (14:33 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 27 Jan 2012 14:33:43 +0000 (14:33 +0000)
Either this needs to be fixed to really support 5.2 or we'll bumping the minimum version to 5.3 this release.

includes/filerepo/backend/FSFileBackend.php

index d0ff92c..6a9b305 100644 (file)
@@ -22,14 +22,6 @@ g<?php
  * @since 1.19
  */
 class FSFileBackend extends FileBackend {
-
-       /**
-        * These constants are the same as the ones in FilesystemIterator, but
-        * that's only 5.3+ so copy them here. When we drop 5.2 we can remove this
-        */
-       const CURRENT_AS_FILEINFO = 0;
-       const SKIP_DOTS = 4096;
-       
        protected $basePath; // string; directory holding the container directories
        /** @var Array Map of container names to root paths */
        protected $containerPaths = array(); // for custom container paths
@@ -556,7 +548,7 @@ class FSFileBackendFileList implements Iterator {
                $dir = realpath( $dir ); // normalize
                $this->suffixStart = strlen( $dir ) + 1; // size of "path/to/dir/"
                try {
-                       $flags = self::CURRENT_AS_FILEINFO | self::SKIP_DOTS;
+                       $flags = FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS;
                        $this->iter = new RecursiveIteratorIterator(
                                new RecursiveDirectoryIterator( $dir, $flags ) );
                } catch ( UnexpectedValueException $e ) {