| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Separated base classes for special pages (most of them abstract) and
several actual special pages, which were previously both in the same
file.
Added license headings, @ingroup SpecialPage and updated class doc
comments; no other changes.
Most classes are now in separate files (the list of changes can be
seen by diffing AutoLoader.php), with three exceptions:
* SpecialListAdmins and SpecialListBots (redirects to
Special:ListUsers with a parameter) joined their friend in
includes/specials/SpecialListusers.php.
* SpecialMycontributions, SpecialMypage, SpecialMytalk,
SpecialMyuploads and SpecialAllMyUploads were moved into a new file
includes/specials/SpecialMyRedirectPages.php – each of them is
literally ten lines of code and any changes are likely to touch them
all, separate files seem impractical.
* RedirectSpecialArticle and SpecialRedirectToSpecial are in one file
with their parent class RedirectSpecialPage (on a side note, I filed
bug 58215 to rename them to something less silly).
Change-Id: Ida87238401b182924dbe169a6278588bc2fbecfd
|
|
|
|
|
|
|
| |
This reverts commit 8c7541da3b12d4727743ed1d3447f6ac6c3b6846.
Bug: 57883
Change-Id: I582088528286ff34da164fa4457dd203f11df7ef
|
|
|
|
|
|
|
| |
Also fix docs for OutputPage::setRobotPolicy()
Bug: 57764
Change-Id: I8b780ca349a2f5d18e857ed707f682d19be0054c
|
|
|
|
|
|
|
|
| |
- Removed trailing spaces in comments
- Removed multiple empty lines
- Removed space after object operator
Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added new helper function SpecialPage#requireLogin() to check if the
current user is logged in and, if not, format an error message linking
to Special:Userlogin and throw UserNotLoggedIn exception, to be
handled by OutputPage later.
Reused old error messages. Not all use the new parameter and they're
very inconsistent, but this is a matter for another patch.
Used it on 7 special pages. I don't think there are any other ones
which specifically require having an account, instead of just some
rights usually associated with logged-in users.
* SpecialChangeEmail
* SpecialChangePassword: It allows anonymous users under specific
circumstances, but is logged-in-only in general.
* SpecialConfirmemail
* SpecialEditWatchlist
* SpecialPreferences
* SpecialResetTokens: It was missing the check, added it.
* SpecialWatchlist
Change-Id: I43ceaddb370d09784021b3fc2d5d1ff6616fef1f
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: I8063140d1e5ada1487ec1509a244dd410896bbab
|
| |
| |
| |
| | |
Change-Id: I9c1f5f12f51274c443084da55447d12b828a9fb0
|
|/
|
|
|
|
|
|
|
|
|
|
| |
The way the existing code was, it seems the exception condition
was never hit, as one could enter a bogus special page title in
SpecialPage::getTitleFor and it returns a Title object anyway.
Some tests are also added for SpecialPage::getTitleFor(),
although more refactoring my be required to truly unit test this,
vs. indirectly testing other stuff via static methods.
Change-Id: I6e427d047a2f8e58677eb65b50866f767078c255
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: 55765
Change-Id: I1d05a1b91b2ac4097e09d11510d53fdfce1e0565
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new 'vform' display format to HTMLForm which styles forms
using it in the new compact stacked vertical format:
* Applies class mw-ui-vform to the form.
* Gives Submit button 'mw-ui-{button,big,block,primary}' classes and
spaced block styling.
* Styles the error class.
* HTMLForm divs are too nested to get styling "for free", so add
.mw-ui-vform-div selector to Agora CSS and apply this class to form
divs (maybe not ideal fix).
* HTMLCheckField nests the checkbox inside label.
* Add method to setShowEmptyLabel(); vform format sets this false as it
doesn't want generated HTML for empty labels adding vertical space.
In FormSpecialPage, don't set the wrapper legend with its old-school
line around the form if in vform style.
Build new mediawiki.ui CSS with the .mw-ui-vform-div styling
Special:PasswordReset requests the new styling with setDisplayFormat( 'vform' )
and turns off the wrapper legend.
(This version of the patch doesn't switch the default format of HTMLForm,
individual forms have to choose it.)
Notes are at
https://www.mediawiki.org/wiki/Agora/Engineering#HTMLForm_Issues
Change-Id: Id03d185bbee990595bfc469a61163cc598fc3441
|
|
|
|
|
| |
Bug: 53447
Change-Id: I4423e5beeb7b72814f4ee839880ec4b835d14640
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This solves the problem of new users on commons wanting a list of
their files, but something like cropbot modifying it and taking
it off Special:MyUploads.
I'm worried this is a bit hacky to make TablePager work with
two queries. If anyone has any suggestions on how to do this
in a less hacky way, please say.
Some notes:
* This totally removes any revdeleted entries instead
of dealing with them. Some future iteration can do selective
deletion.
* Should maybe add links to old versions of files description
page somewhere. Not sure where in ui that would fit (The date maybe)
(by old file description page I mean something like flagged revs
filetimestamp parameter)
* The latest version column should perhaps have "latest" and "old"
instead of "yes" or "no"
* This is slightly different from the suggestion on the bug report
as it shows all revisions (instead of say just first revisions).
I think showing all revisions makes more sense for the "where
are my uploads" use case. Second of all, the checkbox is not on
by default.
Bug: 30607
Change-Id: I9e58db1f212e3bb361316c05ef32d4b9c31c6490
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OAuth was going to return different values for UserIsEveryoneAllowed
depending on whether OAuth headers were provided, so the bolding on
Special:SpecialPages wouldn't be odd. That wasn't liked, so instead
we'll only mark special pages as restricted based on $wgGroupPermissions
and not what extensions might do.
Also, it was suggested that if an extension can remove 'read' then the
cache headers set by RawAction and the API should reflect that.
Change-Id: I381553e79c5320083c6d6d9ddd5bc0b146600f9e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
User::groupHasPermission is used for various purposes, from checking
whether it makes sense to show a "hide logged-in users" on
Special:NewPages to showing different error messages in some places when
'user' or 'autoconfirmed' is allowed the action to avoiding unstubbing
$wgUser to check $wgUser->isAllowed( 'read' ) in the common case where
'read' permission is granted to everyone.
For the OAuth work, we need to be able to catch that last type of use
without interfering with the others. This change introduces
User::isEveryoneAllowed() to be used for that type of check, which both
makes sure the right granted to '*' isn't revoked from any group and
calls a hook to allow extensions to indicate that they might remove the
right.
Change-Id: Idfee1b4d0613aaf52e143164acd6022459415c49
|
|
|
|
|
|
|
|
| |
Fixes for issues CodeSniffer complained about at
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs-HEAD/9920/console
for 4f98011fdd98328028d152baf27627fea0c28d3e.
Change-Id: I2cc0cee6ff8260e74ad8b1721614ae16a360e68d
|
|
|
|
|
|
|
| |
Follow-up to dd85e115075661e9e0bb92c7f6d4ab9604efd980 where this issue was
introduced.
Change-Id: I46bd11ca7158d1dec4d8a3533d2607dde9928cc2
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added a default implementation of doing nothing
to FormSpecialPage::onSuccess to avoid forms that
don't do anything.
Added a default implementation of FormSpecialPage::setParameter
to store the parameter in a protected variable in
case the child class wants to use it.
Made FormSpecialPage::getForm first check whether the
header message text exists before adding it as header
text, for those forms that don't have header text.
Change-Id: Ifb49c3b2f4079a5fbe379c44b63ee2dcee9eeb48
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most have it already:
https://doc.wikimedia.org/mediawiki-core/master/php/html/deprecated.html
Ran a find/replace on "@deprecated \d" to fix the odd ones.
Change-Id: I5217aaf75264a0036b5426cd8536116b4bb8f535
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Squiz.WhiteSpace.LanguageConstructSpacing:
Language constructs must be followed by a single space;
expected "require_once expression" but found
"require_once(expression)"
It is a keyword (e.g. like `new`, `return` and `print`). As
such the parentheses don't make sense.
Per our code conventions, we use a space after keywords like
these. We appeared to have an unwritten exception for `require`
that doesn't make sense. About 60% of require/include usage
was missing the space and/or had superfluous parentheses.
It is as silly as print("foo") or return("foo"), it works
because keywords have no significance for whitespace between
it and the expression that follows, and since experessions can
be wrapped in parentheses for clarity (e.g. when doing string
concatenation or mathematical operations) the parenthesis
before and after basiclaly just ignored.
Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
|
|
|
|
|
|
|
|
| |
A combined doc does not work
Add some spaces to function bodys
Change-Id: I98db22fe5028c97ad257ddd86524c0356881ff57
|
|
|
|
|
|
|
|
| |
Also pass a array to wfAppendQuery, which than does the urlencoding.
Prefer a wfScript() over the global or string
Change-Id: Icada534cb4c99c9441938a2e8dcbc11a142360c6
|
|
|
|
|
|
|
| |
There is no need to call $this->msg() directly for the fieldset legend
as there is already a method in HTMLForm to do it.
Change-Id: I771520ea230301b51cece685f47e6a606ad860be
|
|
|
|
|
|
|
| |
These are options usable with action=edit and allows better options
for the inital edit view from urls or the InputBox extension.
Change-Id: I696c47ddf9f29764bc8cc6136c618c56dbc2d726
|
|
|
|
|
|
| |
So that it returns the subclass name and not always "RedirectSpecialPage".
Change-Id: Ibee18bc75e423e8874f9254da7cec59839ba15af
|
|
|
|
| |
Change-Id: I37ce7fe392f4941c500fa0a88007664501d7e338
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
Change-Id: I03be0cf1e82fc9f8f00727bed5aca9d9d2758c2e
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having all group mapping for Special:SpecialPages in the global
$wgSpecialPageGroups is not a good OO style.
Created a method SpecialPage::getGroupName, which than can be overridden
by each subclasses to the featured group name.
Added also SpecialPage::getFinalGroupName to get the groupname on
Special:SpecialPages to handle the customization and
to keep $wgSpecialPageGroups for b/c
Change-Id: I1de3a186f0a59ec5ecb8996c5f805cf164e9637f
|
|
|
|
|
|
| |
Spotted in ipbreason-dropdown by Shirayuki.
Change-Id: I576ed4bc0abe5ab980aaee3fb9f9e4b43087311f
|
|
|
|
| |
Change-Id: I8f976013f33c5818e4402604fe8610aa3f43b0c6
|
|
|
|
|
|
|
| |
Done with this command:
grep wfArrayToCGI * -R -l -Z | xargs -0 -l sed -i -e 's/wfArrayToCGI/wfArrayToCgi/g' && git checkout -- HISTORY
Change-Id: If7f4d4bfc199289c11c43cf519c2415a1aad1c51
|
|
|
|
|
|
| |
From phpcs
Change-Id: I87592615014f39eff2a299cf578e8889afd902f7
|
|
|
|
|
|
| |
From phpcs
Change-Id: I169c80a911ba75d64ab8a503088903ce3b8a7cca
|
|
|
|
| |
Change-Id: Iff14a626853c98190a1aba8263b8a7ec79e9b9b5
|
|
|
|
| |
Change-Id: I2007ad5166117b90af5560fd9bb1d0ee26e45cef
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no need to repeat the condition from QueryPage::isCached and
check the misermode self.
Moved the method QueryPage::isCached to SpecialPage::isCached for easy
calling. Maybe in future some special pages would get cached and define
its own condition for that, so making false as default.
Simplify a count and add some spaces.
Change-Id: I71c9991e136f9c1a6a0123ae5305b39777d9135c
|
|/
|
|
| |
Change-Id: Iccddc819712b4f3c00e826a21fa131ed1298bb35
|
|
|
|
|
|
|
|
| |
Fix SpecialPage::isRestricted(), broken by I41edb091 (22dd67e) which
inverted the group permission check. Seems to only affect
Special:SpecialPages. Bug 41294.
Change-Id: I8685eaeb4a688cc8e205afdb1639c08e4a2bd3da
|
|
|
|
|
|
|
| |
* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.
Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190
|
|
|
|
|
|
|
| |
Created a new method User::groupHasPermission and check also
$wgRevokePermissions for the given right
Change-Id: I41edb091fa35c8c68b6f95cc5fd208ea99418cdb
|
|
|
|
| |
Change-Id: I6e68f02d1abac935bb6e1baed2d83d2f0ca76d36
|
|
|
|
|
|
| |
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)
Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
|
|\
| |
| |
| | |
reference."
|
| |
| |
| |
| | |
Change-Id: I9f00738add79c1cb552d6097dc6259101d0476cc
|