Changing from !RC_NEW to RC_EDIT to have no rollback links, when this
method is called accidently for RC_LOG or RC_EXTERNAL (or for the old
RC_MOVE/RC_MOVE_OVER_REDIRECT). For that types there are 0 revisions to
rollback.
Change-Id: I1cbdc87a8b8e0cecf6fbfa3b3a64d5015057bccf
The arrow icons for the enhanced watchlist/recent changes could be
useful elsewhere. But to do that, we need to be able to load them
separately; this does that by adding a new module just for the CSS
needed for the arrows.
Also, this fixes a use of OutputPage::addModuleStyles that really should
have been OutputPage::addModules so dependencies are resolved.
Change-Id: I639a5ccbc3b7b2794e7b12ecb64e5ee6b10a640a
In case we got a page creation which is yet unpatrolled and
recent changes patrolling is enabled, the user probably rather
wants to patrol the whole page (first revision) instead of seeing
a patrollink for the current revision.
Follow up to I1e24733c
Bug: 48928
Change-Id: I9f89f1d44852d4c03a67ac622d5cf4d86453dce3
I've changed the logic in Article::showPatrolFooter to be able
to fetch the recent changes id and to only show the patrol link
in case the change hasn't yet been patrolled.
In case recentchanges patrolling is enabled this will try to
create a patrol link for the revision the user is currently
viewing. If only new page patrolling is enabled it tries to
create a patrol link for the first revision of the page.
Furthermore I've removed the passing around of &rcid parameters
within MediaWiki as those had several issues (some even security
related) and were only a workaround to protect the DB from some
queries, which is no longer needed.
This has already been partly implemented in a different manner in
r45778 but had to be reverted in r46542 due to performance issues.
This version shouldn't cause such issues as I'm only adding one or
two indexed database queries per page view.
I've written this new version of the patch with mostly
performance in mind and even tested the database queries it uses
against the replicated databases of enwiki on the toolserver. I'm
pretty sure this can't be implemented any faster without creating
a new index on the recentchanges table.
As I was on it I've implemented RecentChange::isInRCLifespan which
checks whether the given timestamp is new enough to may have a RC
row. That way we can avoid some DB queries for timestamps which are
older than the max RC age.
Fixes bugs:
(bug 15936) New page's patrol button should always be visible
(bug 35810) ! N pages non-patrol-able
(bug 36641) Patrol page link shows on non-existent revs
Change-Id: I1e24733cafbfdc51b7a5a9a1c1baf948e760fe1a
Added spaces after/before parenthesis
Removed unneeded parenthesis around some statements
Broke a long line
Change-Id: I7fbe129f7bbf524dd0598ece2a9708643f08453b
When a page is unvisited (wl_notificationtimestamp IS NOT NULL) all
entries of that page on the watchlist gets bold (class=mw-changeslist-line-watched),
because wl_notificationtimestamp is only checked for null.
wl_notificationtimestamp should be compared against rc_timestamp to
find only the really unvisited pages since the last visit on that page.
It is confusing, when all entries of a page on the watchlist gets bold,
but only some of the newer are unvisited.
Support for old and enhanced watchlist.
Change-Id: I7265141a6c84bcbdd7b651bd2983a08b73c6ddfe
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !
Fixed windows newline style
Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
* 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
* 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
- will update LiquidThreads accordingly and do not see
this hook used in any other extension in Wikimedia git repos.
Change-Id: Ib8f297b39dbd5fba980bb0d4773d0e01f2b922f4
The class mw-enhancedchanges-arrow was also used for non-toggle lines,
which have now the cursor. Now using mw-enhancedchanges-arrow-space for
the space and mw-enhancedchanges-arrow for the cursor.
Also fix bad aligned lines, when javascript is disabled. Here the
problem was, that only the arrows are display:noned, but the placeholder
space of single lines must also be display:noned.
Change-Id: Iba13987ced4c3e327026df2cb96b92a777e2032f
- this enables an extension to do some processing on the RC line,
and if processing fails or for other reason, the extension has the
option to not output the line at all in Special:RecentChanges and
Special:Watchlist.
Change-Id: Ibf3a217afba5b4ad7992919399710fe3da301025
It makes more sense, to have the whole group as minor/bot, when all of
the group are minor or bot edits, not when only one of the group is
minor/bot.
Change-Id: I62bf1099f2e3fb73e9b50374cbb7ba8bfd8a009e
The Revision object needs the Title to determine the default content model.
Providing the Title explicitely wherever possible avoids an extra database
lookup. Most importanlty, this fixes fatal errors that ocurr when the
database lookup fails due to slave lag or transaction state.
Change-Id: I516e82f7a893b274c513b128b8a46db491160b55
In the special pages containing changes list, adding the following
CSS classes to revision rows:
- mw-changeslist-date
- mw-changeslist-title
- mw-changeslist-separator (matching the dots, ". .")
This enhancement has been implemented to the following special pages:
- [[Special:Contributions]]
- [[Special:DeletedContributions]]
- [[Special:RecentChanges]]
- [[Special:Watchlist]]
It's also implemented on pages history.
Change-Id: I2385ef21d9aed4bdbe4971bfcfa28efaf058e7dd
The LogPage::logName method has been deprecated in 1.19,
warnings being planned in 1.21.
This change removes any call in the MediaWiki core to this
deprecated method.
Removing extra whitespaces/tabs in includes/ProtectionForm.php.
Change-Id: I1907f17341ecb6448967a5283e3c913778dcb1a9
When inserting XML elements inline <such as this one>, doxygen chokes
about it not being known. Simply enclosing the tag in double quotes
prevents doxygen from emitting a warning.
Also enclosed a few invalid functions calls such as \. and double quoted
the HTML entities such as &foobar;
Change-Id: I4019637145e683c2bec3d17b2fd98b0c50a932f1
The error is PHP Warning: explode() expects parameter 2 to be string, array given in includes/ChangesList.php on line 1218.
The problem is that $classes is always an array, so no need to explode() it.
Change-Id: I6917273aecc6b9ddbf377e69ecbd343ee25fa8ef
Each line on the watchlist and on the history pages should have a
specific class to indicate the "updated since my last visit" status,
to allow for more comprehensive styling than is possible with individual
elements embedded within the line.
Also some cleanup: turn the $classes variable in the enhanced watchlist
code path into an array, and change the bolding of titles in the
watchlist from <strong> tags to styling via CSS.
Change-Id: I90bc95db061274d4de782578a4e91f954481adfd
Also added ChangesList::formatCharacterDifference() to replace RecentChange::getCharacterDifference()
so that it's easier to pass a context object ChangesList::showCharacterDifference().
Change-Id: I345f46d2812ed6ee222ddd2dd085efbd4a1f6a36
* Use CSS and change the background image, instead of displaying 2 <img> tags and hiding one based on the parent element's class
* touches bug 17616 a bit, although it doesn't address the focus issue yet, but does improve the overal structure of this module
* Also speeds up by:
- Outputting less markup
- Having 1 embedded images in the CSS file instead of (N changes)*<img> tags
* jquery.makeCollapsible: