[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Local repository that stores files in the local filesystem and registers them in the wiki's own database. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 516 lines (15 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
LocalRepo:: (17 methods):
newFileFromRow()
newFromArchiveName()
cleanupDeletedBatch()
deletedFileHasKey()
hiddenFileHasKey()
getHashFromKey()
checkRedirect()
getArticleID()
findFiles()
findBySha1()
findBySha1s()
findFilesByPrefix()
getSlaveDB()
getMasterDB()
getSharedCacheKey()
invalidateImageRedirect()
getInfo()
newFileFromRow( $row ) X-Ref |
param: stdClass $row return: LocalFile |
newFromArchiveName( $title, $archiveName ) X-Ref |
param: Title $title param: string $archiveName return: OldLocalFile |
cleanupDeletedBatch( array $storageKeys ) X-Ref |
Delete files in the deleted directory if they are not referenced in the filearchive table. This needs to be done in the repo because it needs to interleave database locks with file operations, which is potentially a remote operation. param: array $storageKeys return: FileRepoStatus |
deletedFileHasKey( $key, $lock = null ) X-Ref |
Check if a deleted (filearchive) file has this sha1 key param: string $key File storage key (base-36 sha1 key with file extension) param: string|null $lock Use "lock" to lock the row via FOR UPDATE return: bool File with this key is in use |
hiddenFileHasKey( $key, $lock = null ) X-Ref |
Check if a hidden (revision delete) file has this sha1 key param: string $key File storage key (base-36 sha1 key with file extension) param: string|null $lock Use "lock" to lock the row via FOR UPDATE return: bool File with this key is in use |
getHashFromKey( $key ) X-Ref |
Gets the SHA1 hash from a storage key param: string $key return: string |
checkRedirect( Title $title ) X-Ref |
Checks if there is a redirect named as $title param: Title $title Title of file return: bool|Title |
getArticleID( $title ) X-Ref |
Function link Title::getArticleID(). We can't say Title object, what database it should use, so we duplicate that function here. param: Title $title return: bool|int|mixed |
findFiles( array $items, $flags = 0 ) X-Ref |
No description |
findBySha1( $hash ) X-Ref |
Get an array or iterator of file objects for files that have a given SHA-1 content hash. param: string $hash A sha1 hash to look for return: File[] |
findBySha1s( array $hashes ) X-Ref |
Get an array of arrays or iterators of file objects for files that have the given SHA-1 content hashes. Overrides generic implementation in FileRepo for performance reason param: array $hashes An array of hashes return: array An Array of arrays or iterators of file objects and the hash as key |
findFilesByPrefix( $prefix, $limit ) X-Ref |
Return an array of files where the name starts with $prefix. param: string $prefix The prefix to search for param: int $limit The maximum amount of files to return return: array |
getSlaveDB() X-Ref |
Get a connection to the slave DB return: DatabaseBase |
getMasterDB() X-Ref |
Get a connection to the master DB return: DatabaseBase |
getSharedCacheKey( ) X-Ref |
Get a key on the primary cache for this repository. Returns false if the repository's cache is not accessible at this site. The parameters are the parts of the key, as for wfMemcKey(). return: string |
invalidateImageRedirect( Title $title ) X-Ref |
Invalidates image redirect cache related to that image param: Title $title Title of page return: void |
getInfo() X-Ref |
Return information about the repository. return: array |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |