Commit graph

1164 commits

Author SHA1 Message Date
Ori Livneh
207dfd2adf Add RejectParserCacheValue hook
Add a new hook, 'RejectParserCacheValue', which allows extensions to reject an
otherwise-successful parser cache lookup. The intent is to allow extensions to
manage the eviction of archaic HTML output from the cache.

Change-Id: I660679a48c46608f859bd52b31d6a888aabcc9ac
2015-06-23 11:23:57 -07:00
Ori Livneh
c099155a17 ellapsed => elapsed
Also fix some files that don't end with a newline.

Change-Id: Id0672d685b929a5832b42f733dad49683536180a
2015-06-23 03:32:33 +00:00
Vivek Ghaisas
9f5b6f5aeb Fix whitespace issues around parentheses
Fix issues found by MediaWiki.WhiteSpace.SpaceyParenthesis sniff.

Bug: T102617
Change-Id: Iec7f71e64081659fba373ec20d9d2006306a98f4
2015-06-16 22:14:02 +03:00
jenkins-bot
7885e0b080 Merge "Add a SpecialSearchResultsAppend hook" 2015-06-15 20:09:24 +00:00
James Earl Douglas
e7551f1621 Add a SpecialSearchResultsAppend hook
This allows additional HTML to be included below search results.  This
will be used to optionally include a feedback link fter search results.

Bug: T101783
Change-Id: I5c4bab12ed0b022c84aa6b50ab72635e9dd0bd0c
2015-06-15 12:59:36 -07:00
jenkins-bot
5b74a93eff Merge "Do not support new installations via .php5 entrypoint any longer" 2015-06-12 20:49:56 +00:00
csteipp
1a20dc9362 Password validity by policy per group
Make password policies defined in a configurable policy, which is
defined by group. A user's password policy will be the maximum of
each group policy that the user belongs to.

Bug: T94774
Change-Id: Iad8e49ffcffed38df6293db0ef31a227d3962003
2015-06-10 10:34:17 -07:00
jenkins-bot
5d0a9bb42d Merge "Deprecate $wgEnableParserCache" 2015-06-04 18:33:29 +00:00
Aaron Schulz
8194b2014b Deprecate $wgEnableParserCache
* There is little reason to disable it and one can set $wgParserCacheType
  if truly needed

Change-Id: Iec5fc7729d0f9de67ec2aa6c0e9c2c1e3e0d57ad
2015-06-04 19:23:03 +01:00
Bryan Davis
4111fb7003 Normalize hooks.txt formatting
* Line wrap at 80 columns
* Added missing '$' for pass by reference parameters
* "$param_name: ..." for all params
* Parameter descriptions that wrap have a 2 space hanging indent
* "DEPRECATED! Use ..." immediately follows hook name
* Indent code examples with tabs per MW coding standards
* Move "hanging" information into description headers
* Fix some really out-of-order alphabetizations

Change-Id: Ic5453c90fb9b58e9fc137d8f45dcd255957bf76d
2015-06-03 15:38:57 -04:00
Gergő Tisza
d0d539e6ba Add a hook for reporting exceptions
Bug: T100141
Change-Id: I893f8b93e09f9ef70beef46922d304fdb3600b78
2015-06-03 05:09:41 +00:00
jenkins-bot
6ffdc1cdca Merge "OOUI theme support" 2015-06-02 17:28:09 +00:00
Chad Horohoe
785a8289d3 Do not support new installations via .php5 entrypoint any longer
Continues the path of deprecating $wgScriptExtension and all of
the related baggage.

You'll only end up with sadness when we rip out of the rest of
this later so don't let people shoot themselves in the foot.

Change-Id: I34cd1d2c266405ebc761a271e3740e972fb7cf2f
2015-06-02 08:38:57 -07:00
Kunal Mehta
75fc0f1661 registration: Remove "additionalitems" property from array (authors)
It doesn't make sense for arrays which can't have items to begin with.

Follows up bfe4ddd810

