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 cc1006b77c.
Change-Id: I8656aa1a99c84778fd85ec7da9d6ce23bd6cf9b9
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
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
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
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
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
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
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 fda090a7e7
Bug: 49398
Change-Id: Idcef8d4cedc7c03f72bc1743e0f89cc5ed4ad7a7
This hooks allows extensions to override the normal model-specific rendering
of page content. A typical use would be to provide syntax highlighting for
pages that contain scripts. In that sense, ContentGetParserOutput is a
generalization of the old ShowRawCssJs hook.
Change-Id: Ibfb2cbefea44eeee9f2a027f47e7721bf177ba0f
Some extensions like PageTriage will be able to use this new
parameter to determine whether to show its own curation toolbar.
Change-Id: I07e85aa37edc994c5a2bf9d011976b91ff01ab14
This change is entirely in local scope.
The function is still called getUsableSkins()
so this change won't break anything.
But the variable name and the updated documentation comment
make it clearer what the purpose of this function is,
for anyone reading the code or reading the autogenerated docs.
This change also includes minor changes to documentation
in skin-related files (typos and small edits for clarity).
Change-Id: I4220408f4d3b64cf87be4ad1af4b72d3a4524922
Currently Title permissions hooks get called after
Title::checkQuickPermissions, preventing users from
overriding quick permission checks. Added a hook to
allow this. Needed for bug 45898.
Change-Id: Id672270741282778815b06eff8b234ca4d819744
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.
Also updated usage in text in documentation and the
installer LocalSettingsGenerator.
Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;
Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
This allows extensions to purge derivative resources that need
updating when a wiki page is changed.
Change-Id: Ic28ce7f57f29376b041627288979981fcb218a44
Follows-up 97caae596d which makes HTML5 the default
and removes support for XHTML 1.0 and HTML < 5.
* <script type>
* <style type>
* <html xmlns>
* Quick-closing slash in non-XML HTML5 documents
Change-Id: I71855fa8d4095a5a448ebdc3dc36506ddab6f70c
Squiz.WhiteSpace.LanguageConstructSpacing:
Language constructs must be followed by a single space;
expected "require_once expression" but found
"require_once(expression)"
It is a keyword (e.g. like `new`, `return` and `print`). As
such the parentheses don't make sense.
Per our code conventions, we use a space after keywords like
these. We appeared to have an unwritten exception for `require`
that doesn't make sense. About 60% of require/include usage
was missing the space and/or had superfluous parentheses.
It is as silly as print("foo") or return("foo"), it works
because keywords have no significance for whitespace between
it and the expression that follows, and since experessions can
be wrapped in parentheses for clarity (e.g. when doing string
concatenation or mathematical operations) the parenthesis
before and after basiclaly just ignored.
Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
This hook allows extensions to disable or modify the new messages
alert ('orange bar of doom') while still allowing the user_newtalk
table to be updated.
The wgUserNewMsgRevisionId JS global allows gadgets and extensions
to create their own new message alerts on the client side.
I also threw in a few comment updates for good measure!
See also Echo change I3f35a56b which utilizes this.
Bug: 47962
Change-Id: I2105bdd2bcd5b27f6f36ec8d8fa7fa99d60a2d82
This adds a new hook called LanguageLinks which is called
whenever a list of language links is returned to the user.
This gives extensions the option to manipulate the links
on the fly.
Note that this change only covers the language links used
in OutputPage and by ApiParse. Adapting ApiQueryLangLinks is
left as a follow-up task.
As explained on bugzilla, this is a precondition to
allowing Wikibase/Wikidata to update languagelinks without
forcing a (redundant) re-parse of the page content.
This change also introduces the notion of link flags that
can be used to associate flags with language links. This
will be integrated with ParserOutput and OutputPage in a
follow-up.
Change-Id: Iaec0faa131413a291fc8f77496e4f371addb3b99
Changed logic in MWTimestamp::getHumanTimestamp so that
all the message and formatting was offloaded into the
Language class, keeping only actual timestamp logic in
the MWTimestamp class.
Also added a hook so extensions can override the
human timestamp format.
Change-Id: Ie667088010e24eb6cb569f9e8e8e2553005223eb
This allows extensions to modify the array.
This completes the serie of hooks for similar get methods in ApiBase.
Change-Id: Ib398f5815ab57f25d56356b0997c55a03fd96874
The recipient is the user who's talk page was edited. Extensions may
want to send or not send the notification based on some aspect of the
user, for example a preference.
Bug: 46550
Change-Id: Ifc8fbaf8fdc96f9c18c2a889d2e854e49b3a7010
My first instinct was to derive the hook signature from the implementation and
have a generic 'PageCategoriesUpdated' hook that receives the WikiPage object
and two arrays ($added, $deleted). After some reflection I decided to iterate
through each array and call the hook once per category. I like this way of
doing things because a change in page membership could be thought of from two
directions: it is either the category that is gaining or losing a member, or
the page that is gaining or losing a category.
The category name is sufficient for instantiating a Category object without
additional queries being needed, so my preference was to pass objects rather
than string identifiers.
If implementors of handlers happen to be interested in the set of categories or
pages being updated, it is still the case that they only need to write one
function, and track state using a class property.
Change-Id: Ica4c5fb3acdea6c00678ec0794808fa50a1dd39a
Use lowerCamelCase.php format for all files (per [[mw:CC#File_naming]]),
and make filenames more specific:
- clear_stats.php -> clearCacheStats.php
- clear_interwiki_cache.php -> clearInterwikiCache.php
- initStats.php -> initSiteStats.php
- proxy_check.php -> proxyCheck.php
- stats.php -> showCacheStats.php
- showStats.php -> showSiteStats.php
Also changed the class names accordingly (per [[mw:CC/PHP#Naming]]),
and make class names more specific:
- clear_stats -> ClearCacheStats
- InitStats -> InitSiteStats
- CacheStats -> ShowCacheStats
- ShowStats -> ShowSiteStats
Updated files that made references to the changed files/classes:
- DefaultSettings.php and SpecialBlockme.php (proxy_check.php -> proxyCheck.php)
- maintenance/showSiteStats.php (initStats.php -> initSiteStats.php)
- maintenance/README and docs/memcached.txt (stats.php -> showCacheStats.php)
- docs/maintenance.txt and docs/memcached.txt (clear_stats.php -> clearCacheStats.php)
Thanks Hashar for the initial help and encouragement :)
Change-Id: I60f76fc971e06e1b710dcda35f9c2d931b93bdd7
* PageSet can now be used in any action to process titles/pageids/revids
or any generator, redirects resolution, and converttitle functionality.
* action=purge proper usage of MustBePosted()
* Add supports for all pageset capabilities - generators, redirects, converttitles to
action=purge and action=setnotificationtimestamp
* BREAKING CHANGE: ApiPageSet constructor now has two params instead of three, with only the
first one keeping its meaning. ApiPageSet is now derived from ApiBase.
* BREAKING CHANGE: ApiQuery::newGenerator() and executeGeneratorModule() were deleted.
Change-Id: I7a3d7b6eb015d21ec1a9b9d9c6af9d97663f3f9a
These hooks allow you to prepend, append or replace the search results
in Special:Search.
SpecialSearchResultsPrepend is executed immediately before the results
HTML begin to output. It can be used to include an external search
provider like Google CSE, for example. If the hook returns true, the
MediaWiki search results continue to output. If returned false, they
are suppressed.
SpecialSearchResultsAppend is executed immediately after the last
results HTML (including search navigation) are output. This hook is of
limited use since it will not be run in certain circumstances (there are
several points in the previous output logic where the function returns),
but is included for completeness.
Change-Id: Ib38433141979de999cdcab5eca26ba5416331aaa
- will update LiquidThreads accordingly and do not see
this hook used in any other extension in Wikimedia git repos.
Change-Id: Ib8f297b39dbd5fba980bb0d4773d0e01f2b922f4
This is part a the solution to bug 42064: it modifies the EditFilterMergedContent hook
to allow it to be triggered by code outside the EditPage. This is useful when extensions
such as Wikibase implement their own editing mechanism for non-textual content.
Allowing EditFilterMergedContent to be used on non-textual content ensures that
any filters will also be applied to that content.
Note that EditFilterMergedContent was introduced in 1.21 which hasn't been released yet,
so modifying the hooks definition should not be a problem. The only extension that appears
to use the EditFilterMergedContent hook is Translate. I'll supply a patch.
To completely fix bug 42064, I will soon submit two changes to two extensions:
* In the Wikibase extension, trigger the EditFilterMergedContent when changing data
entities.
* In AbuseFilter, make use of the EditFilterMergedContent hook, so filters will also be
applied to non-textual content.
The the dicsussion on bugzilla for the rationale of this architecture.
Change-Id: I99a19c93e99860a91d7f898b0a3fbb72b69baab8
Follow-up to If43cafb5. Almost complete. Needs another scan.
Added TODO where work is needed. I'll create documentation bugs for these
after the last scan.
Change-Id: I16a7bc03be71d1c907393c2a0748bf2150828bed
- maintenance/findhooks.php -> maintenance/findHooks.php
- ./maintenance/... -> php maintenance/... (*)
* Our maintenance files aren't released as executable, so this kind of
instruction could be confusing for UNIX system administration novices.
Change-Id: I5e1e76c46b3a8a4c7168c0b5715ede648044bd44
- 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
Creating a new hook so that doubleunderscore (behaviour switch) magic
words can be defined from Extensions (so that I can solve bug 6754
from an extension rather than from core, as requested).
Change-Id: I734a4a1639be61052924838b19ed9db93a28e50b
Adds a new hook, ThumbnailBeforeProduceHTML, to ThumbnailImage::toHtml
method, in order to permit the user to manipulate the image and link
attributes before the HTML is rendered. For details see bug 41835
Note: Patch given by Victor <vdanilchenko@vistaprint.net>
Change-Id: Ib94967997e1303522d0081c7387e29af9c0ef0f0
Adds two new hooks:
* AlternateEditPreview allows an extension to override the standard
page preview display.
* EditPage::showStandardInputs:options allows an extension to add
additional HTML to the end of the editOptions area of the edit form.
Change-Id: Ic5d35c8e9ff71282b5ebccc87c64894a385e5836
- allows extensions to perform some action at time that a undeletion log entry is performed,
or skip the insertion of a log entry.
Change-Id: I5b0caaddfe5d7262612a60946d9f5c4af2679141
We store various bits of data as "expando" properties on the Parser
object, to pass information from one stage of the parser to another. If
the parser is cloned, however, we can run into trouble because two
different Parser objects are now manipulating the same extension data
structure; this often shows up when ParserClearState is called on one
clone and clears the state of the other as well.
Since a deep clone might be too expensive and still might be wrong in
some cases, it seems most useful to simply provide a ParserCloned hook
so extensions can just do The Right Thing.
Change-Id: Ieec65c908d71e89b9a66f83b9a626f842aadacbb
This is needed to fix bug 41706 and similar, watch for follow-ups.
Automatic, implicit conversion may be handy in several cases, especially
for converting between different text based content models. E.g. it should
be possible to create a diff between a JavaScript and a wikitext page. This
change lais the foundations for this ability.
Change-Id: Ie7d87b67b24ac9897cb5696220a7785b228d3c79
Introducing ShowSearchHit hook into SpecialSearch, so extensions
can control of how search results are displayed. This does not
fix bug 41580, but it's a precondition to fixing it in Wikibase.
Change-Id: I9158684b92e320a486266c45dc3f7cf466ec5a24
ExportDemoTest::testExportDemo
xml not valid against xsd: DOMDocument::schemaValidate(): failed to
compile: Wrong escape sequence, misuse of character '\'
Change-Id: Iefae25270b0ad1bf3aa587a51eec3fec1866cff8
Add a assertion to the validation test to ensure, export-demo.xml is
updated next time, when a new version is created.
Change-Id: I004ca23d848dd6701acb45e9b755397b434370c4
Also add $context parameter to the hook and (bug 40845) don't
overwrite pageInfo's $title parameter.
Change-Id: I41128abb72553142b45e90befabde541b2d8941f
This introduces the ContentHandler facility into MediaWiki,
see docs/contenthandler.txt.
For convenient review, a squashed version is available at
https://gerrit.wikimedia.org/r/27191
The ContentHandler facility is a major building block of the Wikidata project.
It has been discussed repeatedly on wikitech-l.
Change-Id: I3804e2d5f6f59e6a39db80744bdf61bfe8c14f98
Called before final ob_end_flush() which will send the buffered output to the client. This allows for last-minute modification of the output within the buffer by using ob_get_clean().
- patch-set2: moved the hook before OutputPage::sendCacheControl() is called, as suggested by Reedy.
Change-Id: I264a37ac74e0c18ff141f82156e669ece3212c2d
Added new hook in ApiMain::checkCanExecute
so that extensions can authenticate and
authorize API clients before the module is
execute. (Necessary for extensions like
OAuth that externally authnz clients.)
Change-Id: I1b059fd9a4aa717928af8b09f5edebe899ab3ce1
Signed-off-by: Tyler Romeo <tylerromeo@gmail.com>
This hook lets you change the revision ID used for a page (a Title
object), when displaying that page in search results. It's useful for
the Approved Revs extension, so that pages whose approved revision is
not their latest can have their approved revision, not the latest one,
show up when doing a search text. It's also potentially useful for
other, similar extensions, like FlaggedRevs.
Change-Id: Ic4bad8dfaa83de131db9c8e7667d7f5767d8d5f5