Commit graph

993 commits

Author SHA1 Message Date
jenkins-bot
a4628722db Merge "New hook 'LocalisationChecksBlacklist' to allow to extend the localisation checks blacklist" 2013-11-11 14:37:19 +00:00
Alexandre Emsenhuber
33bec07ae9 New hook 'LocalisationChecksBlacklist' to allow to extend the localisation 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
2013-11-10 11:07:58 +01:00
Parent5446
3cc242ade3 Revert "Add a hook to validate account creation fields."
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
2013-11-10 04:34:22 +00:00
Andrew Bogott
cc1006b77c Add a hook to validate account creation fields.
This is a step on the way to fixing bug 56847.

Change-Id: Id330a8ac041ddea086f192a90ddc962077453333
2013-11-09 20:24:38 +00:00
Max Semenik
1f423cc609 DifferenceEngine cleanup
* Remove mPrefixes from variables
* Turn a define into class const

Change-Id: I80874627df9dffae596f8f7cb3ca28f19ba1f167
2013-11-09 04:21:32 +04:00
Brad Jorsch
ac2b9d7bae Allow ParserLimitReportFormat to change $value
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
2013-11-08 05:06:02 +00:00
jenkins-bot
05740a9619 Merge "Fixing documentation for memcached." 2013-11-05 21:58:11 +00:00
kaldari
b82f714cc3 Fixing documentation for memcached.
I believe that MediaWiki's memcached client does support PECL now.
Also fixing a typo.

Change-Id: Ibcf9c25d077b19de733cc79b5664437479f23a3b
2013-11-05 13:53:07 -08:00
Chad Horohoe
2f28d7dd70 Kill $wgArticle
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
2013-11-01 14:17:26 -07:00
jenkins-bot
0732467b6d Merge "Add language handling to imageinfo/extmetadata API" 2013-10-29 18:33:32 +00:00
jenkins-bot
498693b9ea Merge "Add "extended" file metadata to API" 2013-10-29 18:29:32 +00:00
tgr
042f1c77a6 Add language handling to imageinfo/extmetadata API
Adds options to return metadata in all available languages, or in
a single selected language.

Change-Id: I78f096318904a08abd317a5ed3f74ee33d3289cb
2013-10-29 17:49:19 +00:00
Brian Wolff
d141781396 Add "extended" file metadata to API
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
2013-10-29 17:47:59 +00:00
Bartosz Dziewoński
dfc3e3df90 Correctly update wl_notificationtimestamp when viewing old revisions
== 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
2013-10-27 17:47:53 +00:00
Erik Bernhardson
9efb7a7339 New hook accommodates non-revision rc queries
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
2013-10-24 10:38:54 +11:00
Erik Bernhardson
0f33c14576 Remove 'Debug' hook from wfDebug and wfDebugLog
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
2013-10-17 15:45:05 -07:00
Kunal Mehta
370f4c4618 Add APIQuerySiteInfoStatisticsInfo hook
Allows extensions to modify the output of
action=query&meta=siteinfo&siprop=statstics

Accompanies the SpecialStatsAddExtra hook for Special:Statistics

