Commit graph

1911 commits

Author SHA1 Message Date
Translation updater bot d341b4e325 Localisation updates from https://translatewiki.net.
Change-Id: Ibeab97e3fe899c2e7df9edbecfda31ea7e27c5c1
2015-06-09 22:45:49 +02:00
jenkins-bot 46c8abdfd2 Merge "Merge MWDbEchoEmailBundler into MWEchoEmailBundler, remove abstraction layer" 2015-06-08 21:53:43 +00:00
jenkins-bot 51789ccf5f Merge "Use intval() to make string concatenation in DB query less scary" 2015-06-08 21:50:25 +00:00
jenkins-bot 1b2af79634 Merge "Merge MWDbEchoEmailBatch into MWEchoEmailBatch, remove abstraction layer" 2015-06-08 21:50:09 +00:00
Kunal Mehta 58b7cc7cfd Use intval() to make string concatenation in DB query less scary
Change-Id: I51d7744b8c7f967e47777b5f3a6e491f4e65f5c8
2015-06-08 14:36:08 -07:00
Translation updater bot 6cf6e77d82 Localisation updates from https://translatewiki.net.
Change-Id: I504d60a80231f6f2fcec1a48f84943868b09673c
2015-06-08 21:54:52 +02:00
Kunal Mehta 07da9c2e41 Merge MWDbEchoEmailBundler into MWEchoEmailBundler, remove abstraction layer
Change-Id: Ifc05f1d03d1dde79d5c788ee7417ed0cec43155f
2015-06-08 11:58:06 -07:00
Kunal Mehta 24cd62e322 Merge MWDbEchoEmailBatch into MWEchoEmailBatch, remove abstraction layer
Change-Id: Ib1ae17326443d2143346bcd2e4204defa2dab4c3
2015-06-08 11:54:25 -07:00
Kunal Mehta 9d08c96fad Move all PHP code into includes/
Mainly because I was annoyed at m<tab>o<tab>d<tab>u<tab> to reach
modules/.

Change-Id: Ib149cb2e2612ccddd0503f9d0c5d05b554860a00
2015-06-07 18:54:14 -07:00
Kunal Mehta 78dc653c80 Remove dead dismiss code
mw.echo.setUpDismissability was removed in 08fc83b6de, and will
never be called since the class is never set.

Change-Id: I1e13bbabaeb7df21c161d4cf4205a1564e1d81d9
2015-06-07 18:30:49 -07:00
Kunal Mehta 70d95fbad0 Use mw.Api.postWithToken to automatically re-try badtoken errors
Bug: T101664
Change-Id: I93188099e24102b47384c08113e8dbd26dac8df1
2015-06-07 18:11:48 -07:00
Kunal Mehta 7a196ce358 Remove pre-MW 1.22 compatability code
Change-Id: Ia59464f4a9a5589d84e5028cdabb33aa95df4209
2015-06-07 17:34:26 -07:00
Kunal Mehta 0919b01e75 Pass uselang=user to the API instead of figuring it out client side
Change-Id: I09add693567af577c14c646d2b6b943716e0522e
2015-06-07 17:30:00 -07:00
Kunal Mehta 10cd92a326 ext.echo.special depends upon mediawiki.api
Change-Id: Iabcfd263ae8cb857d767ea9b6af0480d67bf3d2d
2015-06-07 17:27:32 -07:00
Translation updater bot a0cf14cad8 Localisation updates from https://translatewiki.net.
Change-Id: I8553c9d44c71c5ac3de595b1c43fdff333afb900
2015-06-07 22:27:28 +02:00
Translation updater bot 1564aa95a0 Localisation updates from https://translatewiki.net.
Change-Id: Ia7660ab18517dfb12c45b7e539d27301dc85d302
2015-06-06 22:16:40 +02:00
Kunal Mehta e2eee93c4d build: Updating development dependencies
* grunt-contrib-csslint: 0.2.0 → 0.4.0
* grunt-contrib-jshint: 0.10.0 → 0.11.2
* grunt-banana-checker: 0.2.0 → 0.2.2
* jshint: ~2.5.0 → 2.8.0

