Commit graph

2273 commits

Author SHA1 Message Date
Translation updater bot e6506cdd08 Localisation updates from https://translatewiki.net.
Change-Id: I9f3f34ac163664fcbffe7b1d20d58813bd9c25f4
2018-05-23 22:20:08 +02:00
Translation updater bot 5b5824dabe Localisation updates from https://translatewiki.net.
Change-Id: I35ab3e7ab5ee261eb361da2cd0d3fe1ffaa3a196
2018-05-22 22:20:38 +02:00
Translation updater bot 3640f87085 Localisation updates from https://translatewiki.net.
Change-Id: I9056184ec924f3fa96031ba318041de48470fc3a
2018-05-20 22:44:17 +02:00
Umherirrender 2e4222bd04 Remove reference to archived InlineEditor
Change-Id: Ie549357942a321962e5886c767d36975074f6cb6
2018-05-17 19:24:39 +02:00
Thiemo Kreuz 0fe9dbb366 Don't expect objects by reference in hook handlers
The motivation for this patch is to make the code less complex, better
readable, and less brittle.

Example:

public function onExampleHook( Parser &$parser, array &$result ) {
    /* This is the hook handler */
}

In this example the $result array is meant to be manipulated by the
hook handler. Changes should become visible to the caller. Since PHP
passes arrays by value, the & is needed to make this possible.

But the & is misplaced in pretty much all cases where the parameter is
an object. The only reason we still see these & in many hook handlers
is historical: PHP 4 passed objects by value, which potentially caused
expensive cloning. This was prevented with the &.

Since PHP 5 objects are passed by reference. However, this did not
made the & entirely meaningless. Keeping the & means callees are
allowed to replace passed objects with new ones. The & makes it look
like a function might intentionally replace a passed object, which is
unintended and actually scary in cases like the Parser. Luckily all
Hooks::run I have seen so far ignore unintended out-values. So even if
a hook handler tries to do something bad like replacing the Parser
with a different one, this would not have an effect.

Removing the & does not remove the possibility to manipulate the
object. Changes done to public properties are still visible to the
caller.

Unfortunately these & cannot be removed from the callers as long as
there is a single callee expecting a reference. This patch reduces the
number of such problematic callees.

Change-Id: Ib3a9da257b50326d569ab1973b523c952963c16b
2018-05-17 17:09:55 +00:00
Translation updater bot 9c2789ca6e Localisation updates from https://translatewiki.net.
Change-Id: Iba93fe20dc568ccf33dff04bcc5e3f6fbef738e7
2018-05-16 23:07:37 +02:00
Translation updater bot ddcd9e644a Localisation updates from https://translatewiki.net.
Change-Id: I6c0ddba62a4ec75192123b9c9a685ce21be1632b
2018-05-15 22:24:26 +02:00
Thiemo Kreuz 8a42f61697 Remove all default "return true" from all hook handlers
This is the default for many years now. Returning true does nothing. It's
identical to returning nothing (null). The only meaningful value a hook
handler can return is false, and even this is meaningful only for very
few hooks.

TL;DR: A "return true" in a hook handler is always meaningless, dead code.

I'm interested in this because we (WMDE) might start working on this
extension soon and I want the code to be small and easy to maintain.

Change-Id: If4f32a55cdc38a3cc8af286d1cca7c0089bbfc43
2018-05-15 10:43:23 +02:00
Translation updater bot 440d3678e8 Localisation updates from https://translatewiki.net.
Change-Id: Ibf12746b038b4424107565fa2d423cc55bc61638
2018-05-14 22:44:11 +02:00
jenkins-bot 1629de5222 Merge "Use MWPreviewElement in view mode, instead of building a view node" 2018-05-14 09:27:50 +00:00
Translation updater bot c97dcc221a Localisation updates from https://translatewiki.net.
Change-Id: I61973e8c86c466095d1193a5c240f9807a31bd61
2018-05-13 22:17:53 +02:00
Ed Sanders 475d825918 Use MWPreviewElement in view mode, instead of building a view node
Also "unwrap" paragraphs using CSS instead of DOM manipulation.

Change-Id: I5565c2c43580d5d47bc65ee06d9d14fccace90c6
Depends-On: Ibbf989dcebf2d21fd2ac481f17062f366ff29e41
Depends-On: I284bcd5dd25cdbb883427ebacb41af1bbf50b60f
2018-05-13 20:01:19 +01:00
Ed Sanders a08febb0af Simplify toolbar registration
VE-MW toolbars now define a placeholder for reference toolbars.