Change-Id: I712748077a0ac2fb729bfe3b6616ac4981cb754e
2013-10-11 19:12:21 -07:00
jenkins-bot
265cb52243 Merge "Make thumb_handler.php use MediaHandler::parseParamString" 2013-09-30 18:11:09 +00:00
Brian Wolff
ccf89be91a Make thumb_handler.php use MediaHandler::parseParamString
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
2013-09-28 20:32:40 -03:00
jenkins-bot
6d0a4f463e Merge "Added new MWTimestamp::getRelativeTimestamp for pure relative." 2013-09-27 17:45:26 +00:00
Aaron Schulz
bc69502492 Support rate limiting backlink purges, including null edits
Change-Id: I86e45b7d0eba7d87f65150b34e190e04d8342b3e
2013-09-27 05:37:39 +00:00
Tyler Anthony Romeo
fa84729e54 Added new MWTimestamp::getRelativeTimestamp for pure relative.
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
2013-09-24 19:40:48 -04:00
Jan Gerber
386ba287d7 Add TitleMove hook
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
2013-09-17 08:07:17 +00:00
jenkins-bot
26c4f5fa77 Merge "Delete docs/upload.txt" 2013-08-31 13:05:41 +00:00
MatmaRex
c9100aa34f Delete docs/upload.txt
"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
2013-08-31 14:31:05 +02:00
MatmaRex
f86a8c9706 docs/scripts.txt: Remove docs about deleted files
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
2013-08-31 14:28:18 +02:00
Tychay
bfaa602229 Merge "Make it slightly easier for extensions to hook into page protection." 2013-08-26 22:03:18 +00:00
Matthias Mullie
92859c59c3 Make it slightly easier for extensions to hook into page protection.
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
2013-08-26 14:13:43 -07:00
Tim Starling
f0b346d6d0 Core support for disabling HTTPS based on GeoIP
* 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
2013-08-21 13:43:46 +10:00
Max Semenik
1f64960d83 New hook, UserRequiresHTTPS
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
2013-08-20 19:58:12 +04:00
Brian Wolff
14b3f8767b New more slick gallery display
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
2013-08-14 20:56:05 -03:00
Chad Horohoe
2bda9a37fe Allow individual search backends to control whether they SearchUpdate
$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
2013-08-14 17:55:04 +00:00
Brad Jorsch
2b20038ce7 Add limit report data on preview pages
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
2013-08-13 05:54:03 +00:00
Brad Jorsch
136861fe3a Add wfResetSessionID()
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
2013-08-07 23:18:46 +00:00
Brad Jorsch
54bf87d346 Improve WebResponse::setcookie
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
2013-08-07 17:43:06 -04:00
C. Scott Ananian
fa2e54dc34 Update outdated references to maintenance/ in documentation comments.
Change-Id: I2e424addb27b980dd5e8658b8ce79590b7b5db62
2013-08-06 12:04:35 -04:00
Ori Livneh
7e18081ec4 Add a usage note to 'CanonicalNamespaces' hook docs
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
2013-07-30 18:44:01 -07:00
MatmaRex
ed7979a970 Refactor watchlist token handling
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
2013-07-24 22:06:15 +02:00
nischayn22
50ca5a7d17 hook to intercept upload_by_url
This is planned to be used for intercepting by UW for Flickr blacklisting.

Bug: 42307
Change-Id: Ia3daaeba1ce5e69e751ffc2ae5afd5e449cf4aa7
2013-07-24 19:11:33 +02:00
Roan Kattouw
6bf642d80a Add a hook to Title::getEditNotices() so extensions can add them
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
2013-07-23 17:31:27 -07:00
Brad Jorsch
76623e75da Add User::isEveryoneAllowed function
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
2013-07-12 11:18:15 -04:00
MatmaRex
e369c0105e Remove the EditSectionLink hook
Deprecated since 1.14. Not used by any extensions in gerrit.

Change-Id: I5f4b381496d1e005add9bbcd9e86d4390491e0d0
2013-06-27 18:10:13 +02:00
Chad Horohoe
74c0e04c1a Allow SearchUpdate hook to abort core update call
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
2013-06-21 14:00:45 -04:00
Brad Jorsch
c94454687f Return errors from WatchAction
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
2013-06-20 15:51:05 -04:00
Chad Horohoe
0ca1132ea9 Remove Selenium tests from core
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
2013-06-14 16:20:09 -04:00
bsitu
f330f727df Add new hook AbortTalkPageEmailNotification
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
2013-06-10 15:37:18 -07:00
Ori.livneh
6ec90a1acd Revert "Introducing ContentGetParserOutput hook."
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
2013-06-10 19:13:00 +00:00
daniel
fda090a7e7 Introducing ContentGetParserOutput hook.
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
2013-06-04 15:57:04 +00:00
jenkins-bot
0073be25d9 Merge "Add TitleQuickPermissions hook to Title::checkQuickPermissions" 2013-05-29 21:18:37 +00:00
bsitu
94e2d9318a Add new parameter $patrolFooterShown to hook ArticleViewFooter
Some extensions like PageTriage will be able to use this new
parameter to determine whether to show its own curation toolbar.

Change-Id: I07e85aa37edc994c5a2bf9d011976b91ff01ab14
2013-05-29 23:10:22 +02:00
jenkins-bot
c58873fb42 Merge "Rename $usableSkins to $allowedSkins" 2013-05-25 11:22:57 +00:00
Waldir Pimenta
a3c7a8b8f4 Rename $usableSkins to $allowedSkins
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
2013-05-25 12:10:34 +01:00
Kevin Israel
f9e2349202 Remove 'SkinTemplateTabs' from docs/hooks.txt
According to online documentation: "This feature was removed completely
in version 1.18.0."

Change-Id: I410dce8b04ff788cd6573b3b11fd56ce41a96395
2013-05-24 23:50:26 -04:00
Tyler Anthony Romeo
7120504bb9 Add TitleQuickPermissions hook to Title::checkQuickPermissions
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
2013-05-24 19:37:01 +00:00
Timo Tijhof
beb1c4a0ec phpcs: More require/include is not a function
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
2013-05-21 23:26:28 +02:00
jenkins-bot
7106407580 Merge "TitleSquidURLs hook for changing the URLs to purge" 2013-05-21 20:06:10 +00:00
daniel
e311f6f868 TitleSquidURLs hook for changing the URLs to purge
This allows extensions to purge derivative resources that need
updating when a wiki page is changed.

Change-Id: Ic28ce7f57f29376b041627288979981fcb218a44
2013-05-21 20:01:55 +00:00
Timo Tijhof
b7bec085ce Drop redundant attributes in hardcoded html
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
2013-05-21 01:05:12 +02:00
Timo Tijhof
50e7985d4d phpcs: Fix WhiteSpace.LanguageConstructSpacing warnings
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
2013-05-09 05:56:26 +02:00
MatmaRex
120e73c497 Update docs/skin.txt
Reflect the fact that five of the skins were removed. Some rephrasing
as well.

Change-Id: I1acfa872eb4601003762d29443265a49e2100cd6
2013-05-07 06:28:44 +00:00
kaldari
bc34b5867a Adding GetNewMessagesAlert hook and wgUserNewMsgRevisionId JS global
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
2013-05-04 20:21:41 -07:00
Ryan Lane
138092b61a Add hook AbortChangePassword to Special:ChangePassword
Adds a consistent method for authentication extensions to block
password changing operations.

Bug: 46590
Change-Id: I3469e90a958c4fb0f24cafd67de5590d3cc2f075
2013-04-30 16:39:12 -05:00
daniel
8e7150b549 (bug 45535) Hook for changing language links.
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
2013-04-29 09:13:47 -04:00
Tyler Anthony Romeo
7e3386d417 Refactor MWTimestamp::getHumanTimestamp and add hook.
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
2013-04-22 12:07:22 -07:00
umherirrender
4975761eb2 API: Add new hook 'APIGetPossibleErrors'
This allows extensions to modify the array.

This completes the serie of hooks for similar get methods in ApiBase.

Change-Id: Ib398f5815ab57f25d56356b0997c55a03fd96874
2013-04-19 15:25:58 +02:00
kaldari
1c832552ad Modifying ArticleEditUpdateNewTalk hook so that it passes the recipient
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
2013-04-14 15:30:24 -07:00
Alexandre Emsenhuber
15833dafdf Fix case of some Title methods
Change-Id: I1a37ffb0e8cde4deac027721b0e463585b58d634
2013-03-26 10:54:15 +01:00
Marius Hoch
4baa84fd5d Add array with watchlist options to SpecialWatchlistQuery
This data is very useful with the hook as it holds the
criteria to build the watchlist query.

Change-Id: I688ab0b35b301f180bbfde3ad3043b1ee602de10
2013-03-18 09:49:14 +00:00
Kaldari
c5233396cd Changing OutputPage param to a Context param in PageHistoryBeforeList
Change-Id: I348b449043fefba181e28486a07c4aa761bcef24
2013-03-13 21:06:39 +00:00
Kaldari
024ea78574 Adding output parameter to PageHistoryBeforeList hook
This will allow us to easily add other RL modules to the page