Change-Id: I851b70782fa8210802fe576fee771ddf1bdd7fec
2015-06-01 18:50:51 -07:00
Bartosz Dziewoński
1fc57830e2 OOUI theme support
* Split off OOjs UI's module definitions to a separate file from
  Resources.php.
* Extend ResourceLoaderImageModule to support per-skin images and
  variants.
* Allow skins to specify their preferred OOjs UI theme using new
  skin registry attribute 'SkinOOUIThemes'. The default remains the
  'mediawiki' theme, 'apex' can also be chosen now.
* Implement custom ResourceLoaderOOUIImageModule which implements some
  special sauce required to shoehorn OOjs UI image set definitions into
  ResourceLoaderImageModule with skin-specific styles support.

Bug: T100895
Change-Id: I3fbacbce95126a4cc29221352f3ef846f41e7b1b
2015-05-31 22:55:13 +00:00
Kunal Mehta
0c04667cac registration: Don't hardcode list of extension types in schema
Extension types can be added via a hook, so don't try and validate
against a hardcoded list.

Change-Id: I0bc6fbcedc0b582b81c7037724ad01441ae415f6
2015-05-30 00:34:57 +00:00
Kunal Mehta
066d1ef940 registration: Improve ResourceModules schema definition
* "-" is a valid character in module names
* debugScripts, loaderScripts, dependencies, and messages can all be
strings in addition to arrays.

Change-Id: I76570ebf1cb02ca51c5185d4b0c48a553a0e7d2f
2015-05-30 00:14:08 +00:00
Kunal Mehta
1998993685 registration: Fix types of ResourceModules properties
styles and scripts can both be strings, and that is treated as if that was
the first value in the array.

style can be used as an object, the filename is the key, and value can be an
object that states what media type the stylesheet is for. An example of this
can be seen in the MonoBook skin.

Change-Id: If7d3a220cdccbb1ce096d776592535fe5782a954
2015-05-28 17:54:33 -07:00
Kunal Mehta
a1368a3d9b registration: Version the extension.json schema
Versioning the extension.json schema will allow us to make breaking changes
to the schema in a non-breaking manner.

Extensiosn and skins will set a 'manifest_version' value, stating which
version of the schema the file is written for. Processor::extractInfo() will
be  passed the version number, and can switch behavior depending upon it.

For backwards-compatability, a version number of 1 is assumed if none is set.
The validateRegistrationFile.php script will emit a warning if this is the
case.

Bug: T99344
Change-Id: I2086a1465ceaeedd1ccc6804fda2c304ad16ffa0
2015-05-28 22:20:59 +00:00
daniel
d39e1e24d1 Introduce ParserCacheSaveComplete hook.
Rationale: give extensions a way to track which "renderings"
of a page exist in the cache. This is particularly relevant
for multi-lingual wikis that splpit the parser cache by user
language on some pages. In that case, hooking into
ParserAfterParse or LinksUpdateComplete is insufficient to
track all language specific renderings.

Bug: T99511
Change-Id: Iebf526098ca837a7df637c650097119495000c81
2015-05-25 13:35:23 +00:00
Kunal Mehta
34537805fc registration: Fix 'ResourceModules' in schema
Change-Id: I6fb833133a6d6bde42cb40eb8fd7e02f7ca9797a
2015-05-25 12:05:05 +02:00
jenkins-bot
d864012f33 Merge "Remove unused 'XMPGetInfo' and 'XMPGetResults' hooks" 2015-05-23 21:15:02 +00:00
Kunal Mehta
4feb2ac7f2 Remove unused 'XMPGetInfo' and 'XMPGetResults' hooks
These hooks are unused in all extensions in Gerrit. We need to remove
them so we can move these classes into a separate library.

Change-Id: I66406c642168adc703361b75deb95c830c1ddab1
2015-05-23 23:05:10 +02:00
jenkins-bot
35073a9d89 Merge "SpecialStatsAddExtra: Format column label with msg" 2015-05-23 13:23:52 +00:00
Mark A. Hershberger
0f19ee9d85 SpecialStatsAddExtra: Format column label with msg
This allows the user of the SpecialStatsAddExtra hook to provide
formatting for the row label using an i18n message key.  If given, the
message is given the row key as a parameter.  To maintain backward
compatibility, the key is used as-is as was done previously if a message
key is not provided.

