| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T353458
Change-Id: I35864ad9bd48701703c51367d62f8ebde963c52d
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I assume these are all either auto-generated by an IDE or the
language-level type declarations have been added later. In any case
the comments don't add any new information to what the code already
says. This is just extra clutter that makes the code harder to read,
I would argue.
There are many, many more comments like this. In this patch I
intentionally focus on the most trivial 1-line comments.
Change-Id: Ia294bf4ce0d8a77036842fe25884bc175c2b0e7d
|
|
|
|
|
|
|
|
|
|
|
| |
Some less trivial cases. Also update variable names.
This doesn't really change anything, but I hope it helps promote
getConnectionProvider() as the common way to do this.
Follow-up to 8604c384f624273f46b653ec252ffaed30e6ff89.
Change-Id: I6657d783375fac5c7fa856b884ff1fb09285e94c
|
|
|
|
|
| |
Bug: T328220
Change-Id: Ic45438d9e6bbf127f1415add81ab902044765840
|
|
|
|
|
|
|
| |
It uses db factory in some places and that should be properly cleaned up
Bug: T330641
Change-Id: I310199ce7b2e46d08392204d26e77690dc6afd20
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now, Extension:TimedMediaHandler hardcodes checks for
ForeignDBViaLBRepo, which makes it inoperable for wikis making use of
ForeignDBRepo or an extension-provided foreign repo that exposes direct
access to the remote MW database. Introducing a new interface in core
will allow TimedMediaHandler to check for this interface instead of
specific implementations of foreign db repos.
I wasn't quite sure what methods to populate the interface with, since
all current implementations extend from LocalRepo, and most things that
interact with it largely expect (close to) the full API surface that
LocalRepo provides. Rather than duplicating all of those methods in the
interface, I opted for providing two methods that any custom
implementations would be required to override should they extend from
LocalRepo as a base class. I'm open to other approaches here, however.
Bug: T63986
Change-Id: I76b43e77f44e90eef5f3d2ac05ef203ed3085bd2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
They have been deprecated since 1.37 and are unused.
Change-Id: I626525eead68e3ba50564ac629a86c7c8dc9dd73
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
| |
Also switch one use that we missed in the rebase.
Bug: T254646
Depends-On: I632610dec1aa6bb59af5423e6f86164fc791aadd
Change-Id: I9873c889f943fcbd7d867d534a7857f20ef0c5dc
|
|
|
|
|
| |
Bug: T254646
Change-Id: I68198bc39b174ea1920b4acc2617cb6c6ce406e9
|
|
|
|
|
|
| |
Just an auto-replace from codesniffer for now.
Change-Id: I5240dc9ac5929d291b0ef1c743ea2bfd3f428266
|
|
|
|
|
|
|
| |
This avoids statsd metrics with names that begin with DB domains
Bug: T261534
Change-Id: I69fa4482c639bd49bdc2dec48a8dcdd74d455432
|
|
|
|
|
|
|
|
|
|
|
| |
Keys used by multiple wikis should use this key generation method.
It also means settings like "coalesceKeys" in WANObjectCache will
correctly identify these keys as being global.
This change should be deployed on all wikis at once.
Bug: T253405
Change-Id: Ie19613ef7643af92aeb56db203e3d79139143231
|
|
|
|
| |
Change-Id: I44cd7ba39a898a27f0f66cf34238ab95370d2279
|
|
|
|
| |
Change-Id: I7fbe19c96cc41e9f4534e56853fd119b74b2603c
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the errors are suppressed because they're phan false positives.
The idea behind this is that they'll be fixed in a future version of
phan, and we'll just have to remove the suppressions.
Note: I'm disabling UnusedPluginSuppression so that we can start suppressing
issues even if they're still disabled. The sniff should be re-enabled
as soon as we upgrade phan.
Bug: T231636
Change-Id: I0f7fa06a9e03fbb86c7a5eb6e50a850bb258a7f7
|
|
|
|
|
|
|
| |
This is the last repo-wide suppressed issue. Hurrah.
Bug: T231636
Change-Id: I3dc939f115bea14848c9c40bc52a7601f86ca0a7
|
|
|
|
| |
Change-Id: Ia60139c5670ad572058cf39c7e7bf78972d29d9f
|
|
|
|
|
|
| |
@deprecated since 1.27
Change-Id: Ibdd49fdfc0d1511503e1ed2173a592c612996c53
|
|
|
|
|
|
|
| |
This helps to find renamed or misspelled classes earlier.
Phan will check the class names
Change-Id: I07a925c2a9404b0865e8a8703864ded9d14aa769
|
|
|
|
|
|
|
|
|
|
|
|
| |
The used phpcs has a bug, so the version 0.9.0 could not be enforced at the moment.
Will be fixed in next version, see T167168
Changed:
- Remove duplicate newline at end of file
- Add space between function and ( for closures
- and -> &&, or -> ||
Change-Id: I4172fb08861729bccd55aecbd07e029e2638d311
|
|
|
|
|
|
|
|
| |
* get_class() -> __CLASS__ (same as self::class)
* get_called_class() -> static::class
* get_class($this) -> static::class
Change-Id: Ic4f9b150ddc35e25f51297de7fc12410d421be4d
|
|
|
|
|
|
| |
The old name is left as an alias.
Change-Id: I60ab2cd5ce05df4247d5e25b017d2debee56554e
|
|
|
|
|
|
| |
This assures that reuseConnection() will be called.
Change-Id: I6b9eb695d08045433ebb3204c0f72bcf63f21568
|
|
|
|
| |
Change-Id: I98247b299c31b93df183981adc517187cb4aefe5
|
|
|
|
|
|
|
|
|
| |
This is more consistent with LoadBalancer, modern, and inclusive
of master/master mysql, NDB cluster, and MariaDB galera cluster.
The old constant is an alias now.
Change-Id: I0b37299ecb439cc446ffbe8c341365d1eef45849
|
|
|
|
|
|
|
|
|
|
| |
Per wikitech-l consensus:
https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html
Notes:
* Disabled CallTimePassByReference due to false positives (T127163)
Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
|
|
|
|
| |
Change-Id: I8c8d85b32a8aba21e14d2a2dde4c25eb509186c1
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added a "storageLayout" flag to LocalRepo config (supports "sha1")
* Added a simple migration script to copy files the SHA1 paths
* Currently works with img_auth.php + thumb_handler.php for URLs
* Added visibility to some LocalFile methods
* Simple tests for the wrapper class.
Co-Authored-By: Gilles Dubuc <gdubuc@wikimedia.org>
Change-Id: Iad46ad669c8ae3c02d10da10c3f7a16fe161663f
Bug: T1210
|
|
|
|
|
|
|
|
|
| |
Due to the weird inheritance structure of the FileRepo tree,
ForeignDBViaLBRepo inherited the wrong getInfo behavior and
returned the favicon of the local wiki.
Change-Id: I4892247c0e4a2e05c9148efe089f0ff52459bbd0
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/253
|
|
|
|
| |
Change-Id: I626d972f92934afc9349e11d3a5550c4044dcb53
|
|
|
|
| |
Change-Id: Ia608df217bb893dddae3219b3315cb44e82f5092
|
|
|
|
| |
Change-Id: I780070e07352d84d7cda7628994b28b04e8a1ebf
|
|
|
|
| |
Change-Id: I7db616db8c969567d420c0161fa207b366e292b6
|
|
|
|
| |
Change-Id: Ie48852acb434f6b62fda0b13b13e076f833d8975
|
|
|
|
|
|
| |
Also made file/class documentation more consistent.
Change-Id: Iad15427368d13a6cc11c8512b7265e8c7b8878a5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111101
|
|
|
|
|
|
|
| |
changes SVN likes to sprinkle in (easy to spot from the change list). Did not add SwiftFileBackend.php as it still is in development.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/106752
|
|
|
|
|
|
|
| |
* changed a @ingroup Media to FileRepo
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/72385
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't connect to the commons DB on cache hits, in order to determine the cache key name. Removed remnants of that bright idea from GlobalFunctions.php.
* Fixed total failure of negative caching in checkRedirect() due to memcached stripping trailing spaces from string values. Probably never worked.
Also:
* Respect hasSharedCache in foreign repos. Recently-added code was apparently ignorant of this setting.
* Renamed getMemcKey() to getSharedCacheKey() to make its function more clear, introduced getLocalCacheKey() to do the other thing. Fixed its parameters to be like wfMemcKey() and used it in more places.
* Used getLocalCacheKey() in various places instead of wfMemc(), to avoid having multiple repositories overwrite each others' caches.
* Fixed the BagOStuff bug that the FIXME in LocalRepo::checkRedirect() appears to refer to.
* Removed getMasterDB() and getSlaveDB() from FileRepo, it's incorrect to assume that a repo other than a LocalRepo has an associated database.
* Made FileRepo::invalidateImageRedirect() a stub, to match FileRepo::checkRedirect(). Moved the functionality to LocalRepo where checkRedirect() is concretely implemented.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/52024
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/35612
|
|
|
|
|
|
|
| |
* Don't remove found files from the $titles parameter in findFiles
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/35595
|
|
|
|
|
|
|
|
|
| |
newFileFromRow() from ForeignDBRepo.
Probably this is all wrong, and both classes should be ripped out a bit and told to use the defined factory functions?
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/35576
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
balancers and connecting to foreign DBs.
* Wrote two concrete implementations. LBFactory_Simple is for general installations. LBFactory_Multi will replace the runtime configuration used on Wikimedia and allow load-balanced connections to any DB.
* Ported Special:Userrights, CentralAuth and OAI audit to the LBFactory system.
* Added ForeignDBViaLBRepo, a file repository which uses LBFactory.
* Removed $wgLoadBalancer and $wgAlternateMaster
* Improved the query group concept to allow failover and lag control
* Improved getReaderIndex(), it will now try all servers before waiting, instead of waiting after each.
* Removed the $fail parameter to getConnection(), obsolete.
* Removed the useless force() function.
* Abstracted the replication position interface to allow for future non-MySQL support.
* Rearranged Database.php. Added a few debugging features.
* Removed ancient benet-specific hack from waitForSlave.php
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/32578
|