Depends-On: I0bace5e5fe05f9c214d57a74c478b48a7dcaec3b
Change-Id: I7cb0f1f1affbfd7a4013f396b1423b6f84da52ab
2018-05-12 16:42:08 +01:00
Ed Sanders bc20690b88 Give Cite a version number
This allows other extensions to depend on it (e.g. Citoid).

Change-Id: I27eba2c693cad98ee2a854ac7a52329e19d2fa71
2018-05-12 13:28:50 +01:00
jenkins-bot fc0fd39389 Merge "Use ve.ce.nodeFactory.createFromModel" 2018-05-11 19:32:59 +00:00
Ed Sanders 2ae4cfe0ab Use ve.ce.nodeFactory.createFromModel
Also use ve.dm.nodeFactory.createFromElement

Depends-On: I259face33154b795143c8820abdfb6b4a495f141
Depends-On: I7fc539f75a1c9d672efc139b7884ecdfdff5f301
Change-Id: I032182616c409e65138b16fe7b238e7f7b3a8710
2018-05-11 17:08:12 +00:00
Translation updater bot a852fee21b Localisation updates from https://translatewiki.net.
Change-Id: I534fdcb01f79036b4bb29e400ebe1bb2b23a81e8
2018-05-10 22:20:22 +02:00
Translation updater bot 9e9a23add4 Localisation updates from https://translatewiki.net.
Change-Id: Iccef4a5f068d266f56ed73e3735bd0c9be03a248
2018-05-08 22:19:42 +02:00
Translation updater bot 54c889b4c2 Localisation updates from https://translatewiki.net.
Change-Id: I25634cea0854ffb10a9942a59c407c9965b6b9fd
2018-05-06 22:22:01 +02:00
Translation updater bot d3b4d73201 Localisation updates from https://translatewiki.net.
Change-Id: Id19a881da2e6b70783b40d6fb52386bef2670e0a
2018-05-05 22:14:25 +02:00
Translation updater bot f5c07a40b7 Localisation updates from https://translatewiki.net.
Change-Id: I415dc8c4f86f22defca2dc364093ef31a086b749
2018-05-04 22:14:35 +02:00
Translation updater bot 7e45271f56 Localisation updates from https://translatewiki.net.
Change-Id: I02b760d6e176e114a0306d169829cfe4497037f7
2018-05-03 22:20:57 +02:00
Translation updater bot 142ea1ebf1 Localisation updates from https://translatewiki.net.
Change-Id: I3851beadeb78ef407be7914704fd4a41bb661787
2018-05-02 22:16:15 +02:00
jenkins-bot cfd18814be Merge "Support directionality for reference" 2018-05-02 15:59:33 +00:00
Eranroz 1ca27aa0d8 Support directionality for reference
Adding option for dir attribute in ref tags. The value must be a valid
direction ('ltr' or 'rtl', case insensitive) or the direction will be
stripped out.

The directionality of the li element is set using a css class accordingly.

Bug: T15673
Change-Id: Iff480bc8cc4f81403b310e8efecd43e29d1d4449
2018-05-02 17:27:32 +02:00
Translation updater bot 8620028e60 Localisation updates from https://translatewiki.net.
Change-Id: I672671ba8e1584da97f8446fa8acfdc8de0e49a0
2018-05-01 22:11:43 +02:00
jenkins-bot d85b33b04a Merge "CiteDataModule: Remove origin restriction" 2018-04-30 20:35:21 +00:00
Translation updater bot 0d74043505 Localisation updates from https://translatewiki.net.
Change-Id: If10cbb1ce592547e0883038e285319e370ad156c
2018-04-30 22:21:50 +02:00
Bartosz Dziewoński 2e35d29223 CiteDataModule: Remove origin restriction
Without this change it would no longer load in safe mode (T185303)
because the module would be missing.

I think this has been copy-pasted from VisualEditor, see commit
I6d097ccbf1dc2462843219adcf96bf8313e30289 there for explanation.