Change-Id: I2ec00d44e37298ef91ab428759bda037072b0120
2013-03-12 16:27:16 -07:00
Kaldari
930955762a Adding hooks for thank you notification links
These will allow Echo to add a 'thank' link next to the 'undo' links

Change-Id: Ifb93e49b30bb325ecd17ece9f36bcd83c63a2563
2013-03-12 10:37:39 -07:00
jenkins-bot
53b4dcd2b8 Merge "Use American English spelling for behavior" 2013-03-06 09:00:26 +00:00
jenkins-bot
8a77d9a67d Merge "normalize filenames of maintenance scripts" 2013-03-06 06:15:27 +00:00
Ori Livneh
a4afffd2ba Add CategoryAfterPageAdded / CategoryAfterPageRemoved hooks
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
2013-03-06 04:01:54 +00:00
Waldir Pimenta
158bf7cb55 normalize filenames of maintenance scripts
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
2013-03-06 03:57:54 +00:00
Siebrand Mazeland
9b7889b84b Use American English spelling for behavior
Spotted in ipbreason-dropdown by Shirayuki.

Change-Id: I576ed4bc0abe5ab980aaee3fb9f9e4b43087311f
2013-03-04 10:24:57 +01:00
Chad Horohoe
6f4448dd71 Remove DB2 support
Change-Id: I9b294a213a4000f503c0010d88757db6dda927c0
2013-02-25 13:47:03 -08:00
Yuri Astrakhan
62216932c1 API PageSet allows generator for non-query modules
* 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
2013-02-08 15:42:21 -05:00
Yuri Astrakhan
6b620acc86 Spell checked docs/hooks.txt
Change-Id: I8010fed6e138ee5b1803b9c5c0e678da3f2db9ef
2013-01-27 20:50:17 +01:00
IAlex
f9edfbbcbc Merge "(bug 44010) Pass context to UserGetLanguageObject" 2013-01-18 10:00:59 +00:00
Niklas Laxström
c014e6b060 (bug 44010) Pass context to UserGetLanguageObject
Only way to avoid messing with wrong request contexts.
Had to add recursion guard too.

Change-Id: Idc11b54752450321e01d92004e08fc95fb6170e6
2013-01-18 10:56:27 +01:00
Ryan Finnie
1c3b2a1bf0 Adding SpecialSearchResultsPrepend/Append hooks
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
2013-01-18 00:05:31 -08:00
jenkins-bot
2e07c7de68 Merge "Add css $classes variable to the OldChangesListRecentChangesLine hook" 2013-01-10 17:22:05 +00:00
aude
5e4f933ee0 Add css $classes variable to the OldChangesListRecentChangesLine hook
- will update LiquidThreads accordingly and do not see
this hook used in any other extension in Wikimedia git repos.

Change-Id: Ib8f297b39dbd5fba980bb0d4773d0e01f2b922f4
2013-01-10 15:52:30 +00:00
IAlex
7b66a346d4 Merge "Update docs" 2013-01-07 20:36:38 +00:00
jenkins-bot
372ace006e Merge "(bug 42064) Make EditFilterMergedContent more generic." 2013-01-07 18:07:06 +00:00
Siebrand Mazeland
c90e4aa9fd Update docs
Change-Id: I31e9608ed3cef09656dac6ce6079259585299cb1
2013-01-07 19:00:05 +01:00
daniel
9a0e7bb6b7 (bug 42064) Make EditFilterMergedContent more generic.
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
2013-01-07 14:01:07 +01:00
Siebrand Mazeland
86fb1cc78c Remove docs for hook LoggableUserIPData
Hook does not exist (anymore). Some background in bug 32925.

Change-Id: I830abd60f559cdd276458447f8f4c772b2d136b1
2013-01-07 10:18:37 +00:00
Siebrand Mazeland
d765a3553a Partial normalisation of hooks.txt
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
2013-01-04 21:33:37 +01:00
Siebrand Mazeland
5d6f921d06 Explicitely add two undocumented hooks
Found using php maintenance/findHooks.php.

