It's unreasonable to expect newbies to know that "bug 12345" means "Task T14345"
except where it doesn't, so let's just standardise on the real numbers.
Change-Id: I6f59febaf8fc96e80f8cfc11f4356283f461142a
Adds support for tagging log entries for the block, import,
managetags, and move API modules, using a 'tags' parameter.
Bug: T97720
Change-Id: I9d75d2cece317a7704c4bc6d734ad3cafe24544e
Since T106119, moves that overwrite a redirect produce a deletion log
entry. It should be possibleto identify such deletions within other ones.
Note that this patch only applies for actions in the future because there
is no way to easily identify these cases for the software (until now).
Bug: T145991
Change-Id: I3c006bca57351d82031c4fdce0c53f65d630b0d9
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
If the old content model cannot be used on the new page title, the page
move should be disallowed.
Change-Id: I6078a4cde5a76a050dddedf59634d800765cbabf
That construct has poor locking characteristics in terms of
auto-inc columns as well as not allowing such inserts concurrently
for statement-based replication. Also, the INSERT..SELECT did not
have an ORDER BY, which could lead to pr_id drift with statement
based replication.
Change-Id: I47ca89abcbe4598d3b56cf077a47055500a0647f
When moving over a redirect with no revs, there was a weird
hack to delete the old redirect page... without logs, or cleaning
up the orphaned revision. WHOOPS
Switched it to using the standard deletion, which seems to work.
Note this will produce a deletion log entry as well as a move log
entry. This may scare people.
Bug: T106119
Change-Id: I9645f23c5d6132abb304e254b039036ebca4b064
* This puts the complex logic here after the commit step for
all DBs, making the main multi-DB transaction more likely
to be atomic. Previously, the idle callbacks could be hit
bewteen DB commits.
* Enforce transactionality via AtomicSectionUpdate.
* Use $this instead of $that hacks for old PHP versions.
Change-Id: Idf7d54fdac6487f86907099680f5c1c4f5530b4e
This also removes assumptions that when a page
in one Namespace should be watched / removed
that the page in the talk / subject ns for the
page should have the same action applied
This should maintain all backward compatability
for the WatchedItem class
This also includes tests written by:
- WMDE-leszek
- Addshore
Bug: T127956
Change-Id: Iad9abafe4417bb479151a3bfbee6e1c78a3afe3c
This is a pre-requisite to fix a Flow move regression, T127785.
This allows running an atomic entirely within the move with the correct
ordering.
Bug: T127785
Change-Id: Ie772f737f917854e4cfefe52ec3bea4669c9efe0
The EventBus extension needs to forward the created (null) revision ID as
part of the page move event. Looking this value up when the hook fires is
problematic, because without a connection to the master DB the query might
very well return nothing (if it races in before the entry is replicated to
the slave).
This changeset passes the newly created Revision on to the hook so that it
doesn't need to be queried separately.
Bug: T116786
Change-Id: I1b48e2904fc8d99f2cde604f274f79a2b47d7fc2
* All updates for an event are atomic for the main DB.
* This follows-up 9e51328790 by reverting the auto-commit
behavoir which was a side-effect of that change.
* Added TitleMoveCompleting hook with is a pre-commit version
of the same hook. Various extension could benefit from the
atomicity of running in the main transaction.
Change-Id: Ife5990bbedca1de78bcf83f2d6fdeeae8086ffad
* This makes moves of a page and its subpages atomic
as one operation. Note that $wgMaximumMovedPages
already bounds the number of page rows changed.
* The TitleMoveComplete hook will fire for all
titles after the operation rather than after
each title move.
* Remove LocalFile comment about it commiting the
transaction because LocalFile::lock()/unlock()
check trxLevel() and reference count.
Change-Id: Ic7f6964f94f0b0f0bedc27012e5b5b012a4afdb2
Migrate the move protect log as first sub type of the protection log,
because it does not have complex log parameter, which needs some way of
handling/migration.
It also keeps the gerrit change smaller and hopefully makes review
easier.
The other sub types of the protection log will be migrated in a later
patch set.
This allows use of gender on Special:Log. Old message is kept for use
in IRC. A test was added to ensure an unchanged IRC message.
Bug: T47988
Change-Id: I57b3bd8a7dc823acdbb56520d2364f5542283373
If the default content model changes due to a page move, a NULL in
rev_content_model will now reference the new default, which is not how
the revision was serialized, causing an exception to be thrown.
This was caused by a5bc9f49cd, since previously NULL would use the
correct, but techncially inaccurate, page_content_model.
Bug: T105260
Change-Id: I0c29d0e657ad0b656e5da6ba365f337229ad4dfd
The target existence check is not dependent upon the user who is making
the move, so move it into MovePage::isValidMove() instead of
MovePage::checkPermissions() which not all callers will call.
Bug: T97536
Change-Id: I3aad1455ad4c064cbeaf35221a00ca6baba97c33
* Callers that should not use caches won't
* Aliased the old "bypassCache" param to "latest"
bug: T89184
Change-Id: I9f79e5942ced4ae13ba4de0b4c62908cc746e777
If a page is no longer countable (or becomes newly countable) after a move,
we need to update the site statistics (count of content pages).
Bug: 64333
Change-Id: I0349cfe0e32229706e01d654aacf8ccbe5ebabf3
* AbortMove hook is removed in favor of two more specificly focused
hooks: MovePageCheckPermissions and MovePageIsValidMove.
** MovePageIsValidMove is for extensions to specify whether a page
cannot be moved for technical reasons, and should not be
overridden.
** MovePageCheckPermissions is for checking whether the given user
is allowed to make the move.
* Title::moveNoAuth() deprecated
* Title::moveTo() deprecated
* Title::isValidMoveOperation() broken down into
MovePage::isValidMove() and MovePage::checkPermissions().
* Title::getTitleProtection() is now public, and returns
unprefixed fields
Change-Id: Ic5026384b92a0d68d628397ffe1de6e5b6183f02
Probably a copy-paste mistake when converting this function
to use Status instead of error arrays.
Change-Id: I796fc66ee637dd7d914a4182fe56992e59b90aba
- Added newline at end of file
- Removed double spaces/newlines
- Added space after if/function and parentheses/brackets
- Removed space before comma/cast
- Fixed indent of some lines
Change-Id: I29867ffdffdfb7d2b56997e9393497c7dc12f7d3
This moves most of the Title::moveTo() function into a new MovePage
class, and the entirety of the Title::moveToInternal() function.
No actual code was changed except for requiring a User object in
function arguments instead of relying up on $wgUser, and changes
to "$this" as necessary.
Change-Id: I5479fa8f3920a51ddf789d55edae7dd0d9b24382