Bug: T185303
Change-Id: I6f6857ec50e7b8c6e25022024c29b59726c656e3
2018-04-30 22:18:06 +02:00
Jforrester 2e13427f3d Merge "Don't compute ref contents in converter preview mode" 2018-04-30 16:57:03 +00:00
Ed Sanders 8487745c55 Don't compute ref contents in converter preview mode
Depends-On: I0f1b90056e9d1a4fa0e188700604709297593924
Change-Id: I7f98d7b6609c896f91a6d256d58aeb2ff53bc181
2018-04-30 17:47:43 +01:00
Translation updater bot 453c5df55f Localisation updates from https://translatewiki.net.
Change-Id: I825b023507cb27b4cb310eb96dc3330791dd56d1
2018-04-29 22:30:54 +02:00
Translation updater bot 649f6aef43 Localisation updates from https://translatewiki.net.
Change-Id: Id14ee5cda0819d58f0ef9a8211eb6cc92579f586
2018-04-28 22:32:38 +02:00
Translation updater bot f14bf7b221 Localisation updates from https://translatewiki.net.
Change-Id: Ib6edbc5e056e2661cb4ccd3593467ed96b4fd97a
2018-04-27 22:25:45 +02:00
Translation updater bot 7085c2f164 Localisation updates from https://translatewiki.net.
Change-Id: Ie1281820e84a0655687b0b5be5cd05295f589f89
2018-04-26 22:16:23 +02:00
Translation updater bot 94bd5039c3 Localisation updates from https://translatewiki.net.
Change-Id: Ibe0641c846753a50feef5d1f15284a407c28b9c3
2018-04-25 22:38:24 +02:00
Translation updater bot facded5c61 Localisation updates from https://translatewiki.net.
Change-Id: I08fa1a1ef7bb0f4a78cc2ca010612d537f92cf68
2018-04-24 22:22:23 +02:00
Translation updater bot 8f443aac8b Localisation updates from https://translatewiki.net.
Change-Id: I9dcecdb89e1b2e5d13d9050e9ea24fd82cd033d8
2018-04-23 22:30:20 +02:00
Translation updater bot 4fdf58cd5d Localisation updates from https://translatewiki.net.
Change-Id: I940bd06b112d6c1da8224c67721f58c11c070608
2018-04-22 22:21:34 +02:00
Translation updater bot afa5a2dbb4 Localisation updates from https://translatewiki.net.
Change-Id: I0188965ba07e203ecb343c26c08f91e1e94810e6
2018-04-19 22:13:38 +02:00
jenkins-bot 0823427cbd Merge "Clean up backwards-compatibility code" 2018-04-19 00:42:20 +00:00
MGChecker 5ca090c67d Clean up backwards-compatibility code
Since Cite requires 1.25+ now, the checks for PPFrame::setVolatile(),
which was introduced in 1.24, can be removed.

Change-Id: I91df2e91b2f7a21b2b1147aa6af194980527f86b
2018-04-18 22:26:54 +02:00
Translation updater bot 35fc1465f1 Localisation updates from https://translatewiki.net.
Change-Id: I43531692007e84350df604348898d6c678cd230b
2018-04-18 22:10:34 +02:00
Translation updater bot 20e26df4fc Localisation updates from https://translatewiki.net.
Change-Id: Id7b9eb4356ed196f59a5f641d7d93bb0caf9ec59
2018-04-17 22:24:57 +02:00
Translation updater bot 9f85546d71 Localisation updates from https://translatewiki.net.
Change-Id: I79d2a787f803d006604b4f0a8ae4da25332e19c3
2018-04-15 22:23:19 +02:00
Translation updater bot 93119f7c59 Localisation updates from https://translatewiki.net.
Change-Id: I538628d8b20ae8b81b3b246ef216a0a1532babb2
2018-04-14 22:13:46 +02:00
libraryupgrader 992c5898fe build: Updating mediawiki/mediawiki-codesniffer to 18.0.0
Change-Id: Idb97d720b19159bd1e1961c7ad838bf04c8e00f2
2018-04-13 22:53:31 +00:00
Ed Sanders b8a9115d27 Use resource loader for icons
Change-Id: I6614d2b33936e4e4f04412b76df67dc5554bf3f7
2018-04-11 17:56:19 +01:00
Translation updater bot bfa7799761 Localisation updates from https://translatewiki.net.
Change-Id: I37625ae1250438f0920c816e31ea1a26ac8e47c4
2018-04-09 23:16:48 +02:00
Translation updater bot b784b82417 Localisation updates from https://translatewiki.net.
Change-Id: I240a986476691ae38be7f8b75c567fcdf011f09f
2018-04-08 22:29:44 +02:00