MediaWiki REL1_37
LocalRepo.php
Go to the documentation of this file.
1<?php
33
41class LocalRepo extends FileRepo {
43 protected $fileFactory = [ LocalFile::class, 'newFromTitle' ];
45 protected $fileFactoryKey = [ LocalFile::class, 'newFromKey' ];
47 protected $fileFromRowFactory = [ LocalFile::class, 'newFromRow' ];
49 protected $oldFileFromRowFactory = [ OldLocalFile::class, 'newFromRow' ];
51 protected $oldFileFactory = [ OldLocalFile::class, 'newFromTitle' ];
53 protected $oldFileFactoryKey = [ OldLocalFile::class, 'newFromKey' ];
54
56 protected $dbDomain;
59
61 protected $blobStore;
62
64 protected $useJsonMetadata = false;
65
67 protected $useSplitMetadata = false;
68
70 protected $splitMetadataThreshold = 1000;
71
73 protected $updateCompatibleMetadata = false;
74
76 protected $reserializeMetadata = false;
77
78 public function __construct( array $info = null ) {
79 parent::__construct( $info );
80
81 $this->dbDomain = WikiMap::getCurrentWikiDbDomain();
82 $this->hasAccessibleSharedCache = true;
83
84 $this->hasSha1Storage = ( $info['storageLayout'] ?? null ) === 'sha1';
85
86 if ( $this->hasSha1Storage() ) {
87 $this->backend = new FileBackendDBRepoWrapper( [
88 'backend' => $this->backend,
89 'repoName' => $this->name,
90 'dbHandleFactory' => $this->getDBFactory()
91 ] );
92 }
93
94 foreach (
95 [
96 'useJsonMetadata',
97 'useSplitMetadata',
98 'splitMetadataThreshold',
99 'updateCompatibleMetadata',
100 'reserializeMetadata',
101 ] as $option
102 ) {
103 if ( isset( $info[$option] ) ) {
104 $this->$option = $info[$option];
105 }
106 }
107 }
108
114 public function newFileFromRow( $row ) {
115 if ( isset( $row->img_name ) ) {
116 return call_user_func( $this->fileFromRowFactory, $row, $this );
117 } elseif ( isset( $row->oi_name ) ) {
118 return call_user_func( $this->oldFileFromRowFactory, $row, $this );
119 } else {
120 throw new MWException( __METHOD__ . ': invalid row' );
121 }
122 }
123
129 public function newFromArchiveName( $title, $archiveName ) {
130 $title = File::normalizeTitle( $title );
131 return OldLocalFile::newFromArchiveName( $title, $this, $archiveName );
132 }
133
144 public function cleanupDeletedBatch( array $storageKeys ) {
145 if ( $this->hasSha1Storage() ) {
146 wfDebug( __METHOD__ . ": skipped because storage uses sha1 paths" );
147 return Status::newGood();
148 }
149
150 $backend = $this->backend; // convenience
151 $root = $this->getZonePath( 'deleted' );
152 $dbw = $this->getPrimaryDB();
153 $status = $this->newGood();
154 $storageKeys = array_unique( $storageKeys );
155 foreach ( $storageKeys as $key ) {
156 $hashPath = $this->getDeletedHashPath( $key );
157 $path = "$root/$hashPath$key";
158 $dbw->startAtomic( __METHOD__ );
159 // Check for usage in deleted/hidden files and preemptively
160 // lock the key to avoid any future use until we are finished.
161 $deleted = $this->deletedFileHasKey( $key, 'lock' );
162 $hidden = $this->hiddenFileHasKey( $key, 'lock' );
163 if ( !$deleted && !$hidden ) { // not in use now
164 wfDebug( __METHOD__ . ": deleting $key" );
165 $op = [ 'op' => 'delete', 'src' => $path ];
166 if ( !$backend->doOperation( $op )->isOK() ) {
167 $status->error( 'undelete-cleanup-error', $path );
168 $status->failCount++;
169 }
170 } else {
171 wfDebug( __METHOD__ . ": $key still in use" );
172 $status->successCount++;
173 }
174 $dbw->endAtomic( __METHOD__ );
175 }
176
177 return $status;
178 }
179
187 protected function deletedFileHasKey( $key, $lock = null ) {
188 $dbw = $this->getPrimaryDB();
189 return (bool)$dbw->selectField( 'filearchive', '1',
190 [ 'fa_storage_group' => 'deleted', 'fa_storage_key' => $key ],
191 __METHOD__,
192 $lock === 'lock' ? [ 'FOR UPDATE' ] : []
193 );
194 }
195
203 protected function hiddenFileHasKey( $key, $lock = null ) {
204 $sha1 = self::getHashFromKey( $key );
205 $ext = File::normalizeExtension( substr( $key, strcspn( $key, '.' ) + 1 ) );
206
207 $dbw = $this->getPrimaryDB();
208 return (bool)$dbw->selectField( 'oldimage', '1',
209 [
210 'oi_sha1' => $sha1,
211 'oi_archive_name ' . $dbw->buildLike( $dbw->anyString(), ".$ext" ),
212 $dbw->bitAnd( 'oi_deleted', File::DELETED_FILE ) => File::DELETED_FILE,
213 ],
214 __METHOD__,
215 $lock === 'lock' ? [ 'FOR UPDATE' ] : []
216 );
217 }
218
225 public static function getHashFromKey( $key ) {
226 $sha1 = strtok( $key, '.' );
227 if ( is_string( $sha1 ) && strlen( $sha1 ) === 32 && $sha1[0] === '0' ) {
228 $sha1 = substr( $sha1, 1 );
229 }
230 return $sha1;
231 }
232
239 public function checkRedirect( $title ) {
240 $title = File::normalizeTitle( $title, 'exception' );
241
242 $memcKey = $this->getSharedCacheKey( 'file-redirect', md5( $title->getDBkey() ) );
243 if ( $memcKey === false ) {
244 $memcKey = $this->getLocalCacheKey( 'file-redirect', md5( $title->getDBkey() ) );
245 $expiry = 300; // no invalidation, 5 minutes
246 } else {
247 $expiry = 86400; // has invalidation, 1 day
248 }
249
250 $method = __METHOD__;
251 $redirDbKey = $this->wanCache->getWithSetCallback(
252 $memcKey,
253 $expiry,
254 function ( $oldValue, &$ttl, array &$setOpts ) use ( $method, $title ) {
255 $dbr = $this->getReplicaDB(); // possibly remote DB
256
257 $setOpts += Database::getCacheSetOptions( $dbr );
258
259 $row = $dbr->selectRow(
260 [ 'page', 'redirect' ],
261 [ 'rd_namespace', 'rd_title' ],
262 [
263 'page_namespace' => $title->getNamespace(),
264 'page_title' => $title->getDBkey(),
265 'rd_from = page_id'
266 ],
267 $method
268 );
269
270 return ( $row && $row->rd_namespace == NS_FILE )
271 ? Title::makeTitle( $row->rd_namespace, $row->rd_title )->getDBkey()
272 : ''; // negative cache
273 },
274 [ 'pcTTL' => WANObjectCache::TTL_PROC_LONG ]
275 );
276
277 // @note: also checks " " for b/c
278 if ( $redirDbKey !== ' ' && strval( $redirDbKey ) !== '' ) {
279 // Page is a redirect to another file
280 return Title::newFromText( $redirDbKey, NS_FILE );
281 }
282
283 return false; // no redirect
284 }
285
286 public function findFiles( array $items, $flags = 0 ) {
287 $finalFiles = []; // map of (DB key => corresponding File) for matches
288
289 $searchSet = []; // map of (normalized DB key => search params)
290 foreach ( $items as $item ) {
291 if ( is_array( $item ) ) {
292 $title = File::normalizeTitle( $item['title'] );
293 if ( $title ) {
294 $searchSet[$title->getDBkey()] = $item;
295 }
296 } else {
297 $title = File::normalizeTitle( $item );
298 if ( $title ) {
299 $searchSet[$title->getDBkey()] = [];
300 }
301 }
302 }
303
304 $fileMatchesSearch = static function ( File $file, array $search ) {
305 // Note: file name comparison done elsewhere (to handle redirects)
306
307 // Fallback to RequestContext::getMain should be replaced with a better
308 // way of setting the user that should be used; currently it needs to be
309 // set for each file individually. See T263033#6477586
310 $contextPerformer = RequestContext::getMain()->getAuthority();
311 $performer = ( !empty( $search['private'] ) && $search['private'] instanceof Authority )
312 ? $search['private']
313 : $contextPerformer;
314
315 return (
316 $file->exists() &&
317 (
318 ( empty( $search['time'] ) && !$file->isOld() ) ||
319 ( !empty( $search['time'] ) && $search['time'] === $file->getTimestamp() )
320 ) &&
321 ( !empty( $search['private'] ) || !$file->isDeleted( File::DELETED_FILE ) ) &&
322 $file->userCan( File::DELETED_FILE, $performer )
323 );
324 };
325
326 $applyMatchingFiles = function ( IResultWrapper $res, &$searchSet, &$finalFiles )
327 use ( $fileMatchesSearch, $flags )
328 {
329 $contLang = MediaWikiServices::getInstance()->getContentLanguage();
330 $info = $this->getInfo();
331 foreach ( $res as $row ) {
332 $file = $this->newFileFromRow( $row );
333 // There must have been a search for this DB key, but this has to handle the
334 // cases were title capitalization is different on the client and repo wikis.
335 $dbKeysLook = [ strtr( $file->getName(), ' ', '_' ) ];
336 if ( !empty( $info['initialCapital'] ) ) {
337 // Search keys for "hi.png" and "Hi.png" should use the "Hi.png file"
338 $dbKeysLook[] = $contLang->lcfirst( $file->getName() );
339 }
340 foreach ( $dbKeysLook as $dbKey ) {
341 if ( isset( $searchSet[$dbKey] )
342 && $fileMatchesSearch( $file, $searchSet[$dbKey] )
343 ) {
344 $finalFiles[$dbKey] = ( $flags & FileRepo::NAME_AND_TIME_ONLY )
345 ? [ 'title' => $dbKey, 'timestamp' => $file->getTimestamp() ]
346 : $file;
347 unset( $searchSet[$dbKey] );
348 }
349 }
350 }
351 };
352
353 $dbr = $this->getReplicaDB();
354
355 // Query image table
356 $imgNames = [];
357 foreach ( array_keys( $searchSet ) as $dbKey ) {
358 $imgNames[] = $this->getNameFromTitle( File::normalizeTitle( $dbKey ) );
359 }
360
361 if ( count( $imgNames ) ) {
362 $fileQuery = LocalFile::getQueryInfo();
363 $res = $dbr->select( $fileQuery['tables'], $fileQuery['fields'], [ 'img_name' => $imgNames ],
364 __METHOD__, [], $fileQuery['joins'] );
365 $applyMatchingFiles( $res, $searchSet, $finalFiles );
366 }
367
368 // Query old image table
369 $oiConds = []; // WHERE clause array for each file
370 foreach ( $searchSet as $dbKey => $search ) {
371 if ( isset( $search['time'] ) ) {
372 $oiConds[] = $dbr->makeList(
373 [
374 'oi_name' => $this->getNameFromTitle( File::normalizeTitle( $dbKey ) ),
375 'oi_timestamp' => $dbr->timestamp( $search['time'] )
376 ],
378 );
379 }
380 }
381
382 if ( count( $oiConds ) ) {
383 $fileQuery = OldLocalFile::getQueryInfo();
384 $res = $dbr->select( $fileQuery['tables'], $fileQuery['fields'],
385 $dbr->makeList( $oiConds, LIST_OR ),
386 __METHOD__, [], $fileQuery['joins'] );
387 $applyMatchingFiles( $res, $searchSet, $finalFiles );
388 }
389
390 // Check for redirects...
391 foreach ( $searchSet as $dbKey => $search ) {
392 if ( !empty( $search['ignoreRedirect'] ) ) {
393 continue;
394 }
395
396 $title = File::normalizeTitle( $dbKey );
397 $redir = $this->checkRedirect( $title ); // hopefully hits memcached
398
399 if ( $redir && $redir->getNamespace() === NS_FILE ) {
400 $file = $this->newFile( $redir );
401 if ( $file && $fileMatchesSearch( $file, $search ) ) {
402 $file->redirectedFrom( $title->getDBkey() );
403 if ( $flags & FileRepo::NAME_AND_TIME_ONLY ) {
404 $finalFiles[$dbKey] = [
405 'title' => $file->getTitle()->getDBkey(),
406 'timestamp' => $file->getTimestamp()
407 ];
408 } else {
409 $finalFiles[$dbKey] = $file;
410 }
411 }
412 }
413 }
414
415 return $finalFiles;
416 }
417
425 public function findBySha1( $hash ) {
426 $dbr = $this->getReplicaDB();
427 $fileQuery = LocalFile::getQueryInfo();
428 $res = $dbr->select(
429 $fileQuery['tables'],
430 $fileQuery['fields'],
431 [ 'img_sha1' => $hash ],
432 __METHOD__,
433 [ 'ORDER BY' => 'img_name' ],
434 $fileQuery['joins']
435 );
436
437 $result = [];
438 foreach ( $res as $row ) {
439 $result[] = $this->newFileFromRow( $row );
440 }
441 $res->free();
442
443 return $result;
444 }
445
455 public function findBySha1s( array $hashes ) {
456 if ( $hashes === [] ) {
457 return []; // empty parameter
458 }
459
460 $dbr = $this->getReplicaDB();
461 $fileQuery = LocalFile::getQueryInfo();
462 $res = $dbr->select(
463 $fileQuery['tables'],
464 $fileQuery['fields'],
465 [ 'img_sha1' => $hashes ],
466 __METHOD__,
467 [ 'ORDER BY' => 'img_name' ],
468 $fileQuery['joins']
469 );
470
471 $result = [];
472 foreach ( $res as $row ) {
473 $file = $this->newFileFromRow( $row );
474 $result[$file->getSha1()][] = $file;
475 }
476 $res->free();
477
478 return $result;
479 }
480
488 public function findFilesByPrefix( $prefix, $limit ) {
489 $selectOptions = [ 'ORDER BY' => 'img_name', 'LIMIT' => intval( $limit ) ];
490
491 // Query database
492 $dbr = $this->getReplicaDB();
493 $fileQuery = LocalFile::getQueryInfo();
494 $res = $dbr->select(
495 $fileQuery['tables'],
496 $fileQuery['fields'],
497 'img_name ' . $dbr->buildLike( $prefix, $dbr->anyString() ),
498 __METHOD__,
499 $selectOptions,
500 $fileQuery['joins']
501 );
502
503 // Build file objects
504 $files = [];
505 foreach ( $res as $row ) {
506 $files[] = $this->newFileFromRow( $row );
507 }
508
509 return $files;
510 }
511
516 public function getReplicaDB() {
517 return wfGetDB( DB_REPLICA );
518 }
519
525 public function getPrimaryDB() {
526 return wfGetDB( DB_PRIMARY );
527 }
528
534 public function getMasterDB() {
535 wfDeprecated( __METHOD__, '1.37' );
536 return $this->getPrimaryDB();
537 }
538
543 protected function getDBFactory() {
544 return static function ( $index ) {
545 return wfGetDB( $index );
546 };
547 }
548
555 protected function hasAcessibleSharedCache() {
557 }
558
559 public function getSharedCacheKey( $kClassSuffix, ...$components ) {
560 // T267668: do not include the repo name in the key
561 return $this->hasAcessibleSharedCache()
562 ? $this->wanCache->makeGlobalKey(
563 'filerepo-' . $kClassSuffix,
564 $this->dbDomain,
565 ...$components
566 )
567 : false;
568 }
569
576 public function invalidateImageRedirect( $title ) {
577 $key = $this->getSharedCacheKey( 'file-redirect', md5( $title->getDBkey() ) );
578 if ( $key ) {
579 $this->getPrimaryDB()->onTransactionPreCommitOrIdle(
580 function () use ( $key ) {
581 $this->wanCache->delete( $key );
582 },
583 __METHOD__
584 );
585 }
586 }
587
594 public function getInfo() {
595 global $wgFavicon;
596
597 return array_merge( parent::getInfo(), [
598 'favicon' => wfExpandUrl( $wgFavicon ),
599 ] );
600 }
601
602 public function store( $srcPath, $dstZone, $dstRel, $flags = 0 ) {
603 return $this->skipWriteOperationIfSha1( __FUNCTION__, func_get_args() );
604 }
605
606 public function storeBatch( array $triplets, $flags = 0 ) {
607 return $this->skipWriteOperationIfSha1( __FUNCTION__, func_get_args() );
608 }
609
610 public function cleanupBatch( array $files, $flags = 0 ) {
611 return $this->skipWriteOperationIfSha1( __FUNCTION__, func_get_args() );
612 }
613
614 public function publish(
615 $src,
616 $dstRel,
617 $archiveRel,
618 $flags = 0,
619 array $options = []
620 ) {
621 return $this->skipWriteOperationIfSha1( __FUNCTION__, func_get_args() );
622 }
623
624 public function publishBatch( array $ntuples, $flags = 0 ) {
625 return $this->skipWriteOperationIfSha1( __FUNCTION__, func_get_args() );
626 }
627
628 public function delete( $srcRel, $archiveRel ) {
629 return $this->skipWriteOperationIfSha1( __FUNCTION__, func_get_args() );
630 }
631
632 public function deleteBatch( array $sourceDestPairs ) {
633 return $this->skipWriteOperationIfSha1( __FUNCTION__, func_get_args() );
634 }
635
643 protected function skipWriteOperationIfSha1( $function, array $args ) {
644 $this->assertWritableRepo(); // fail out if read-only
645
646 if ( $this->hasSha1Storage() ) {
647 wfDebug( __METHOD__ . ": skipped because storage uses sha1 paths" );
648 return Status::newGood();
649 } else {
650 return parent::$function( ...$args );
651 }
652 }
653
663 public function isJsonMetadataEnabled() {
665 }
666
673 public function isSplitMetadataEnabled() {
675 }
676
683 public function getSplitMetadataThreshold() {
685 }
686
687 public function isMetadataUpdateEnabled() {
689 }
690
693 }
694
701 public function getBlobStore(): ?BlobStore {
702 if ( !$this->blobStore ) {
703 $this->blobStore = MediaWikiServices::getInstance()->getBlobStoreFactory()
704 ->newBlobStore( $this->dbDomain );
705 }
706 return $this->blobStore;
707 }
708}
$wgFavicon
The URL path of the shortcut icon.
const NS_FILE
Definition Defines.php:70
const LIST_OR
Definition Defines.php:46
const LIST_AND
Definition Defines.php:43
wfDebug( $text, $dest='all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfExpandUrl( $url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
if(ini_get('mbstring.func_overload')) if(!defined('MW_ENTRY_POINT'))
Pre-config setup: Before loading LocalSettings.php.
Definition Setup.php:88
Proxy backend that manages file layout rewriting for FileRepo.
doOperation(array $op, array $opts=[])
Same as doOperations() except it takes a single operation.
Base class for file repositories.
Definition FileRepo.php:45
assertWritableRepo()
Throw an exception if this repo is read-only by design.
newGood( $value=null)
Create a new good result.
const NAME_AND_TIME_ONLY
Definition FileRepo.php:51
getLocalCacheKey( $kClassSuffix,... $components)
Get a site-local, repository-qualified, WAN cache key.
hasSha1Storage()
Returns whether or not storage is SHA-1 based.
FileBackend $backend
Definition FileRepo.php:68
getZonePath( $zone)
Get the storage path corresponding to one of the zones.
Definition FileRepo.php:400
getDeletedHashPath( $key)
Get a relative path for a deletion archive key, e.g.
getNameFromTitle( $title)
Get the name of a file from its title.
Definition FileRepo.php:718
newFile( $title, $time=false)
Create a new File object from the local repository.
Definition FileRepo.php:424
Implements some public methods and some protected utility functions which are required by multiple ch...
Definition File.php:66
A repository that stores files in the local filesystem and registers them in the wiki's own database.
Definition LocalRepo.php:41
skipWriteOperationIfSha1( $function, array $args)
Skips the write operation if storage is sha1-based, executes it normally otherwise.
int null $splitMetadataThreshold
Definition LocalRepo.php:70
getDBFactory()
Get a callback to get a DB handle given an index (DB_REPLICA/DB_PRIMARY)
getSharedCacheKey( $kClassSuffix,... $components)
Get a global, repository-qualified, WAN cache key.
isMetadataUpdateEnabled()
getInfo()
Return information about the repository.
newFileFromRow( $row)
isSplitMetadataEnabled()
Returns true if files should split up large metadata, storing parts of it in the BlobStore.
deletedFileHasKey( $key, $lock=null)
Check if a deleted (filearchive) file has this sha1 key.
callable $oldFileFactoryKey
Definition LocalRepo.php:53
callable $oldFileFactory
Definition LocalRepo.php:51
isJsonMetadataEnabled()
Returns true if files should store metadata in JSON format.
cleanupBatch(array $files, $flags=0)
Deletes a batch of files.
publishBatch(array $ntuples, $flags=0)
Publish a batch of files.
findFiles(array $items, $flags=0)
Find many files at once.
findFilesByPrefix( $prefix, $limit)
Return an array of files where the name starts with $prefix.
findBySha1s(array $hashes)
Get an array of arrays or iterators of file objects for files that have the given SHA-1 content hashe...
getBlobStore()
Get a BlobStore for storing and retrieving large metadata, or null if that can't be done.
callable $oldFileFromRowFactory
Definition LocalRepo.php:49
string $dbDomain
DB domain of the repo wiki.
Definition LocalRepo.php:56
BlobStore $blobStore
Definition LocalRepo.php:61
bool $useJsonMetadata
Definition LocalRepo.php:64
invalidateImageRedirect( $title)
Invalidates image redirect cache related to that image.
cleanupDeletedBatch(array $storageKeys)
Delete files in the deleted directory if they are not referenced in the filearchive table.
bool $updateCompatibleMetadata
Definition LocalRepo.php:73
getPrimaryDB()
Get a connection to the primary DB.
checkRedirect( $title)
Checks if there is a redirect named as $title.
hasAcessibleSharedCache()
Check whether the repo has a shared cache, accessible from the current site context.
bool $hasAccessibleSharedCache
Whether shared cache keys are exposed/accessible.
Definition LocalRepo.php:58
callable $fileFactoryKey
Definition LocalRepo.php:45
getReplicaDB()
Get a connection to the replica DB.
store( $srcPath, $dstZone, $dstRel, $flags=0)
Store a file to a given destination.
publish( $src, $dstRel, $archiveRel, $flags=0, array $options=[])
Copy or move a file either from a storage path, virtual URL, or file system path, into this repositor...
getMasterDB()
Get a connection to the primary DB.
storeBatch(array $triplets, $flags=0)
Store a batch of files.
getSplitMetadataThreshold()
Get the threshold above which metadata items should be split into separate storage,...
callable $fileFromRowFactory
Definition LocalRepo.php:47
__construct(array $info=null)
Definition LocalRepo.php:78
deleteBatch(array $sourceDestPairs)
Move a group of files to the deletion archive.
hiddenFileHasKey( $key, $lock=null)
Check if a hidden (revision delete) file has this sha1 key.
static getHashFromKey( $key)
Gets the SHA1 hash from a storage key.
newFromArchiveName( $title, $archiveName)
bool $reserializeMetadata
Definition LocalRepo.php:76
isMetadataReserializeEnabled()
callable $fileFactory
Definition LocalRepo.php:43
bool $useSplitMetadata
Definition LocalRepo.php:67
findBySha1( $hash)
Get an array or iterator of file objects for files that have a given SHA-1 content hash.
MediaWiki exception.
MediaWikiServices is the service locator for the application scope of MediaWiki.
static newFromArchiveName( $title, $repo, $archiveName)
static getQueryInfo(array $options=[])
Return the tables, fields, and join conditions to be selected to create a new oldlocalfile object.
Relational database abstraction object.
Definition Database.php:52
Interface for objects (potentially) representing an editable wiki page.
This interface represents the authority associated the current execution context, such as a web reque...
Definition Authority.php:37
Service for loading and storing data blobs.
Definition BlobStore.php:35
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:38
Result wrapper for grabbing data queried from an IDatabase object.
if( $line===false) $args
Definition mcc.php:124
const DB_REPLICA
Definition defines.php:25
const DB_PRIMARY
Definition defines.php:27
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.
Definition router.php:42
if(!is_readable( $file)) $ext
Definition router.php:48