| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Iee9a3e43fc1689dde867ec7349f0347c741abc36
|
|
|
|
|
|
|
|
|
| |
This includes fixing some mistakes, as well as removing
redundant text that doesn't add new information, either because
it literally repeats what the code already says, or is actually
duplicated.
Change-Id: I3a8dd8ce57192deda8916cc444c87d7ab1a36515
|
|
|
|
|
|
|
| |
Logic was moved to UserGroupManager, see T252621.
All usages were in core, and are replaced.
Change-Id: I6b0ff6834cded95dad0bc7dccbff0e0121580bb0
|
|
|
|
|
| |
Bug: T252621
Change-Id: Ic51119cd01771ab1b68294fa5dfacb8034e33b6b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate all callers of Hooks::run() to use the new
HookContainer/HookRunner system.
General principles:
* Use DI if it is already used. We're not changing the way state is
managed in this patch.
* HookContainer is always injected, not HookRunner. HookContainer
is a service, it's a more generic interface, it is the only
thing that provides isRegistered() which is needed in some cases,
and a HookRunner can be efficiently constructed from it
(confirmed by benchmark). Because HookContainer is needed
for object construction, it is also needed by all factories.
* "Ask your friendly local base class". Big hierarchies like
SpecialPage and ApiBase have getHookContainer() and getHookRunner()
methods in the base class, and classes that extend that base class
are not expected to know or care where the base class gets its
HookContainer from.
* ProtectedHookAccessorTrait provides protected getHookContainer() and
getHookRunner() methods, getting them from the global service
container. The point of this is to ease migration to DI by ensuring
that call sites ask their local friendly base class rather than
getting a HookRunner from the service container directly.
* Private $this->hookRunner. In some smaller classes where accessor
methods did not seem warranted, there is a private HookRunner property
which is accessed directly. Very rarely (two cases), there is a
protected property, for consistency with code that conventionally
assumes protected=private, but in cases where the class might actually
be overridden, a protected accessor is preferred over a protected
property.
* The last resort: Hooks::runner(). Mostly for static, file-scope and
global code. In a few cases it was used for objects with broken
construction schemes, out of horror or laziness.
Constructors with new required arguments:
* AuthManager
* BadFileLookup
* BlockManager
* ClassicInterwikiLookup
* ContentHandlerFactory
* ContentSecurityPolicy
* DefaultOptionsManager
* DerivedPageDataUpdater
* FullSearchResultWidget
* HtmlCacheUpdater
* LanguageFactory
* LanguageNameUtils
* LinkRenderer
* LinkRendererFactory
* LocalisationCache
* MagicWordFactory
* MessageCache
* NamespaceInfo
* PageEditStash
* PageHandlerFactory
* PageUpdater
* ParserFactory
* PermissionManager
* RevisionStore
* RevisionStoreFactory
* SearchEngineConfig
* SearchEngineFactory
* SearchFormWidget
* SearchNearMatcher
* SessionBackend
* SpecialPageFactory
* UserNameUtils
* UserOptionsManager
* WatchedItemQueryService
* WatchedItemStore
Constructors with new optional arguments:
* DefaultPreferencesFactory
* Language
* LinkHolderArray
* MovePage
* Parser
* ParserCache
* PasswordReset
* Router
setHookContainer() now required after construction:
* AuthenticationProvider
* ResourceLoaderModule
* SearchEngine
Change-Id: Id442b0dbe43aba84bd5cf801d86dedc768b082c7
|
|
|
|
| |
Change-Id: I047e099a93203a59093946d336a143d899d0271f
|
|
|
|
|
|
|
|
|
| |
Phan can treat scalar types as non-interchangeable with
`scalar_implicit_cast` set to false. This patch fixes some of those
issues (which are in total >1000), namely the ones with alphabetic order
< includes/actions.
Change-Id: Ib1c6573ab899088bc319b9da9ceaffc850da3dbe
|
|
|
|
|
| |
Bug: T220191
Change-Id: Ifa8afa90c432723b0bba0033a46b6a499c77e6fc
|
|
|
|
|
|
|
|
| |
Currently, a partial block will block an autopromote, this should not be the
case. Instead, autopromote will only be blocked by sitewide blocks.
Bug: T228479
Change-Id: Id945b6ab374cb49c4a265b5ca149e13b68d4acac
|
|
|
|
| |
Change-Id: I0c83783051bf35fe785bc01644eeb2946902b6b2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The method User::isBlocked() attempts to answer two questions:
(1) Does the user have a block?
(2) Is the user prevented from performing this action?
The method can answer #1, but it cannot answer #2. Since User::getBlock() can
also answer #1, this method is redundant. The method cannot answer #2 because
there is not enough context in order to answer that question.
If access is being checked against a Title object, all access checks can be
performed with PermissionManager:userCan() which will also check the user's
blocks.
If performing all access checks is not desirable, using
PermissionManager::isBlockedFrom() is also acceptable for only checking if the
user is blocked. This method does *not* determine if the action is allowed,
only that the user's block applies to that Title.
If access is being checked without an existing Title, User::getBlock() can be
used to get the user's block. Then Block::appliesToRight() can be used to
determine if the block applies explicitly to a right (or returns null if
it is unknown or false if explicitly allowed). If the user is creating a new
Title, but the text of the title is not yet known (as in the case of Wikibase),
access should be checked with Block::appliesToNamespace().
Bug: T209004
Change-Id: Ic0ad1b92e957797fee8dcd00bd1092fe69fa58f1
|
|
|
|
|
|
|
| |
Autopromote makes a DB call to fetch user edit count when checking edit count requirements. We can skip this call if requirement is set to 0 or invalid (less than 0).
Bug: T157718
Change-Id: I7bcfa6e7e4991fe7b48bef84ad24621564261abc
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
* This avoids the overhead of an extra function call
Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
|
|
|
|
|
|
|
|
|
| |
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.
Change-Id: I7f605aa9e117b5fd80d9b1440864fe526d2b14a5
|
|
|
| |
Change-Id: Iaf3120b4e32cc5835ef9ed86236d98679e2b87fa
|
|
|
|
| |
Change-Id: Ia57685d8858e02e399ad5c75ce64d12609d340ac
|
|
|
|
|
|
| |
While at it, added/removed some other spaces in the same files
Change-Id: I84d8001aa123a008807ad5eb76f396aed7c899a4
|
|
|
|
|
|
|
|
|
| |
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls
Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"
Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
|
|
|
|
|
|
|
|
|
|
|
| |
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
|
|
|
|
|
|
|
| |
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.
Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
|
|
|
|
|
|
| |
Also made file/class documentation more consistent.
Change-Id: Ife63db5d36d833de4e0944f9b79ab0f80e7b84c5
|
|
|
|
|
|
|
|
|
| |
bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/111053
|
|
|
|
|
|
|
|
|
| |
* Changed all calls in core to the latter
* Also marked wfGetForwardedFor() as deprecated
* Moved wfGetIP() tests to WebRequestTest
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94932
|
|
|
|
|
|
|
| |
warning if three or more given.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90931
|
|
|
|
|
|
|
| |
log entries. Removed the 'rightsautocomment' msg.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90855
|
|
|
|
|
|
|
|
|
| |
Fix trailing whitespace
Some minor documentation fixes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90843
|
|
|
|
|
|
|
| |
r28805, XOR silently ignored subconds beyond the first two. After r28805, XOR passed iff an odd number of subconds passed. It now passes iff exactly one subcond passes. This should be more intuitive, as I highly doubt anyone using 3+ subconds was doing it correctly before.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90819
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
** Made addAutopromoteOnceGroups() put in a user rights log entry
** Added APCOND_ISBOT cond to autopromote and updated some docs
* FlaggedRevs:
** (bug 24948) Made $wgFlaggedRevsAutopromote a wrapper around $wgAutopromoteOnce and removed maybeMakeEditor()/recordDemote() (uses r90749)
** Split off new efSetFlaggedRevsOldAutopromoteConfig function
** Removed calls to FlaggedRevs class in setup function to avoid overhead
** Made cache keys in checkAutoPromoteCond() properly unique
** Made wasPreviouslyBlocked() protected and tweaked editSpacingCheck() param order
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90816
|
|
|
|
|
|
|
|
|
|
|
|
| |
** Tweaked addAutopromoteOnceGroups() calls for performance
** Some doc tweaks and fixes
* Added NS_SPECIAL short-circuit on $wgTitle for file cache and removed unnecessary "is null" check
* Pushed "$action != 'raw'" check into HTMLFileCache
* Removed useless return value from performRequest()
* Added type hint to performAction()
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90776
|
|
|
|
|
|
|
| |
getAutopromoteOnceGroups()
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90757
|
|
|
|
|
|
|
|
|
| |
* Removed clunky autopromoteOnceHook function and added $wgAutopromoteOnce. It currently supports edit or view based triggering. This makes configuration much simpler.
* Added short-circuit to addAutopromoteOnceGroups() by checking if $criteria is empty
* Spacing tweaks and typo fixes.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90755
|
|
|
|
|
|
|
| |
function. This is still a bit rough on the edges. This uses a hook since extension may want to control when it's called for performance reasons. Patch by lampak. (for bug 24948)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90749
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/89061
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/89047
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75163
|
|
|
|
|
|
|
| |
NB, why are some revisions marked ok by no one? :S
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/74727
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/73809
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/70957
|
|
|
|
|
|
|
| |
formatting.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/67073
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/62481
|
|
|
|
|
|
|
|
|
|
|
| |
various user groups.
* Add $wgRemoveGroups as a means of restricting a group's rights. The syntax is identical to $wgGroupPermissions, but users in these groups will have these rights stripped from them.
* Modify Special:ListGroupRights so that it displays revoked permissions as well (the display of assigned vs. revoked is changeable via css).
* Bump $wgStyleVersion
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/52083
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/45365
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/44592
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/39597
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/35983
|
|
|
|
|
|
|
| |
committed yet (core change for TorBlock extension)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/35846
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
vasilievv was going to revert himself, but guess not :D)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/34868
|
|
|
|
|
|
|
| |
* Introduce $wgLogActionsHandlers
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/34826
|