== Prelude ==
wl_notificationtimestamp controls sending the user e-mail
notifications about changes to pages, as well as showing the "updated
since last visit" markers on history pages, recent changes and
watchlist.
== The bug ==
Previously, on every view of a page, the notification timestamp was
cleared, regardless of whether the user as actually viewing the latest
revision. When viewing a diff, however, the timestamp was cleared only
if one of the revisions being compared was the latest one of its page.
The same behavior applied to talk page message indicators (which are
actually stored sepately to cater to anonymous users).
This was inconsistent and surprising when one was attempting to, say,
go through the 50 new posts to a discussion page in a peacemeal
fashion.
== The fix ==
If the revision being viewed is the latest (or can't be determined),
the timestamp is cleared as previously, as this is necessary to
reenable e-mail notifications for given user and page.
If the revision isn't the latest, the timestamp is updated to
revision's timestamp plus one second. This uses up to two simple
(selectField) indexed queries per page view, only fired when we
do not already know we're looking at the latest version.
Talk page indicator is updated to point at the next revision after the
one being viewed, or cleared if viewing the latest revision. The
UserClearNewTalkNotification hook gained $oldid as the second argument
(a backwards-compatible change). In Skin, we no longer ignore the
indicator being present if we're viewing the talk page, as it might
still be valid.
== The bonus ==
Comments and formatting was updated in a few places, including
tables.sql and Wiki.php.
The following functions gained a second, optional $oldid parameter
(holy indirection, Batman!):
* WikiPage#doViewUpdates()
* User#clearNotification()
* WatchedItem#resetNotificationTimestamp()
DifferenceEngine gained a public method mapDiffPrevNext() used
to parse the ids from URL parameters like oldid=12345&diff=prev,
factored out of loadRevisionIds(). A bug where the NewDifferenceEngine
hook would not be called in some cases, dating back to its
introduction in r45518, was fixed in the process.
Bug: 41759
Change-Id: I4144ba1987b8d7a7e8b24f4f067eedac2ae44459
Progressively enhance multi-page image navigation so that the paginated
part is changed without requiring a full page load. Currently, the url
is not updated to reflect the current page after navigation occurs, but
if desired, this functionality could be added using history.pushState.
Bug: 40207
Change-Id: Icd1cde7c62c4d462f5b697b9f49f5c08f6e7482b
See bug for context.
The implementation is slightly untidy because I've written it so
as to avoid invalidating the existing SVG thumbs -- there will be
no immediate difference (visual/performance/other) as a result of
this.
Tested by me in both...
* [[File:Example.svg|thumb|lang=fr]] AND
* http://example.org/w/index.php?title=File:Example.svg&lang=fr
...modes. Example file on
https://commons.wikimedia.org/wiki/File:Gerrit_patchset_25838_test.svg
Added parser tests.
Bug: 32987
Change-Id: I4cadf96ecd5e169a88ad468a0478d355db980103
* 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
This can happen, when customized $wgImageLimits, but not
the option in $wgDefaultOptions
Notice: Undefined offset: 2 in \includes\ImagePage.php on line 364
Change-Id: I1dbcde8782f239279602f509e5987606af8db241
Added/removed spaces after opening/before closing parentheses
Added a space after a comma
Removed unneeded parentheses in condition
Change-Id: I306091347ccaaf11dee0cdfda3019cb0c12be51b
This happens when a redirect without usages exists
While I am in this section: Use modern Html() function
Change-Id: I1af206ab3a83fb0d09773314bb30db01f557ba07
(bug 43466) If enabled, send a rel=canonical link on every page
indicating the correct server to use. I tested all three callers:
Article, ImagePage and the variant feature in getHeadLinksArray().
Change-Id: I59b7c1d5589825ea390967036190218d5ce2db88
- Removed useless $showLink variable and related check since the variable is always defined to true
- Moved $linktext up so that there's no need to use a temporary variable to modify it
- Moved $longDesc down where it's used
- Change "else { if ( ... ) { } }" to elseif for better clarity
Change-Id: I65dcbb76c7f0a0441a6420e76affe797a3dc9c45
ContextSource::getContext (ImageHistoryPseudoPager): called and $context
is null. Using RequestContext::getMain() for sanity
Change-Id: I0430791a705f42ca3e5d02692070f0fb0dadc897
The combination of $out->addHTML() and the super call cause action=render for
File pages to have the text rendered twice. Wikis get commons descriptions via
action=render, so they were showing the description text twice.
This reverts commit ca13fde652.
Conflicts:
RELEASE-NOTES-1.20
Change-Id: Ib1072fd1d109c0d6706215ccad1413dd72cb201d
This changes action=render on file pages to include the shared image
description (if it exists). The reasons for this are two fold:
*Logically, most users would consider the shared description part of
the content of the page, and not part of the site chrome, so it
should be on action=render
*Foreign file repos use action=render to get image descriptions.
if you use say en.wikipedia.org as your file repo, commons images
get cascasively included, but all their descriptions end up
being the noarticletext message, which is bad. This makes
the shared image descriptions work.
Some notes on the implementation:
* on action=render the div containing the shared description
doesn't have the id that the one on normal page view has.
This is to prevent duplicate ids in the cascading repo scenario.
I added a class so people can identify them if they want, and this
allows people to easily identify the "outermost" shared description
as it would be the only one with the id.
* This doesn't include the "shareddescriptionfollows" message
(which is disabled by default) that would normally separate the
local from the non-local description. I wasn't sure, but thought
that would be considered part of the site chrome.
Patchset 2/3: trailing space/spelling mistake
Patchset 4: rebase
Change-Id: I18bdf29de62526d699740607b5015da4b01fd43d
Instead, show some text explaining that they cannot upload here.
Also remove a linebreak which someone complained about recently.
Change-Id: I92ab8ad5eebcdd38c0d5d9f7bab7d11e5c844586
This shows a warning on the image description page if the image
is animated, but thumbnails won't be. This includes
gif images that are too big, but also svg images that are animated,
and APNG files.
The message used is file-no-thumb-animation, but will also
check for file-no-thumb-animation-<image extension> so that
admins can do per image type explanations. Gif files have a built-in
explanation that is slightly different (Since its do to resolution).
Ideally one would pass the resolution limit to the gif message,
but I couldn't think of a clean way of doing that. (Also might be
complex to explain to user. They aren't used to resolution as a single
number but as a width x height type thing).
Moves isAnimatedImage from ImageHandler to MediaHandler, so I could
safely use it from any handler class.
Change-Id: I42ee11d889e0c41de53d0951f55a4338ca55311d