Change-Id: I6977cd5c57566025a63be1c5042d5d64eed44676
2013-01-04 17:00:48 +01:00
Siebrand Mazeland
b33c77a525 Partial normalisation of hooks.txt
File formatting is very inconsistent. I updated approximately the first
part of the file.

Change-Id: If43cafb59828a1b846dd6dc751efc9ebcd7d5b72
2013-01-04 16:56:58 +01:00
bsitu
d1bbc15e29 Add new hook LinksUpdateAfterInsert to LinksUpdate
This will allow extensions to do some work based on the links inserted

Change-Id: Ia522de65ff17e28c6a8cd9997cf6225100fefc9e
2013-01-02 12:50:59 -08:00
Dereckson
ba16916882 Fixing find hooks script call error in docs/hooks.txt
- 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
2013-01-01 17:44:02 +01:00
aude
e6a811b436 allow OldChangesListRecentChangesLine hook to return false and omit line from RC
- 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
2012-12-27 07:58:01 +00:00
Kaldari
4fd26bdd02 Creating new GetDoubleUnderscoreIDs hook
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
2012-12-25 15:29:43 -08:00
jenkins-bot
3158abd351 Merge "Hook to allow manipulation of image data" 2012-12-23 18:01:30 +00:00
nischayn22
b207c900fa Hook to allow manipulation of image data
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
2012-12-23 12:55:15 -05:00
Siebrand Mazeland
6e165c76a3 Update misleading variable names in docs
$article for a WikiPage object isn't a great choice. Let's use $wikiPage.

Change-Id: I98832355b14fc4a281d3f0e2dbee85e142d83418
2012-12-05 14:41:41 +01:00
Chad Horohoe
73451c606b Add a hook to Special:Version so we can customize the version URL
Change-Id: I02fe38c7b13dcfe570e78d28783098fc18756204
2012-11-29 15:01:54 -05:00
Ori.livneh
023b1dafd3 Merge "Addition of SearchAfterNoDirectMatch hook" 2012-11-28 11:52:07 +00:00
Reedy
904e4bdf7f Addition of SearchAfterNoDirectMatch hook
Needed for mediawiki/extensions/SearchExtraNS

Change-Id: If0a7da5c8691c418bc388e50dd11eea3b57ed45d
2012-11-28 03:47:17 -08:00
IAlex
7e8154f9e8 Merge "Fix doc/hooks.txt for EditPage::showStandardInputs:options" 2012-11-27 19:01:51 +00:00
bsitu
494529503b (bug 14901) Email notification mistakes log action for new page creation
Original patch by Dan Nessett, modified by Benny Situ and Roan Kattouw

Change-Id: Ibb7953741e4189127d1cd6718ac58492f254671e
2012-11-26 19:37:01 +00:00
Brad Jorsch
078a0c16d0 Fix doc/hooks.txt for EditPage::showStandardInputs:options
The documentation added for this hook in Ic5d35c8e missed one of the
parameters.

