| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Adds support for tagging log entries for the block, import,
managetags, and move API modules, using a 'tags' parameter.
Bug: T97720
Change-Id: I9d75d2cece317a7704c4bc6d734ad3cafe24544e
|
| |
| |
| |
| |
| |
| |
| | |
(deprecated since 1.25)
Bug: T61113
Change-Id: I7a007dd87ea3bcbb1121738c84b0e654ba17ccbf
|
|/
|
|
|
|
|
| |
Replaced &$this in includes/Title.php to avoid error in PHP 7.1
Bug: T153505
Change-Id: I76eaae609a817af42687d87bcf0d13da7ba01c05
|
|
|
|
|
|
|
|
|
|
|
|
| |
Title::moveSubpages() sometimes returns a single message-specifier array
and sometimes returns an array of such arrays. This is extremely
difficult for a caller to deal with. Since nothing in Gerrit other than
ApiMove calls this, let's just fix it.
Also, it seems that messages were never created for the errors returned
by this method. So let's create them.
Change-Id: I4e55483c4476a1bb96c87266a4661871776fbf9b
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ib72c98358b2f0b3b73b6f105adea47346373d46d
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of these are simply changing annotations to reflect
reality. If a function can return false to indicate failure
the @return should indicate it.
Some are fixing preg_match calls, preg match returns 1, 0 or false,
but the functions all claim to return booleans.
This is far from all the incorrect return types in mediawiki, there
are around 250 detected by phan, but have to start somewhere.
Change-Id: I1bbdfee6190747bde460f8a7084212ccafe169ef
|
|
|
|
|
|
|
|
| |
It looks like there is something missing after the last statement
Also remove some other empty lines at begin of functions, ifs or loops
while at these files
Change-Id: Ib00b5cfd31ca4dcd0c32ce33754d3c80bae70641
|
|
|
|
|
|
|
|
|
|
| |
This is one of the top three DB queries showing up in xenon
reverse flamegraph profiling.
It works via a per-wiki check key that is bumped whenever
someone changes a .js or .css page on that wiki.
Change-Id: I73f419558864ba3403b4601a098f6aaf84a3e7c1
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is possible for page restrictions to be dependent upon the content
model a page. The best example of this is user JavaScript and CSS
subpages. This adds a Title::setContentModel() function which allows
mocking a Title's content model for the purpose of permission checks.
EditPage and Special:ChangeContentModel were updated to ensure the user
can edit the page with the newly proposed content model before making
the change.
Title::$mContentModel was made private to make sure nothing else mucks
around with it. There were no uses outside of Title anyways.
Bug: T145316
Change-Id: I28c46f408cadf65ed1868401cd00dc15e5acd2fe
|
| |
| |
| |
| | |
Change-Id: I201dbaf9c0dee5b47c4edde73ff68b88560e8a0f
|
| |
| |
| |
| |
| |
| |
| | |
Update/add some comments
Bug: T145737
Change-Id: Ib3b2b69906074cbb51917dc57204c989fd6c58b2
|
|\ \
| |/
|/| |
|
| |
| |
| |
| | |
Change-Id: Id9dac9b67cf969cddaaa8d412cb7fd033146f17d
|
| |
| |
| |
| |
| |
| | |
It only depends upon functions that are all in the LinkTarget interface.
Change-Id: I95e598ea6014ced8f1b947c283dd0b542756b8e2
|
|/
|
|
|
|
|
|
| |
Queries from parsing are the top use of selectRow() according
to reverse flame graphs on xenon. This does not bother with
pages in namespaces less likely to be included.
Change-Id: Ica5d6e52c830cd71effff21933b8c64691082c11
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: Icb716219c9335ff8fa447b1733d04b71d9712bf9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Does both Title and user related methods, so it catches things that only
call $wgUser->isAllowed( 'read' ), as well as giving a nicer error message
for things that use $title->userCan().
Otherwise, the user can still do stuff and read pages if they have an
ongoing session.
Issue reported by Multichill
Bug: T129738
Change-Id: Ic929a385fa81c27cbc6ac3a0862f51190d3ae993
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Special:UserLogout should be whitelisted, if Special:UserLogin is whitelisted,
as otherwise the user is able to login, but not able to logout anymore (given,
that the sys-admin hasn't change the $wgWhitelistRead config variable).
Special:ChangePassword redirects to Special:ChangeCredentials. Instead of
adding this special page, it should be done explicitly in the
wiki configuration (LocalSettings.php). For this reason, the whitelist is
removed, too.
Change-Id: I271efb517bf0ec0022e6fe29673570ca08e8fe1a
|
|
|
|
|
|
|
|
| |
This made sense back in php4, but has no useful effect anymore
with our minimum php version being 5.5. This also has the effect
of searching for 'function makeTitle' now actually finding something.
Change-Id: I0ea02a2e7dff285341b0e5b5b7773da78bfaaff3
|
|
|
|
|
|
|
|
|
|
|
| |
* This puts the complex logic here after the commit step for
all DBs, making the main multi-DB transaction more likely
to be atomic.
* Made some cleanups to AtomicSectionUpdate and made it cancel
if the transaction is rolled back as it should.
* Also cleaned up some closures for PHP 5.4.
Change-Id: If2f7bb6b1ba6daf1cfdc934f27c32b0b10431a3d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow callers to get protocol-relative URLs by passing the
PROTO_RELATIVE constant. Since most callers don't pass in $proto, this
shouldn't change very much since the default of non-expanded is
effectively the same, but expanding to a protocol-relative URL when it
is not intended should still be safe.
A few callers that explicitly specified the default in core were also
updated.
Change-Id: I214f17aa6e8e30b647f21f0951fc3a15e87850c7
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: If8ed1bf7e7c6429c405c956413af07a191ec9c40
|
|/
|
|
|
|
|
| |
Since this updates happens post-send or via the job queue, the
page object will be for a non-existing or newer page/redirect.
Change-Id: I20b583948157dccceca6eb1fbd25121822bf1b2f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use
$lang->equals( $wgContLang )
instead of
$lang->getCode() === $wgContLang->getCode()
Change-Id: Id7ed6a21ce5e2ea2887ec98c7bd9d3eba83d733b
|
| |
| |
| |
| |
| |
| |
| |
| | |
This makes the use of the global InterwikiLookup singleton more explicit
in the Title class. It does not remove the strong binding between Title
and InterwikiLookup.
Change-Id: Iaeb7c418af17fe19f170487f5364040da6052699
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
This should help reduce contention in some cases.
If too many rows are expired, subsequent updates will
clear them out.
Bug: T135470
Change-Id: Iada496d0db9b00e77037320d7c65124a8c8f68c0
|
|/
|
|
|
|
|
|
| |
If a new revision has been inserted (e.g. with updateRevisionOn),
the content model may have changed. This happens with e.g. undeletion.
Bug: T122262
Change-Id: Ia0ed86a9c24809256215418673e9ee8e263d1349
|
|
|
|
|
|
|
|
|
| |
If $query doesn't match the regex, there's no point in unstubbing $wgLang if
that's what happens to be the page language. This also avoids it blowing up if
$wgLang isn't usable due to MW_NO_SESSION.
Bug: T135389
Change-Id: I9a6779c4cc887205215a815db3a765c35f060c42
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This doesn't make sense because 'editcascadeprotected'
effectively gives you 'protect' rights.
Furthermore, no actual usecase was provided except for a testwiki.
This reverts commit da3464badaf9c067a4c3d98448ca72a8324e1e19.
Change-Id: I655c1af8f418369c9551db86f24fb6b66c25afdd
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, both permissions are summarised in the protect permission. This is
unadvantageous for wikis that want to split this permission, for example for the
main page: They don't want protection changes by non-sysop users there, but on
transcluded pages some less privileged users are allowed to edit. Currently,
it is impossible to divide these permissions in a clean way (they can add a hack
depnding on action parameter in LocalSettings.php right now). Furthermore, an
additional permission is no pain, because by default it is handled the same as
protect until now.
Note that for sakes of backwards compability I decided to handle editcascadeprotected
as a subset of protect instead of removing all permissions to edit cascadeprotected
pages (and change the cascade protection state of a page) for users who only have got
the protect permission. Furthermore a different model would raise some strange questions
about the behaivour of the protection form for users with protect, but no editcascadeprotected.
Bug: T101309
Change-Id: I0734d6c26e75d7d7c01cf9750ad0315dd2c85bef
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This was removed in:
Ibf86d03b5479c47ee72c0dafea6777ef8178fe68
Change-Id: I70fda1399e8e9f3a39ce5b9ffa8c2a9daec51faa
|
|/ /
| |
| |
| |
| | |
Depends-On: Ibfd0a7f98f50506cd8402f966682f320bf715c8a
Change-Id: I81d48616afd1ab2bde1a5f1d12f4aefb1c866d43
|
|/
|
|
| |
Change-Id: I0c7d706fabee8d1f6fcfbc4c568f375953de8058
|
|
|
|
|
|
|
|
|
|
| |
Title::newFromLinkTarget() will now take the interwiki component from
the LinkTarget object, and Title::getTitleValue() will pass on the
interwiki part if there is one.
Follows-up 9b1f8b4ca331e45.
Change-Id: If1fecc9d71e58c476d6cebe6164cdc95f183048d
|
|
|
|
|
|
| |
And add a GPL file header while we're at it.
Change-Id: I15a6f240124c879b21fb655ade1baaebf4f34ffd
|
|
|
|
|
|
|
|
|
|
|
|
| |
The createFragmentTarget function allows for switching the fragment on a
target in an easier way. TitleValue already had a now-renamed
createFragmentTitle function (no uses outside of tests), and an
implementation was added for Title.
This will also help with reducing the amount of public usage of
Title::setFragment(), which is deprecated.
Change-Id: I1e8ba2f85e748b1b4394fb2f2a1ccce69cf6e3c5
|
|
|
|
|
|
|
|
| |
Every single caller of Title::newFromLinkTarget() already special cases
when the LinkTarget object is already a Title, so move that logic into
one function.
Change-Id: Iba5432ae01c87850e5b34893092427c5b1629188
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follows-up 448c7ea03a, 372ded2f, 156bcbec, Ic85d27d.
* Removes the logger added in 448c7ea03a.
* Turn the warning into an exception. This was difficult previously
because non-string values were common. However most of them were
all null. Cases of other primitives (type object already throws)
have been fixed.
Bug: T76305
Change-Id: I62fe3f700d94168ca35c833410171b1c48e6c4f3
|
|
|
|
|
| |
Bug: T122754
Change-Id: I8b957eff7f355493ef6850f7a83dcb619ab6be78
|