This was probably overlooked in the past because usually the only users
who can delete pages also have permission to edit the relevant
protection levels.
Change-Id: Ibe28a69c9fbab00b81c53b1643df722a3f1fbf19
While there are valid use cases of Title::getLocalURL, it is safer
to use Title::getLinkURL in most instances. Additionally developers
won't accidentally their fragments that way.
Change-Id: I1bf567ba9c38103d39a883e8ea3a60f9f2082181
This solution is somewhat imperfect, as the logic being added here to
MediaWikiTitleCodec really belongs in the parser. However, given the
current state of this code, this is the cleanest possible solution at
the moment.
Modified the existing release note for this.
Bug: 68802
Change-Id: I38309186bdcad23f49e23beb26daaf3ef5bceea1
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling
Change-Id: I783e4dbfe5f6f98b32b9a03ccf6439e13e132bcc
* Also tweaked the query so MySQL avoids doing a page_name
index scan when it should start with the link table index
* Added population script (triggered by update.php)
* Also removed uniqueness from some indexes where it is redundant
* Renamed two confusing variables
Bug: 60618
Change-Id: Icca99b6ae0ef76cb77695faf82c615516191da36
- use tab as indent instead of spaces
- Added space after closures "function"
- Added spaces around string_concat
- Added newline inside empty blocks
- Removed four spaces after comma
Change-Id: I4425b0c6a69b36f40acfea6511b8950cf09ce2b2
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif
Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
Calls to getTitleParser() and getTitleFormatter() were using $this->
but the functions were declared static.
Change-Id: If21be84c68725b2afe181229cb697b948d26d6c6
Special page PageLanguage to set the page language of a page.
To enable the feature, set $wgPageLanguageUseDB to true
and assign the 'pagelang' user right to a user group.
Bug: 35489
Change-Id: I0f82b146fbe948f917c1c5d29f7469644d797e80
The documentation for Title::getCascadeProtectionSources was rendered
nonsensical in r79682, and somehow several following "documentation
cleanup" revisions failed to notice this while cleaning up this same
documentation string.
Fixing that led to fixing Title::getRestrictions and
Title::getAllRestrictions as well.
Change-Id: I48638e370c01fe5ef8ad7d3ebf7fb9aa4385bad7
* Lots of deadlocks seems to happen on page deletion,
where the ID is likely 0 (this also has the worst locks)
bug: 37519
Change-Id: I028783a998946615b93e1425c6f69e00afd7b1bb
When testing whether category-redirect-move-override is disabled, do it in
the content language rather than the user language.
Change-Id: Id1f03240c203f32a12953f49a075cfd5c25f0f31
Fix a comment incorrectly referring to user pages instead of category
pages. Follow-up to Ic93616a54c8e98e3dc71daee3c92c466d64daffc
Change-Id: I74533658c32647f77e3d8d54a05e9835e1c37952
Allow category pages to be moved. This is to preserve attribution of the
page only and does not cause pages in the category to recategorize to the
new one. A warning explains this when such a move is attempted. The new
right move-categorypages is required to do this, which is assigned to user
and sysop by default (the same as other move-related rights). The message
category-move-redirect-override can be used to cause custom text to be
placed on the "old" category page in lieu of a redirect.
Bug: 28569
Bug: 5451
Change-Id: Ic93616a54c8e98e3dc71daee3c92c466d64daffc
This avoids the use of $wgUser in Revision constructor and makes the
dependency on the global visible.
Change-Id: Ief79c9769d28a1adb16abab8da1ec01984d9ef92
This avoids the use of $wgUser in Revision constructor and makes the
dependency on the global visible.
Change-Id: Ib67bd706a3c4ef081f475406e9aa1094c42222ef
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.
Change-Id: I3622f216a2ca8ac1b5e51892be9f98665f65bc36
Nothing used them other than SearchUpdate, nor should they.
Move implementation there and make it private.
Change-Id: Iafc6f6d59487bd8c53cb99b2147815b2d70ead83
Variants included 'in <version>', 'as of <version>' and just the
version number.
Some @deprecated annotations do not have the version number at all,
I want to hunt them down separately.
Change-Id: I8208c6097098f4735d4f51bc42254675f1f27f6d
TitleValue is intended to be a light weight alternative to the Title
class. Any operations on TitleValue are implemented in separate
service classes, like TitleFormatter and PageLinkRenderer. See
<https://www.mediawiki.org/wiki/Requests_for_comment/TitleValue>
for more information.
This change updates SpecialCategories and SpecialLinkSearch to use
TitleValue instead of Title, to demonstrate how TitleValue would be
used, and how the necessary services can be injected and applied.
The intention is to improve testability and reusability; these
advantages will however only become apparent with further refactoring
of the respective special pages. This will be done in follow-up
changes.
More work will be needed to migrate essential functionality from
Title and Linker classes into the respective service classes,
MediaWikiTitleCodec and MediaWikiPageLinkRenderer.
Change-Id: I8eef5a165de4ffcacfbc4911fdacdb15d502fff4
This is akin to $wgSkipSkin/$wgSkipSkins. It is quite plausible for a wiki
to have more than one self prefix (e.g. enwiki has w: en: wikipedia: and
maybe others).
Some recent changes code seems to use $wgLocalInterwiki for quite unclear
purposes:
- I removed the line using $wgLocalInterwiki from the RecentChange
class, as the 'lang' field of $mExtra is not used anywhere in core code.
Extensions may use it, but it would seem more appropriate for them to
use something like $wgDBname (or indeed to consult $wgLocalInterwikis
directly) if they need to identify a particular wiki.
- In the IRC formatter, the first prefix in the array is used (if set).
Appropriate documentation is added to DefaultSettings.php.
Related to bug 954 comment 3.
Bug: 954
Bug: 955
Change-Id: I9dbb566385b464402c5e78510b95dd2ffb4d9489
As with the ArticleDeletionComplete hook, include the reason for
moving the title (article) when firing the TitleMoveComplete hook.
See I98703f99a47d5786b7a567df954ba09f6d8862ff for a supporting use
case.
Change-Id: I875446dddacff7e5a52a0b6e577e6a46a9ae2e6f
Adding the pr_id to log_search table and use a join to get the user,
timestamp and comment from the logging table. For logs without the pr_id
a placeholder text is shown.
The code for page protection is changed from a replace to delete/insert
to have for each pr_id a log_id and not reusing pr_ids which was used
for the first protection on a protection change.
The log_deleted field is checked to avoid showing revision deleted data
from the logging table.
This is a alternative patch for
Ie40057398a7829c698df3d68813006798a72dccb
and Iade82653999ca770586762b3c1383f73dfe3a5ee to avoid a schema change
on table page_restriction.
Idea by Aaron Schulz.
Change-Id: Ia0dc5895ec672896fe4b75c2e0f76da2474bd6e4
Apparently certain API action=move requests made it here to trigger the
fatal.
Follow-up to r47039.
Change-Id: I5807ad6278b760d08f84e2fe171c7b0aad80d2f7
Move init of mArticleId to bottom, where other fields are filled and
change ternary operator to a simple if for better readability.
Break a double assignment in two statements.
Change-Id: Ib61435e62e883142dd0c5dcb40e0e50e7ca18439