Change-Id: I935dac942679d999658fa9fe367db81df33edbfd
2012-11-26 12:57:25 -05:00
Brad Jorsch
8d198333d3 Add EditPage hooks AlternateEditPreview, EditPage::showStandardInputs:options
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
2012-11-22 01:13:33 +00:00
Daniel Kinzler
d4556df5e8 Merge "add SpecialUndeleteLogEntry hook" 2012-11-19 13:17:31 +00:00
aude
58bd2adb3d add SpecialUndeleteLogEntry hook
- 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
2012-11-19 10:23:21 +00:00
Ori Livneh
29cb4c98ed Fix typo (cointent => content)
Change-Id: I4d6702d0b2a6c4fe224a8c59808a579b6c6916a0
2012-11-16 21:19:48 -08:00
Brad Jorsch
7c9d6c0d10 (bug 32368) Add ParserCloned hook
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
2012-11-16 11:27:13 -05:00
Aaron Schulz
a8644b99bb Merge "Content::convert() for conv. betw. content models." 2012-11-07 20:39:09 +00:00
Aaron Schulz
4c8816746f Merge "(Bug 41580) Hook for custom search hit rendering." 2012-11-07 00:55:41 +00:00
Chad Horohoe
444d3490eb Doc tweak: variable is actually $isKnown and is a reference
Change-Id: Ib68ea809cbda50b445865bcde22ad7583c8e7f38
2012-11-06 14:52:30 -05:00
daniel
ea4473037d Content::convert() for conv. betw. content models.
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
2012-11-06 17:39:10 +01:00
daniel
d6495c2a4e (Bug 41580) Hook for custom search hit rendering.
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
2012-11-06 14:01:16 +01:00
Hashar
7b890dce25 Merge "update export-demo.xml to version-0.8.xsd" 2012-11-06 09:04:34 +00:00
umherirrender
098f7680a4 Fix escaping of pattern in export-0.8.xsd
ExportDemoTest::testExportDemo
xml not valid against xsd: DOMDocument::schemaValidate(): failed to
compile: Wrong escape sequence, misuse of character '\'

Change-Id: Iefae25270b0ad1bf3aa587a51eec3fec1866cff8
2012-11-03 19:38:58 +01:00
umherirrender
daf20e5c8c update export-demo.xml to version-0.8.xsd
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
2012-11-03 19:37:02 +01:00
Siebrand Mazeland
9c592c508c Correct documentation for EditFilter hook parameter
Change-Id: I1f5dbc834c44c33fce495a8c4ca5fc0f2b61b4c7
2012-10-24 10:18:38 +02:00
Alexandre Emsenhuber
d888481866 Follow-up I186669a5 (4b62b03): reorder hooks alphabetically
Change-Id: I399f10df254762c4dd05e2c6fb83c29cc6121f81
2012-10-17 22:32:02 +00:00
aude
42ff119e8a Fix typo in contenthandler documentation
Change-Id: Id03f854eca4b6c53ecd535422b779bf8a459750d
2012-10-16 10:36:56 +00:00
Aaron Schulz
19745cb831 Merge "Prefix new ContentHandler hooks in WikiPage with Page instead of Article" 2012-10-11 17:12:50 +00:00
Siebrand Mazeland
4b62b0339c Prefix new ContentHandler hooks in WikiPage with Page instead of Article
Covers 3 hooks:
* ArticleContentInsertComplete -> PageContentInsertComplete
* ArticleContentSave -> PageContentSave
* ArticleContentSaveComplete -> PageContentSaveComplete

Change-Id: I186669a5941d8982725ed364b481215d291b2043
2012-10-11 18:22:52 +02:00
Alex Monk
388df2ee24 Tidy up InfoAction and note it's hook in docs/hooks.txt
Also add $context parameter to the hook and (bug 40845) don't
overwrite pageInfo's $title parameter.

Change-Id: I41128abb72553142b45e90befabde541b2d8941f
2012-10-11 01:41:43 +01:00
daniel
329d5b3516 Merge branch 'Wikidata' into master.
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
2012-10-09 11:34:24 +02:00
umherirrender
d73e90c99c Add version number to deprecated setting
Fix one doc

Change-Id: I527639c3694d7b72d9f3bff62fb8b0b7eb6ee126
2012-10-09 08:25:01 +02:00
daniel
c546fae8ed merge latest master into Wikidata branch
Change-Id: Id4e0f40c03679c13d8934a6add99b5cd86d0437d
2012-10-08 13:58:54 +02:00
Aude
c3a46a5d36 Merge "copyedit" into Wikidata 2012-10-05 13:42:46 +00:00
daniel
1cfa4fc0dc copyedit
Change-Id: Ifad517560a3374575c08095991fa846fc6bc7ed4
2012-10-05 15:09:09 +02:00
daniel
601b5c9959 Merge "Updated export XSD to include model and format." into Wikidata 2012-10-05 12:37:57 +00:00
daniel
d087dd0f88 added architecture documentation
Change-Id: I60f1d0b710802b2076fff94e535cd4534b6c9a30
2012-10-05 14:33:51 +02:00
daniel
f3dc35246e Updated export XSD to include model and format.
Change-Id: Iffd89862c76f850950e13e56b8d6a9c855230fed
2012-10-05 12:05:16 +02:00
Siebrand Mazeland
36ac69b928 The hooks are initiated from WikiPage instead of Article
Change-Id: Ie3d29d6b73916a17cec8cb5ce1a66d98d791eb40
2012-09-25 22:03:34 -07:00
Chad Horohoe
431a2216c2 Fix invalid HTML in design doc
Change-Id: Ibb664c22dc54109b113a51b4385e5564c2b80ce1
2012-09-24 09:01:59 -04:00
daniel
8f479e2e45 Add parameters to ArticleDeleteComplete.
Supply more information about the deleted revision to hook functions.

