These are needed for OAuth grants.
Note that, even if 'editmywatchlist' is not granted, various actions
will still allow for adding but not removing of pages.
Change-Id: Ie33446a228dd6ed0114730935c1bf65667f5ce01
Bug 37209: An exception was thrown where the data cached in the Title
object was inconsistent with the data in LinkCache. It shouldn't be
surprising that this happens, since there is no guarantee that the data
was derived from the same transaction or even the same DB server.
But I don't think it is a problem worth troubling the user over, since
with $flags=0, the slave DB server will be used, and no special guarantee
of consistency should be expected by callers. If callers do need
consistency, then they should make their own arrangements to get it,
such as clearing the LinkCache.
Since we have to pick a winner, and the choice is mostly arbitrary since
it's not possible to tell which is fresher, I think LinkCache is a better
choice since the lifetime of its cache entries can be controlled.
Change-Id: I0add48463341e56fe8c155b1007487278ad2705d
Currently Title permissions hooks get called after
Title::checkQuickPermissions, preventing users from
overriding quick permission checks. Added a hook to
allow this. Needed for bug 45898.
Change-Id: Id672270741282778815b06eff8b234ca4d819744
This allows extensions to purge derivative resources that need
updating when a wiki page is changed.
Change-Id: Ic28ce7f57f29376b041627288979981fcb218a44
Removed actions that should not be in Title::invalidateCache,
specifically the clearing of the InfoAction cache, and added
those actions to their appropriate locations.
Added a new method InfoAction::invalidateCache that clears the
cache for a given title.
Bug: 46816
Change-Id: Ic12c66446c0d71f567dceb5d4630382ff41ad8bf
Removed actions that should not be in Title::invalidateCache,
specifically the clearing of the InfoAction cache, and added
those actions to their appropriate locations.
Added a new method InfoAction::invalidateCache that clears the
cache for a given title.
Bug: 46816
Change-Id: I38ac616d2e99fb339aca33425745368ba85b6350
This should allow the usernames of administrators such as "7"
to show correctly on permissions error pages.
I extracted the working code from UserBlockedError::__construct
into a separate method Block::getPermissionsError, called from
both places with context provided as an argument.
Additional changes to get the test suite to pass are included.
Bug: 46768
Change-Id: I49d973992a99e03b4e8de112b47b737037a85338
Breaks unit testing (see bug 47031). The commit managed to land in
the branch because of a bug in Jenkins (bug 46723).
This reverts commit 8cc0b601aa
Change-Id: I4b3fadccaae9c35964a0c47d63b22c4f35148a24
This should allow the usernames of administrators such as "7"
to show correctly on permissions error pages.
I extracted the working code from UserBlockedError::__construct
into a separate method Block::getPermissionsError, called from
both places with context provided as an argument.
Bug: 46768
Change-Id: Ic3fa926a5a4c109faff35fffbccb60fb06ea4a18
* Removed spaces around array index
* Removed double spaces or added spaces to begin or end of function
calls, method signature, conditions or foreachs
* Added braces to one-line ifs
* Changed multi line conditions to one line conditions
* Realigned some arrays
Change-Id: Ia04d2a99d663b07101013c2d53b3b2e872fd9cc3
* Follows up 61c0064de5,
which was missing a load call to fully fix the bug.
Calling loadFromRow() forced the page to load as
non-existing (which it should be).
* The redirect title was triggering a load from a slave in
updateRevisionOn() and wrongly updating the destination page
to point to the redirect revision and leaving the redirect
page with page_latest=0;
Bug : 46397
Change-Id: Id6abe062a0266a790716df8c592911fd89b83223
* This avoids use of a slave for loading the page ID to do
the updates using $newpage. That bug prevented page moves
by using the old 0 ID and throwing an exception.
Bug: 46397
Change-Id: Iea3259dce6840e3f2959d98a20177acd60433b64
* 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
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments
Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
Title.php had some indentation oddities with mixed tabs and spaces. This
patch tweak the whitespaces and sometime explode boolean logics to have
a more consistent style.
Change-Id: I891c112236a021d9b4e38eb57eeb3b232172139c
- Also add LinkCache::addLinkObj() calls to isRedirect(), getLength() and getContentModel()
- Changed error messages when LinkCache returns null, since this really should not happen anymore
- Removed incorrect comments
- Only use the value of the member variable if GAID_FOR_UPDATE is not passed
(for consistency between the three methods)
- Mark tests that need database access as such due to the call to Title::getContentModel()
(generally called through Parser::getFunctionLang())
Change-Id: I84e0c47cdf7412f2b7fa5f296d066b64b7bbfd42
Calling SpecialPageFactory::resolveAlias with an invalid special page
name, gives an array( null, null ) back, but this part of code checks
explicit against !false, which gives always true. Changed the condition
to use an (implicit) check, like the other places, where
SpecialPageFactory::resolveAlias is called.
Change-Id: I8def9dd88ebfbe9fcf1ba8f9cae9e25039ec77ed
* Do not allow working on Special:EditWatchlist
* Do not reset all notification markers
* Do not delete expired restrictions
Change-Id: I7a990c0a80b9c7a6340465dd082a110dafea8f14
This patch make it possible to whitelist pages which anonymous users may
see. It is similar to $wgWhitelistRead expect it uses regular
expressions, the list of regex are to be added in the new global array
$wgWhitelistReadRegexp.
This would be useful in a semi-public team wiki situation where the
admin would want to hide an entire namespace from everyone except those
in a particular group due to sensitive team specific information.
Added new unit test testUserCan in includes/TitleTest.php to
test this new functionality.
* adds $wgWhitelistReadRegexp to DefaultSettings.php
* updates RELEASE-NOTES-1.21 new features
* updates CREDITS
Signed-off-by: Antoine Musso <hashar@free.fr>
Change-Id: I83f6a614874c3d289ff4bd8d015f1d9c92e500b6