| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Allows extensions to modify the list at SpecialLog::$typeOnUser
This is useful for extensions like Thanks where the target is a
userpage.
Change-Id: I77e1e59d7e3666802d0eeb0c48a0ec211dba0a2a
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This reverts commit 1f423cc6091867371dc31009187d5cdb04142ff7.
Change-Id: I2254eb37376063a081ad89481654b735fb0360b1
|
|\ \
| | |
| | |
| | | |
localisation checks blacklist"
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
checks blacklist
The point is to allow to use the blacklist of translatewiki.net,
so the format of $checkBlacklist got changed to be compatible with it.
Change-Id: I5eb328c4bdbb0b21962b89acbe12f46ebb4d9d70
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change adds a hook that serves exactly the same purpose as
AbortNewAccount. Also change was merged prematurely and is
missing message documentation as well as having some minor
code flow issues.
This reverts commit cc1006b77c6dfdc53266e0bfc73fc9daf304f8e7.
Change-Id: I8656aa1a99c84778fd85ec7da9d6ce23bd6cf9b9
|
|/
|
|
|
|
| |
This is a step on the way to fixing bug 56847.
Change-Id: Id330a8ac041ddea086f192a90ddc962077453333
|
|
|
|
|
|
|
| |
* Remove mPrefixes from variables
* Turn a define into class const
Change-Id: I80874627df9dffae596f8f7cb3ca28f19ba1f167
|
|
|
|
|
|
|
|
|
| |
It's likely that an extension might want to reformat the value (e.g. by
passing it through Language::formatSize()), but otherwise use the
default behavior for the key. Make $value a reference parameter so they
don't have to reimplement all the logic for laying out the row.
Change-Id: I7799616a602d90e1b8d3f0ece35811ca387bade7
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
I believe that MediaWiki's memcached client does support PECL now.
Also fixing a typo.
Change-Id: Ibcf9c25d077b19de733cc79b5664437479f23a3b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This has been deprecated since 1.18, throwing warnings for over a
year and a half now, and nothing uses it anywhere in core or deployed
extensions.
No extensions in SVN seem to have this anymore (we must've cleaned
up well), and the only affected extensions in Git are:
- BlueSpiceExtensions
- DynamicPageList (commented, so shouldn't be a worry)
- SemanticPageMaker
- TwitterCards
If you're the author of one of these extensions or are feeling like
cleaning up ancient code, please get them fixed.
Change-Id: I8f3a54c14be4b38a8b917e32ba3a832e0a7ca116
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds options to return metadata in all available languages, or in
a single selected language.
Change-Id: I78f096318904a08abd317a5ed3f74ee33d3289cb
|
|\| |
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Part of the point of this, is to add a hook to allow extensions to add
their own metadata (I intend to create a companion extension to parse
Commons description pages - I5e6bc45f9751)
It's hoped that this would provide a simple system to get file metadata,
and would be able to return information on any wiki (even without any
extensions installed to provide additional information). So it could
fallback to exif data, if there's no better source of information for
the file available. It's also meant to be done in such a way that, in
the future, when Wikibase is deployed on Commons, it could be integrated
without too much fuss.
marktraceur changed this patch to be a little less heavy-handed: it will
now return unformatted data by default from the API, but there's also a
method for formatting that data in the way that bawolff originally
intended. I'm still trying to figure out if there's much use in that
method, but for now it's not particularly useful.
Change-Id: I77303d8e535fc1c42e14cfb853814e5c434a81ec
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
== 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Within Special:RecentChanges the default non-extended query contains
( rc_this_oldid=page_latest OR rc_type=3 )
Wikidata has previously used the SpecialWatchlistQuery hook to look for
this exact string and change rc_type=3 to rc_type IN (3,5). Flow is another
type of change that doesn't have a matching row in revisions to match
page_latest for and needs to be added to this query.
This patch adds a new hook, SpecialWatchlistGetNonRevisionTypes, which allows
different extensions to add to a list of values for rc_type (or rc_source once
85787 is merged). This will allow multiple extensions to affect the resulting
query without them breaking eachother.
Change-Id: Id6916fe999c0faa38de878b7b5687e7ea00901bd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Per the bug report, the 'Debug' hook was triggering an infinite loop when
wgDebugFunctionEntry is enabled. The Debug hook is used if an extension wants
to stop a debug message from being sent out. Ideally the wfDebug and related
functions should be as low-level and avoid calling other code as much as
possible to avoid situations like this.
Bug: 55818
Change-Id: I679782489b683503fc624cfea3c7ad72a989b005
|
|/
|
|
|
|
|
|
|
| |
Allows extensions to modify the output of
action=query&meta=siteinfo&siprop=statstics
Accompanies the SpecialStatsAddExtra hook for Special:Statistics
Change-Id: I712748077a0ac2fb729bfe3b6616ac4981cb754e
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use MediaHandler::parseParamString to parse the parameter string
of a thumbnail. This seems to make much more sense given the
design of the Handler class. Also mark ExtractThumbParameters hook
as deprecated.
This should be reviewed by someone familar with the 404 thumbnailing
infrastructure. I'm unclear if there was a reason for why it wasn't
using MediaHandler::parseParamString in the first place.
Bug: 49629
Change-Id: I43a0e7d6f0e45536e4e24b72140157791f5f027f
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since MWTimestamp::getHumanTimestamp just makes a pretty
timestamp, and not a purely relative one, this commit adds
MWTimestamp::getRelativeTimestamp, which does just that.
Change-Id: I8b3e3fc6eeb4afd58f85fa7d05b5ea1a51b0afb6
|
| |/
|/|
| |
| | |
Change-Id: I86e45b7d0eba7d87f65150b34e190e04d8342b3e
|
| |
| |
| |
| |
| |
| |
| |
| | |
some things need access to the old file before its moved,
adding hook to allow extensions to do something before
file is moved.
Change-Id: Ic5e659abc79c41e3331d42074e7f21eec9b9ba7c
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
"This document describes how the current uploading system is build up and how
custom backends can be built. (At least someday it will)."
It says this since 2009 (r55604). I see no need to keep that red herring here.
Change-Id: I70d20bf21527bee26bf244381a9d75d96856dd52
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
trackback.php has been removed in 1.18, redirect.php sometime sooner.
This highlights the state of disarray these docs are in…
Change-Id: I8115ca5649e82537a638b2cd3775717e43099124
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Split parts of doUpdateRestrictions() into several more concise functions.
The biggest drawback is increasing $dbw->encodeExpiry() calls times 3. This is
not much of a problem given that's a very inexpensive function and it is only
called very few times ($limit holds 2 values in current codebase)
Added $reason to the ProtectionForm::save hook, so that other code hooking into
and adding their own settings into page protection form can also process the
reason for the protection change.
Change-Id: I879290ed83e4e47e9561d4c352fbd50c07d7e18a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Introduce a hook allowing automatic redirects to HTTPS to be
disabled on the basis of client IP address.
* Make User::requiresHTTPS() return false if the client IP is
blacklisted as such.
* On login, make the "stick HTTPS" option default to false if the
client IP address is blacklisted as such.
* Do not redirect anonymous requests to HTTPS.
* If $wgSecureLogin is enabled, link to the HTTPS login page *via*
the HTTP redirect, so that there is no need to vary the cache of
anonymous page view HTML on client IP address.
Change-Id: Iaa9dd2108431b8c35e05db4bfe78a629018a003c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Intended for situations where current user can't technically access the
site over a secure connection, e.g. due to a terribly obsolete browser or
WP Zero carrier that provides only insecure free access to the site.
Change-Id: I343985092c49a21fa347ca4dc0e5ec27774ad11d
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This extension adds a "mode" parameter to the gallery
tag, allowing different formats for the gallery tag
(galleries in the ui can be controlled by a global)
The added modes are:
*traditional - The original gallery
*nolines - Like the original, no borders, less padding
*packed - All images aligned by having same height.
JS also justifies the images.
(I think this one is the one that will go over best
with users.)
*packed-overlay - like packed, but caption goes over
top the image in a transloucent box.
*packed-hover - like packed-overlay, but caption only
visible on hover. Degrades gracefully on screen
readers, and falls back to packed-overlay if
you are using a touch screen. I kind of like
this mode when the caption is not that important
(ex a category where its just the file name).
This also adds a hook to allow people to make their
own gallery version. I believe there would be interest
in this, as different people have done different
experiments. For example:
* Wikia: http://community.wikia.com/wiki/Help:Galleries,_Slideshows,_and_Sliders/wikitext
* Wikinews: https://en.wikinews.org/wiki/Template:Picture_select
What I would like to see for this patch, is first it gets
enabled, with the default still "traditional". After
about a month or two we consult with users. If feedback
is positive, we change the default mode to one of the
others (probably "packed").
Adds a "mode" parameter to gallery for different
mode, including one 'height-constrained-overlay'
which looks much more like other modern websites.
Note: This makes one change to the old gallery format.
It makes Nonexistent files be rendered like thumbnails
(i.e. they are rendered with a little grey border).
One thing I'm slightly worried about with this patch,
is that I added an option to MediaTransformOutput::toHtml
to override the width attribute. I'm not sure if that
is the best approach, and would appreciate thoughts
on that.
This should be merged at the same time as Ie82c1548
Change-Id: I33462a8b52502ed76aeb163b66e3704c8618ba23
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
$wgDisableSearchUpdate is a sledgehammer for disabling all indexing
which is fine for most people, but sometimes you've got multiple
search backends and you want some to update but not others. This
allows each backend to tell core whether they support the feature.
This also removes the SearchUpdate hook which really doesn't make
sense and nobody uses but CirrusSearch and an abandoned extension
from 7 years ago.
Will require parallel change to MWSearch (Ibd002347) and Cirrus (I87a5b8cc)
Change-Id: I2063fe05000044225fa6bec2171ed0071b84a5cf
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While we've long had the "NewPP limit report" hidden in an HTML comment,
it is hard for users to find this as they're not likely to look for
profiling information hidden in an HTML comment. Even for those aware of
it, it's not particularly convenient to find.
This changeset adds a table showing this information at the bottom of
the page preview. It also adds the ability for this information to be
added to the ParserOutput object in a structured manner, and various
messages so the report can be localized for the end user.
Note that, for backwards compatability, the default English messages are
used for the "NewPP limit report" comment rather than the localized
messages.
Change-Id: Ie065c7b5a17bbf1aa484d0ae1f3ee0f5d41f8495
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The code for changing the session id cookie from Special:Userlogin is
also needed in CentralAuth. So let's factor it out to avoid code
duplication.
Change-Id: I777f76ee8e2b953a1e972327bedc28e0ab1acf0d
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Various bits of code are not using this because it doesn't support
various use cases, e.g. session cookies, httpOnly, custom paths, etc.
Refactor it to add all those options. Also add a hook so extensions can
override the setting of the cookie.
Change-Id: Ia0c424a48d9455a8574d91631cde0f00c9882288
|
| | |
| | |
| | |
| | | |
Change-Id: I2e424addb27b980dd5e8658b8ce79590b7b5db62
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It seems natural to defer namespace configuration until the namespace is
actually registered, but in the case of namespaces that are registered in
CanonicalNamespaces hook, doing so will not work or cause unpredictable
results. This patch adds a note of warning to hooks.txt. See bug 45031 for
context.
Change-Id: I3f2d56dc7ded5e00974de0baf1a84188eade823c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not allow the user to change it directly; instead create a form
where they can reset it. (The token can still be changed via the API.)
The token is autogenerated whenever it is shown or otherwise used.
This really should have never used the preferences; however, trying to
change that now would be lots of work for very little gain, so this
keeps using that mechanism, adding a little abstraction over it.
It's not unconceivable that similar tokens could be used for other
pieces of data, like Echo's notifications; this enables that with one
new hook.
----
Things done here:
* Add getTokenFromOption() and resetTokenFromOption() methods to User,
abstracting out the get-and-generate-if-empty process of handling
tokens. Respect $wgHiddenPrefs (Watchlist didn't do that
previously).
* Create Special:ResetTokens, inspired by Special:Preferences and
Special:ChangeEmail, presenting the token resetting interface
(HTMLForm-based with CSRF protection).
* Create a new hook, SpecialResetTokensTokens, allowing extensions to
register tokens to be shown in the resetting form. Each token needs
information about the preference it corresponds to and a short
description (used for checkbox label).
* Hide the preference on Special:Preferences (use type=api to achieve
this), display a link to aforementioned special page instead. Move
info blurb to its own section at the bottom.
Bug: 21912
Change-Id: I0bdd2469972c4af81bfb480e9dde58cdd14c67a8
|
| |
| |
| |
| |
| |
| |
| | |
This is planned to be used for intercepting by UW for Flickr blacklisting.
Bug: 42307
Change-Id: Ia3daaeba1ce5e69e751ffc2ae5afd5e449cf4aa7
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
FlaggedRevs will have to use this to expose its edit notices to
VisualEditor.
Also add an $oldid parameter so edit notices can be generated based
on the revision ID being edited.
Change-Id: Ie44a01ebfa7002fa3a89f081e0f831442666ac03
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
User::groupHasPermission is used for various purposes, from checking
whether it makes sense to show a "hide logged-in users" on
Special:NewPages to showing different error messages in some places when
'user' or 'autoconfirmed' is allowed the action to avoiding unstubbing
$wgUser to check $wgUser->isAllowed( 'read' ) in the common case where
'read' permission is granted to everyone.
For the OAuth work, we need to be able to catch that last type of use
without interfering with the others. This change introduces
User::isEveryoneAllowed() to be used for that type of check, which both
makes sure the right granted to '*' isn't revoked from any group and
calls a hook to allow extensions to indicate that they might remove the
right.
Change-Id: Idfee1b4d0613aaf52e143164acd6022459415c49
|
| |
| |
| |
| |
| |
| | |
Deprecated since 1.14. Not used by any extensions in gerrit.
Change-Id: I5f4b381496d1e005add9bbcd9e86d4390491e0d0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Going to use this in CirrusSearch since the default text
handling is insane for Solr.
While we're at it, further move content handling to SearchEngine
so children can override behavior here.
Change-Id: I09d11b81c224d53609c57d75d54021e697b56629
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, WatchAction::doWatch and WatchAction::doUnwatch return true
always. Let's have them return a status object instead.
This also cleans up the handling of Status objects in some of the API
modules.
Change-Id: I9dd9f0fd499c37f29fa12bcdb6142238a1f11e4d
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This never really worked properly, doesn't conform to coding
conventions, and isn't actually used by anyone for testing.
Our selenium stuff these days are in the qa/browsertests repo
Change-Id: I8f1efaa118fe41821fb3f4a6099d75a33681f17b
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This hook will allow extension to disable the regular talk page email notification,
Echo is doing this with a hackish solution of setting global variable
wgEnotifUserTalk to false on the fly, this approach is problematic and will
be replaced with this hook
Change-Id: Ie043d9a1a771d64e4b05b7ddeca75c7542a6c575
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change removed getHtml(), but not the call to it from fillParserOutput.
It has a few other issues that I'll flag in-line after deploying the revert.
This reverts commit fda090a7e7f85f146ec84798fda45232ab67613e
Bug: 49398
Change-Id: Idcef8d4cedc7c03f72bc1743e0f89cc5ed4ad7a7
|