Index: trunk/phase3/includes/filerepo/backend/FSFileBackend.php |
— | — | @@ -22,6 +22,14 @@ |
23 | 23 | * @since 1.19 |
24 | 24 | */ |
25 | 25 | 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 | + |
26 | 34 | protected $basePath; // string; directory holding the container directories |
27 | 35 | /** @var Array Map of container names to root paths */ |
28 | 36 | protected $containerPaths = array(); // for custom container paths |
— | — | @@ -548,7 +556,7 @@ |
549 | 557 | $dir = realpath( $dir ); // normalize |
550 | 558 | $this->suffixStart = strlen( $dir ) + 1; // size of "path/to/dir/" |
551 | 559 | try { |
552 | | - $flags = FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS; |
| 560 | + $flags = self::CURRENT_AS_FILEINFO | self::SKIP_DOTS; |
553 | 561 | $this->iter = new RecursiveIteratorIterator( |
554 | 562 | new RecursiveDirectoryIterator( $dir, $flags ) ); |
555 | 563 | } catch ( UnexpectedValueException $e ) { |