Change-Id: Ibb94cf3d1d4cc71d9342165fd9b6c4ad18d58f07
2015-06-05 17:14:09 -07:00
Translation updater bot 838cd1ed73 Localisation updates from https://translatewiki.net.
Change-Id: I69201c362e5cc46d419c4b95668fabeedfb92c3f
2015-06-05 21:01:45 +02:00
Translation updater bot 49f4e715e1 Localisation updates from https://translatewiki.net.
Change-Id: Iac4d2ba00cc8ae88ba6198d85e14862538469910
2015-06-03 22:10:12 +02:00
Stephane Bisson 5b72b9f026 Fix new talk page message notification
* Do not default section to footer. If the section
  is not found, it is left empty and the notification
  message is simpler.

* Change notification-edit-talk-page-email-batch-body2
  Replace : at the end with . so it does not look
  incomplete.

Bug: T99989
Change-Id: Ic982a81eada388d750760787245dea8f72368147
2015-06-03 13:17:57 -04:00
Kunal Mehta 9fd265d54b The job queue does not run against multiple wikis at once
...because that would be crazy.

Also fix return documentation.

Change-Id: I38c06767f4e53bafff19b4f0819158939ef264c0
2015-06-01 19:26:06 -07:00
jenkins-bot 64b66712c5 Merge "Make processEchoEmailBatch check that Echo is actually enabled before doing anything" 2015-06-02 01:16:16 +00:00
jenkins-bot 14f663e847 Merge "Don't depend on global grunt install" 2015-06-02 01:07:31 +00:00
Kunal Mehta cd1885e3b7 Don't depend on global grunt install
Change-Id: Iadc396247410688b58281bfe43df1888e0a16f83
2015-06-01 18:04:14 -07:00
jenkins-bot e6ffb55eaf Merge "Use "elseif", not "else if" in PHP" 2015-06-02 01:01:54 +00:00
Kunal Mehta 4d52bc2534 Use "elseif", not "else if" in PHP
Change-Id: I3a84f1c3ec9d4522f5f7f461a680561c8aeda29e
2015-06-01 17:59:05 -07:00
Kunal Mehta 70761a124c Cleanup LoadExtensionSchemaUpdates hook
* Use standard "on{hook}" naming pattern
* Skip hook if using an external database server ($wgEchoCluster)
* Don't return true, it's not necessary anymore

Change-Id: I488e4636f9499c468b870966614b0762c2ade8ea
2015-06-02 00:55:54 +00:00
Kunal Mehta 0e6976f536 Require Resources.php in entry point
Extension loading should fatal and stop if Resources.php cannot be loaded.

Change-Id: I62f3095438e3702e0a41e1a4ad6721ec31f432fc
2015-06-02 00:55:50 +00:00
Kunal Mehta d9e2695c7b Don't pollute $GLOBALS in Resources.php
Get rid of $mobileReadyTemplate, it's only used once now, and unset
$echoResourceTemplate after usage.

Change-Id: Ie371a6c1545383b8be1c0b99730228da6e381650
2015-06-02 00:55:44 +00:00
Kunal Mehta c78e5202e8 The OBOD is orange
c.f. https://meta.wikimedia.org/wiki/OBOD

Change-Id: Ib3efe9ea59d1b955be86e56cfa8841c2c4daedb6
2015-06-02 00:55:36 +00:00
Kunal Mehta c2258dd7ce Kill $wgEchoCohortInterval
The Echo cohort study was finished in July 2013 and hasn't been used
since. The code was also checking in reverse order, for example it
checked registration before checking whether the survey was still
active.

EchoHooks::isEchoDisabled() was removed, and all callers were checked to
make sure they were also checking for anonymity.
EchoNotificationController::doNotification() will throw an exception if
the user is anonymous, since it shouldn't be possible to get an
anonymous user into that code path.

Bug: T101047
Change-Id: Iada2f6d2066c0f6bba5cc58aeb03d687632ac5a4
2015-06-01 17:53:29 -07:00
Translation updater bot 968af60d70 Localisation updates from https://translatewiki.net.
Change-Id: Id81d7535e518b4dc700df86c188a5349b7ce81e0
2015-06-01 22:52:01 +02:00
jenkins-bot 956a3c608a Merge "Standardize doc spacing" 2015-06-01 19:26:23 +00:00
Matthew Flaschen 96c0bed332 Standardize doc spacing
Change-Id: I478da2a0ca37e42ad6a7af77082fa6f1ef61bade
2015-06-01 15:22:59 -04:00
Kunal Mehta e11fa6e094 Kill $wgEchoBackendName
All uses of $wgEchoBackendName were hardcoded to 'Db' and removed.

