aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filerepo/NullRepo.php
Commit message (Collapse)AuthorAgeFilesLines
* Replace deprecated MWExceptionDaimona Eaytoy2024-01-161-2/+4
| | | | | Bug: T328220 Change-Id: Ic45438d9e6bbf127f1415add81ab902044765840
* Fix even more PHPStorm inspections (#3)Tim Starling2023-03-251-0/+1
| | | | | | | | | | | | | | | * Inappropriate @inheritDoc usage. Arguably all @inheritDoc is inappropriate but these are the ones PHPStorm flags as misleading due to the method not being inherited. * Doc comment type does not match actual argument/return type. * I replaced "@return void|never" with "@return void" since never means never, it doesn't make sense for it to be conditional. If a method can return (even if that is unlikely) then @return contains the type that it returns. "@return never" means that there is no such type because the method never returns. * Incomplete/partial/broken doc tags Change-Id: Ide86bd6d2b44387f37d234c2b059d6fbc42ec962
* filerepo: Clean up file and class doc commentsTimo Tijhof2022-04-071-3/+3
| | | | | | | | | | | | | | | | * Remove copy-paste descriptions that are unrelated to the file. * Move any useful information from file block to class block. * Ensure any relevant `ingroup` is set on the class block. * Remove left-over ingroup and class description from file block, which pollutes the doc index for no gain. * Mark some obscure classes that have no references outside core in Codesearch Everywhere as internal. Change-Id: If2360596b4a7511db7439b4b9867b0600ce2d5f8
* Set method visibility for various constructorsUmherirrender2019-12-031-1/+1
| | | | Change-Id: Id3c88257e866923b06e878ccdeddded7f08f2c98
* Clean up get_class() in /includes/filerepo and /includes/resourceloaderTimo Tijhof2017-03-071-1/+1
| | | | | | | | * get_class() -> __CLASS__ (same as self::class) * get_called_class() -> static::class * get_class($this) -> static::class Change-Id: Ic4f9b150ddc35e25f51297de7fc12410d421be4d
* Update documentation for file repo related classesSiebrand Mazeland2013-12-041-2/+1
| | | | Change-Id: I626d972f92934afc9349e11d3a5550c4044dcb53
* Update formatting of file repo classesSiebrand Mazeland2013-11-231-1/+2
| | | | Change-Id: I780070e07352d84d7cda7628994b28b04e8a1ebf
* Improved/added parameter documentationReedy2012-05-181-0/+4
| | | | Change-Id: Ie48852acb434f6b62fda0b13b13e076f833d8975
* Added missing GPLv2 headers in some places.Alexandre Emsenhuber2012-05-071-0/+15
| | | | | | Also made file/class documentation more consistent. Change-Id: Iad15427368d13a6cc11c8512b7265e8c7b8878a5
* [FileRepo] Various code cleanups.Aaron Schulz2012-04-051-33/+2
| | | | | | | | | | | | | | | | | | * Made File::isHashed() wrap FileRepo::getHashLevels(). Removed now-used FileRepo::isHashed(). * Removed FileRepo::simpleClean(). Not useful anymore since the paths in Status errors don't have $IP or upload dirs anymore. * Removed code in FileRepo::fileExistsBatch() and FileRepo::cleanupBatch() to handle FS file paths, which should never be passed in anymore. Likewise, removed FILES_ONLY parameter. * Removed FileRepo::append()/appendFinish() stub functions. * Added FileRepo::assertWritableRepo() function to better handle repos that are read-only by design rather than the hack of overwriting each function (several were missed). * Added FileBackend::isPathTraversalFree() function and used it in FileRepo::validateFilename() to avoid duplication. * Tweaked FileRepo::freeTemp() to avoid file locking and made FileRepo::cleanupBatch() return a Status. * Moved FileRepo::cleanupDeletedBatch() near FileRepo::deleteBatch(). * Added type hinting to a few places. * Tweaked some misleading doc comments and added function visibility markers. Change 1: * Simplified NullRepo to also use assertWritableRepo(). It is currently only used by a single unit test. Change-Id: I1cd0f4971011772e38e5156f94ffc50325372f28
* Use database to track uploaded chunks and concatenate at the end.Jan Gerber2011-11-301-0/+3
| | | | | | | | | | with i18n documentation dont break phpunit follow up r93720 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/104687
* Fill-in missing implementations of abstract function appendFinish()Russ Nelson2011-05-231-0/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/88631
* * added file description headersAlexandre Emsenhuber2010-09-041-0/+6
| | | | | | | * changed a @ingroup Media to FileRepo Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/72385
* follow up r62231, r61779, r62175Mark A. Hershberger2010-02-221-1/+1
| | | | | | | | | | | | | | | * Fix up messages * For new FileRepo::append(), use flags to determine whether to delete or not * Add more error checking for appending * Fix a couple of places in Revision.php and LogPage.php where DB errors were produced when comment was null * Remove bogus checking for !$comment, etc on the DONE phase of chunked uploading * Don't pretend to return a value when raising an exception * Add more tests for chunked uploads * Verify that Status::getErrorsArray() (at least where it is used in ApiUpload::execute()) returns an array that we can pass to dieUsageMessage() * Ensure that checkWarnings(), etc work only on the complete file Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/62806
* * new FauxResponse class to help with unit testingMark A. Hershberger2010-02-101-0/+3
| | | | | | | | | | | * Add append() method to FileRepo classes to enable chunked uploading * Change chunksessionkey to chunksession * Remove echo json stuff * Fix a multitude of bugs in my own code * still to test: mwEmbed use of chunked upload Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/62231
* Removed JS2 work (has been moved to the js2-work branch). Has been lightly ↵Tim Starling2009-11-261-3/+0
| | | | | | | | | | | | | | tested, should mostly work. Some of the more complicated associated changes are listed below. * Reverted HttpFunctions.php to r45549 and renamed wgSyncHTTPTimeout back to wgHTTPTimeout * Edited out the asynchronous features from UploadFromUrl. Made fetchFile() use the curlCopy() function from new-upload r47811 instead of Http::doDownload(). Wrote my own URL validity check to avoid having to use either of the two buggy precedents. * Removed UploadFromChunk * Removed chunk upload and background status from ApiUpload.php * Reverted r54669, use of addScriptClass() * Left getHeadScripts() in its current location (OutputPage) instead of moving it back to SkinTemplate, just added wikibits.js to it to replace the removed addCoreScripts2Top() Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/59446
* * some clean up and defined append function in other repo typesMichael Dale2009-09-171-0/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/56554
* * Per my CR comments on r44560: merged FileCache into RepoGroup and fixed ↵Tim Starling2009-08-151-1/+1
| | | | | | | | | | | | wfFindFile() global function bloat. Did not port unused functions such as the batch loading functions. * Fixed the formal parameter bloat in the file finding functions by making wfFindFile(), RepoGroup::findFile() and FileRepo::findFile() take an associative array of options instead of a rapidly growing collection of formal parameters. Maintained backwards compatibility for the $time parameter, which was the only one used in an extension. * Took the advice of the todo comment on FileRepo::findFiles() and implemented a calling convention for specifying times (and other options) * Removed the file object cache from Parser, redundant with the RepoGroup file cache * Deleted clueless and non-functional LocalRepo::findFiles(). Does not respect redirects, deletion bitfields, or anything else nuanced about FileRepo::findFile(). Does not have the same calling convention as FileRepo::findFiles(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/55082
* Add fileExistsBatch method to FileRepo and derived classes (per comments on ↵Victor Vasiliev2009-06-081-0/+3
| | | | | | | r49001) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/51592
* WARNING: HUGE COMMITAlexandre Emsenhuber2008-05-201-1/+1
| | | | | | | | | | | | | | | | | | Doxygen documentation update: * Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group. * Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file. * Removed some empty comments * Removed some ?> Added following groups: * ExternalStorage * JobQueue * MaintenanceLanguage One more thing: there are still a lot of warnings when generating the doc. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/35098
* * remove end of line whitespaceSiebrand Mazeland2008-04-141-4/+2
| | | | | | | | * remove empty lines at end of file * remove "?>" where still present Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/33276
* A file repository without files. Gets rid of useless DB queries during ↵Tim Starling2007-11-201-0/+34
parser testing. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/27668