Bug: T97623
Change-Id: I43c522b24372e115ed78adf69848bf50cbab8295
2015-05-23 15:05:07 +02:00
jenkins-bot
aaef99cbb6 Merge "Do not allow setting deprecated $wgSpecialPageGroups over extension.json" 2015-05-20 04:48:59 +00:00
Kunal Mehta
aa2e12c172 registration: Remove duplicate "ParserTestFiles" key from schema
Bug: T99493
Change-Id: I43ea510162d01424171e738310b0519c85d28f68
2015-05-17 22:50:37 -07:00
umherirrender
d06aaa9b20 Do not allow setting deprecated $wgSpecialPageGroups over extension.json
$wgSpecialPageGroups is deprecated since 1.21
The code should be migrated to override SpecialPage::getGroupName before
adding an extension.json to the extension, instead of allowing setting
this over extension.json

Also added a warning to convertExtensionToRegistration.php for the no
longer supported global

Change-Id: Idccbe41b649de93548c5b0fca03145da716bcc65
2015-05-16 22:26:33 +02:00
Prateek Saxena
b4636815eb KSS: Make section headings links
Change-Id: I46aec0fcd846aa40b32eee4b24852cc0ae56a35c
2015-05-13 10:21:19 +05:30
Jackmcbarn
62c3fe221f Allow running code during unstrip
When adding strip markers, allow closures to be passed in place of text.
The closure is then called during unstrip. Also, add a hook that runs
after unstripGeneral. This is needed for Extension:Cite's I0e136f952.

Change-Id: If83b0623671fd67e5ccc9deaaaab456a6679af8f
2015-05-13 02:44:20 +00:00
Brad Jorsch
dc15ea106a ApiHelp: Make 'toc' parameter work
Bug: T98378
Change-Id: I0219689f621e325fc22f0eab6e4c000e1b2fa06f
2015-05-06 13:37:41 -04:00
Kunal Mehta
2b81c4ca36 registration: Add support for $wgParserTestFiles
Bug: T97921
Change-Id: I9a736a4c0ff739c4acf742b8f17792544851b28e
2015-05-02 23:16:54 -07:00
Kunal Mehta
e5aca92ebc registration: Support $wgMediaHandlers in ExtensionProcessor
Bug: T97908
Change-Id: I3bea9273f956d93aebc5176b83d375c574715382
2015-05-02 21:06:34 -07:00
Mark A. Hershberger
12c370c68b Create PageViewUpdates hook
Bug: T97622
Change-Id: I0f2dedf84a540b6f87623792c7b4f8b8ad8f8059
2015-04-30 09:17:33 -04:00
daniel
a7f26eb3b7 Introduce PageHistoryPager::doBatchLookups hook.
The intention of the new hook is to allow extensions to prefetch
any information that may be needed for displaying history rows.

In particular, this is needed by Wikibase to allow us to inject
localized entity labels into the edit summaries.

Bug: T95672
Change-Id: Ie10ef99154da35713a4f583e2de2162fba28eef2
2015-04-16 16:02:13 +00:00
Kunal Mehta
16b44c4146 registration: Support 'namemsg'
Change-Id: I0f446b31c1d36a492997ef31fae6d2d2bea36517
2015-04-07 08:43:39 -07:00
Kunal Mehta
77a813f21f registration: Support ResourceModuleSkinStyles
Structurally, it's set up exactly the same as ResourceModules, so we can
re-use the same code.

Bug: T91566
Change-Id: I7cd1330edc3e97b4658c81aac67071a90ac61fb6
2015-04-07 08:43:16 -07:00
Bryan Davis
1195e11a8a Move MWLogger classes to MediaWiki\Logger namespace
Move the MWLogger PSR-3 logging related classes into the
MediaWiki\Logger namespace. Create shim classes to ease migration of
existing MWLoggerFactory usage to the namespaced classes.