This exposed a interesting bug in MWEchoEmailBundler which was
instantiating a subclass using the parent class's private constructor, a
"feature" of PHP which is supported in 5.2.6+ (http://3v4l.org/h4Mq3).
While it worked, PHPStorm complained about it so I made the constructor
protected, which makes more sense anyways.

Both EmailBatch and EmailBundler need further refactoring, but that will
be done in follow up patches.

Change-Id: I2032f5b2f4f3a62f830cc5344b25a92074bd0c61
2015-06-01 12:13:11 -07:00
Kunal Mehta 94dd86f255 Simplify registration of EventLogging modules
Let EventLogging register the schema modules by using the
EventLoggingRegisterSchemas hook.

Don't modify $wgResourceModules at run time because that's a hack.
Instead register the module in the ResourceLoaderRegisterModules hook
itself.

Change-Id: I9457546c1ec38cf6896fe6f9f445fe1191afe72a
2015-06-01 11:58:37 -07:00
Kunal Mehta 1d4bf45d88 s/wfRunHooks/Hooks::run/
Change-Id: If26de025b0510027c8f1ba514a797c343a575d78
2015-06-01 11:36:35 -07:00
Kunal Mehta 5e4fc8661e Remove todo that we're not going to do
Echo should not care about the job queue backend, that's MediaWiki
core's responsibility.

Change-Id: I29c349e0fedec31a3ad0f28e020849778e155c00
2015-06-01 11:33:44 -07:00
Translation updater bot 1886884006 Localisation updates from https://translatewiki.net.
Change-Id: I003edd16eaf3071d5f7c0a2b3a8c421f9b049e86
2015-05-31 22:11:36 +02:00
Alex Monk 6157c1e7bb Make processEchoEmailBatch check that Echo is actually enabled before doing anything
Like CentralAuth does in createLocalAccount.php. In large wiki clusters where
you want Echo on for some wikis and not others, but don't want to keep a list
of Echo wikis (say, you want to make it on by default), this makes it possible
to safely run the script even on wikis where Echo is not enabled, where it will
just do nothing.

See also Ibde4c0c1, I741d2485

Bug: T59375
Change-Id: I3537206fccb459eb80de9fd61d2213dfb525c5f0
2015-05-31 13:25:37 +01:00
Translation updater bot 405707dfc4 Localisation updates from https://translatewiki.net.
Change-Id: Ic258345f4acd7d5865072922a9cd0b5273b13922
2015-05-30 23:06:43 +02:00
jenkins-bot 363851fa51 Merge "Allow new notifications to be created with old timestamps" 2015-05-28 19:42:57 +00:00
jenkins-bot 5bcdfc6607 Merge "Maintenance script sends notifications immediately" 2015-05-28 07:58:23 +00:00
Erik Bernhardson bb6e7da386 Allow new notifications to be created with old timestamps
Bug: T93109
Change-Id: Ib9596cc058871a6b27cca7a809efc6b1ca75dfb0
2015-05-27 15:15:59 +02:00
Stephane Bisson 3bfa823922 Maintenance script sends notifications immediately
Update the "processEchoEmailBatch" to allow sending all
notifications immediately even if configured to be
daily or weekly.

Change-Id: I6ebeea86708247700d1950e0f6471c7b3d1fecd2
2015-05-27 14:02:51 +02:00
paladox 2e59b04866 Remove i18n shim
Change-Id: I180cbbced3a9bab95baa37a7a6fc25870e8a6bbf
2015-05-27 10:55:20 +01:00
Translation updater bot 964e93f968 Localisation updates from https://translatewiki.net.
Change-Id: I4ff1399e435cb49412dfaedf03e0f0a82cdddfc9
2015-05-26 22:22:01 +02:00
Ori Livneh e79fb20599 Always assume a prefix-length of one.
Update Echo for I1bf1b8e6d: Make the output of UnifiedDiffFormatter match diff -u.

Change-Id: I00435a019753f639155df6572844c7112d717186
2015-05-26 04:32:00 +02:00
Translation updater bot b0a31a0648 Localisation updates from https://translatewiki.net.
Change-Id: I3c19bb7fb202a17273d102fbe000ecbd7cdf9447
2015-05-25 22:27:28 +02:00
Translation updater bot f48e9dc8b2 Localisation updates from https://translatewiki.net.
Change-Id: I4ae5914d504ffbf04878db58e40bb1f0195f9a66
2015-05-24 22:59:01 +02:00