Change-Id: Ie1fc967d074deb918c824e10398bcb0ec2d557ac
2012-09-20 21:15:43 +02:00
daniel
b6b686c13b merged master
Change-Id: I0ef7c7f33a5dc5855f38b20c03ddc5306f38ec66
2012-09-19 12:34:10 +02:00
IAlex
4498b01558 Merge "fix docu for ApiCheckCanExecute" 2012-09-12 18:51:34 +00:00
Alexandre Emsenhuber
d19e0d6c94 Link to mediawiki.org using https from doxygen first page, not http
Change-Id: I13fe244e6122930731f144f97f27126339065481
2012-09-11 21:43:29 +02:00
daniel
b8d6d18452 fix docu for ApiCheckCanExecute
Change-Id: Ib9af835f3e775dd89a655b186923535d9bd01678
2012-09-11 15:16:39 +02:00
daniel
12166f46b4 merged master (2012-09-11)
Change-Id: I8e953eaa22f9d331b0af5e780fbeff6d702b23e3
2012-09-11 11:43:02 +02:00
IAlex
8634014e86 Merge "Replace some occurrences of wfMsg* by alternatives. Undeprecated wfMsgReplaceArgs." 2012-09-10 17:33:37 +00:00
Aaron Schulz
781377eacc Merge "New hook, 'SearchResultInitFromTitle'" 2012-09-07 20:49:32 +00:00
Daniel Werner
2f6430d40d New hook 'AfterFinalPageOutput' which is called at the end of OutputPage::output()
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
2012-09-07 09:32:39 +02:00
Daniel Kinzler
a1a296ac84 Merge "New hook ApiCheckCanExecute." 2012-09-05 19:06:48 +00:00
Tyler Romeo
780b6878f7 New hook ApiCheckCanExecute.
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>
2012-09-05 14:33:14 -04:00
yaron
13b2fe802e New hook, 'SearchResultInitFromTitle'
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
2012-09-05 20:03:09 +04:00
daniel
b6fe213226 merge latest master.
some tests fail due to logical changes, will fix that in a follow-up

Change-Id: I8a5e4087ecf674fbcf6327c5d168cd401be12400
2012-09-05 17:50:13 +02:00
Siebrand Mazeland
475a1daa03 Replace some occurrences of wfMsg* by alternatives. Undeprecated wfMsgReplaceArgs.
* wfMsgReplaceArgs isn't really i18n related. It just replaces text parts.
* Updated language.txt. Now refers to mediawiki.org.
* Removed deprecated Block::formatExpiry(). Merge Id7d057a4 first.
* Reformatted weirdly formatted array in ApiBase.php.
* Removed wfMsg() in RandomTest.php.

Change-Id: Ied5cfda8fa5d9283dfeebdcb0e1af8453d47e7a9
2012-09-03 11:49:58 +02:00
Max Semenik
a1cedee3c4 New hook ApiMain::onException
Allows custom logging of API errors

Change-Id: If8841c33998dff96448a7eb8dbe95d68119e068f
2012-08-29 20:42:48 +04:00
daniel
9994968774 merged master
Change-Id: Ib2b879c4daa17401eeeb50767c0e5a54254855c3
2012-08-29 15:20:15 +02:00