Bug: T93406
Change-Id: I359cc81fbd2dcf8937742311dcc7d3dee08747b0
2015-04-03 11:32:24 -07:00
daniel
c95ec07359 New hook: OpportunisticLinksUpdate
Change-Id: I8b9238cd6b0010ad91fae24d4eb1e7cd0c201931
2015-04-01 11:17:57 +00:00
Matthias Mullie
62a5454aad Let extensions add entries to Special:DeletedContributions
Bug: T90973
Change-Id: I0cb5340311262084a3120fdb0314fd26193c07a3
2015-03-25 13:42:28 +01:00
jenkins-bot
65294205a1 Merge "Split SiteLookup interface from SiteStore" 2015-03-19 11:32:27 +00:00
aude
aded554d70 Split SiteLookup interface from SiteStore
* SiteLookup interface is added, and SiteStore extends
  it. (any SiteStore type hints can be changed to use
  SiteLookup if all they need is lookup functionality)
* Memcached based SiteStore code is split from the
  database SiteStore, and SiteSQLStore is deprecated.
  If no caching is desired when using a SiteStore, then
  use a SiteDBStore instance, instead of passing $source
  parameter in SiteStore::getSite and SiteStore::getSites.
* SiteListFileCache renamed to FileBasedSiteLookup and
  implements SiteLookup.

Bug: T77990
Change-Id: I36b599884c211580ea6806a8a190c65c4f9087cf
2015-03-18 21:31:48 +01:00
jenkins-bot
cbed702308 Merge "Update code examples in docs/hooks.txt" 2015-03-14 08:02:51 +00:00
umherirrender
a0f14b1487 Update code examples in docs/hooks.txt
Adjust for code convention and wfRunHooks -> Hooks::run

Bug: T85588
Change-Id: I0297e389eb761822b0b5b9ea7a0a0a7990790677
2015-03-14 08:41:09 +01:00
Kunal Mehta
7a16e1e7ce Update documentation for SpecialPage_initList
State that it can be used to conditionally register special pages

Change-Id: I83fd793c9cbb7a70fe97186f72078ee021a79475
2015-03-13 16:25:44 -07:00
S Page
70be7d9441 Specify max compatible kss version
core/docs/kss/styleguide-template/index.html uses {{whenDepth}} and
other functions deprecated in kss 2.0, so set an upper version bound in
package.json

Bug: T91725
Change-Id: I55669f3cc1c34911f717fe5fce3ea6ed00510177
2015-03-05 17:49:07 -08:00
Kunal Mehta
ade66c04e9 Add "ValidSkinNames" to extension.schema.json and ExtensionProcessor
skin.json goes through the same exact code as extension.json does, and needs
to be able to add skins.

Change-Id: Idd0acaf6735b4c308d3ab584c49da4e97448347f
2015-03-04 12:34:35 -08:00
jenkins-bot
acfe382ef5 Merge "Add hook EnhancedChangesList::getLogText" 2015-03-03 04:15:19 +00:00
Matthias Mullie
fd64488787 Add hook EnhancedChangesList::getLogText
Enhanced RC generates these "(3 changes | history)" links for
every block of grouped recentchanges. That changes-link links
to a diff page.

For Flow, that is all wrong: we have different ids (not integers),
on a different page (&curid=&oldid=&diff= means nothing). Even
the concept of a "diff" page seems wrong here for us - a new post
is not part of some document that can be diffed.
In short: we'll want to generate a different link, and we'll need
a hook to let us change them.

Meanwhile also split the code that generates those links into a
separate method.

Bug: T72513
Change-Id: Ib32fb9552b80f9581d89b3b47da6e5d32e3d84a3
2015-03-03 01:50:32 +00:00
Kunal Mehta
2702c1f473 Make "name" a required value of extension.json in the schema
The code considers it to be required, so indicate that in the schema as well.

Change-Id: I9c1a279d5675eb10210a3dba5a15fe169619d719
2015-03-02 16:38:39 -08:00