Commit graph

156 commits

Author SHA1 Message Date
Derick Alangi 8e5aa13a73 Remove usage of deprecated Revision class in Echo
Class Revision is deprecated and in this patch, replaces
usage with appropriate classes; RevisionRecord, RevisionStore,
etc.

Bug: T221163
Change-Id: Icfc85167a636bef95daab236ab80113c1a3cf41b
2019-05-08 19:50:58 +01:00
Derick Alangi c4890ca86f Remove usage of deprecated database access code from Echo
Bug: T221164
Change-Id: Ib7cfe384f4104dbaeed5ba6659e81555eb810f97
2019-05-07 20:46:07 +00:00
Roan Kattouw 325708e536 removeOrphanedEvents.php: Also remove echo_target_page rows
Remove echo_target_page rows associated with the echo_event rows we're
deleting, and also add a separate pass that removes any remaining
orphaned echo_target_page rows (this can happen if the script was run on
the wiki before this logic was added).

Bug: T221261
Change-Id: Ic3b590fb3ac3de4c2e38877d26944367b177235a
2019-04-22 16:01:02 -07:00
jenkins-bot 1454df1ebe Merge "Add maintenance script to recompute notification counts" 2019-04-17 00:24:41 +00:00
Roan Kattouw 754ec9ef11 Add maintenance script to recompute notification counts
Generally applicable, but intended for users affected by the
login-success phantom notifications bug.

Bug: T220762
Change-Id: Ica428bfc19e0555564ca04d80ac5009197401aaf
2019-04-12 17:48:01 -07:00
Roan Kattouw df068ba075 removeOrphanedEvents.php: Don't remove events waiting to be emailed
echo_notification isn't the only table that refers to echo_event;
echo_email_batch does too, so check it as well.

Change-Id: I6663c8bb83a991ee663eb1616583fde8eee46751
2019-04-12 15:33:57 -07:00
Daimona Eaytoy e21e3b4a8d Add phan
Change-Id: I65ae6adc10941c05a2646e551b1baa829e4e8654
2019-04-10 18:51:59 +02:00
jenkins-bot ae11ff1e45 Merge "Fix generateSampleNotifications.php" 2019-04-05 10:59:48 +00:00
Matěj Suchánek 0d892bfae1 Fix generateSampleNotifications.php
- Wikibase is not loaded via ExtensionRegistry, yet.
- Add missing extra parameter 'entity'.

Change-Id: I6e7c989fb366b75b838327a9326856459c64987e
2019-04-05 11:07:38 +02:00
Max Semenik f055f30f86 Use addDescription() instead of accessing guts directly
Change-Id: I767cbb9969c90b645e6a94ee49b2fe2352001fd8
2019-03-26 22:07:48 -07:00
Jayprakash12345 84254318a6 Use getText() instead of getNativeData()
Bug: T155582
Change-Id: I026e0a2b309f24b6b82ec51514b26bcdbe73d957
2019-03-22 20:37:04 +00:00
Roan Kattouw ae75a8118a Remove notification_bundle_base
No longer used in the new bundling system.
Also removes indexes that contain bundle_base.

Bug: T143763
Bug: T131415
Change-Id: Ibf94cdc471a11cb14995fee6a55af0d227b50aa5
2019-03-04 13:22:17 -08:00
Roan Kattouw b73522549d Migrate and remove event_page_namespace and event_page_title
By running updateEchoSchemaForSuppression.php as an updater.
The patch-*.sql files already existed, they were added
in 2013(!) by 34fbeaf8c but never applied.

Bug: T136427
Bug: T50059
Change-Id: Ied049681df4bab325f069c3a68cf704ee9a8f2c9
2019-03-04 13:12:52 -08:00
Umherirrender 833731c572 Remove non-functional maintenance script testDiscussionParser.php
It is calling an undeclared function, I have not found it in older
version of that class.

Change-Id: Ia9a432e1b90c76e8f1295c0afe4d12817bc232ae
2019-03-03 16:46:17 +01:00
Umherirrender 42f153caf5 Use ::class for class name resolution
Available since php5.5

Change-Id: I8ea594e59784bfe68911fb0b138f359a0e6b4d54
2019-03-03 15:14:15 +01:00
Thiemo Kreuz 8fd66d4281 Make use of the …::class feature in production code
This codebase already used the …::class feature a lot. This is more
about making the code consistent and easier to refactor in the future.

Change-Id: If5b2456b825aae753ed97445160ec191c18df8e3
2019-02-20 19:13:54 +00:00
Thiemo Kreuz e649551e5e Simplify a few overly complex code snippets
* preg_match_all already returns the number of matches. We can just use
  this number instead of counting it.
* Checking for a strlen() of 0 is a little tooo expressive, because we
  don't really care about the actual length of the string.

Change-Id: I0537a7740e5d369b79364f24aecf71c4e8fa7db1
2019-02-19 20:39:26 +00:00
Thiemo Kreuz 8d7fc8c66a Avoid expensive array_shift where possible
array_shift manipulates the original array. This is surprisingly
expensive, because it iterates *all* elements in the array and
decrements numeric keys. The code touched in this patch does not need
this restructured new array, but only the individual elements.

Change-Id: I166fdbe199400611a21cbd608dd3e177336c8fd5
2018-12-17 11:46:02 +01:00
Stephane Bisson 1d299ed58b Sample notifications: improve existence check and logging
Use the ExtensionRegistry instead of checking the existence
of a specific class to know if an extension is installed.

Improve logging, including line break, when an extension
is not installed.

Change-Id: Ia81194392ffc65abc8ad150b36b468315a1a67c3
2018-11-02 11:14:21 -04:00
Roan Kattouw de536d09d9 Make notifyAgent a per-type property rather than per-event
Specify which notification types allow notifying the event agent in
$wgEchoNotifications, and stop specifying it in the event_extra data.

Putting 'notifyAgent' => true in event_extra will still work, but is
discouraged.

Change-Id: I4f558654ec23757dd4ecd6986eb3e9a5593f5386
2018-10-29 15:41:51 -07:00
Aaron Schulz deb5057dc6 Avoid use of IDatabase::update return value
Change-Id: I7f3a0f169cfac9190b796b45aabb1b9cb7670a9d
2018-10-26 12:41:49 -07:00
Thiemo Kreuz 611d1610dd Simplify testDiscussionParser code
I found this code while looking for possibly problematic count()s.

I noticed the line "$user = $pageData['revisions'][0]…", which means
the code assumes element [0] is always there. Therefore I droped the
"count() == 1" check.

The other count() got replaced with an isset().

Change-Id: Ic582c85d07db0cbed56512e3e381120b628f2288
2018-10-25 19:23:07 +00:00
Thiemo Kreuz 8c51f5bd45 Avoid count()ing where not necessary
If all the code needs to know is if an array is empty or not, using
count() creates more confusion than anything.

Change-Id: I253308505fe5af5b5c56d85169789271967298ba
2018-10-19 10:04:24 +02:00
Umherirrender 2cd8d9d0eb Split long lines over 140 chars
This makes the code easier to read even on big screens

Change-Id: I14bfb97b2986f389ad11a6ddc97ba61468774782
2018-08-25 12:51:14 +02:00
Umherirrender a0ad95b63f Split long lines over 200 chars
This makes the code easier to read even on big screens

Change-Id: Iebc2ca785690abc6e7998c6f6078daf0bd01ccf8
2018-08-23 10:33:25 +02:00
Umherirrender 910308f02a Remove [] from optional param doc
Change-Id: I6d6cf538b986e0fe7ec8c9f7a6279f8e1f7023a9
2018-08-07 08:28:28 +02:00
Moriel Schottlender 592bc476b2 Add timestamps to generated notifications
Add the ability to create notifications with specific timestamps
when generating notifications through the maintenance script.

Note, that not all notifications can be given specific timestamp;
only notifications that do not involve a direct editing action
will be given this timestamp and their events will be created
as if the actions were taken at the given timestamp, with
1 minute intervals.

Change-Id: I9e6b8660178ca0734979946c8e6ec8d43fc3de41
2018-06-27 11:16:22 -07:00
Thiemo Kreuz d04b3f2710 Make use of PHP's …::class feature
Change-Id: Ifbb70f7b9d54e2e2bb713c8a13668344ac880a72
2018-06-19 18:11:23 +00:00
Roan Kattouw d0714b2928 NotifUser: Simplify function signatures for getNotificationCount() and friends
The $cached and $dbSource parameters are now unused, so remove them.
This affects get{Notification,Alert,Message}Count and
getLastUnread{Notification,Alert,Message}Time.

There are some callers in other extensions and in skins, but none of
them pass any parameters (except one, which I fixed in Ice42930280da).

Change-Id: If6f10c4f163ecb1def5a150656a60d1ab5f44d52
2018-06-05 01:07:23 +00:00
Umherirrender b2b6d8b420 Change DO_MAINTENANCE to RUN_MAINTENANCE_IF_MAIN
As suggested in 26505b170adb24a6ae68945920db322c9382e470 for better
readability. Also the sniff now knows about the maintenance script

Change-Id: If3ab122c1fc12fcfbce777881ca21ecd99fb2a70
2018-03-17 21:55:20 +01:00
Stephane Bisson ca27299f51 Format user-rights reason as plain text
Format user-rights reason as plain text
in both web and email since links
in notification body are not supported.

Bug: T172636
Change-Id: Ief5ff0aff18aad070f4388e075b5aae072d8f101
2018-01-09 08:41:21 -05:00
Amir Sarabadani 30a5b88ea1 Use ExtensionRegistry instead of class_exists
Bug: T183096
Change-Id: I963704cdcfdbc97727f435eb16998c16c692ed01
2017-12-29 00:12:30 +01:00
jenkins-bot 0c5694802b Merge "Update for deprecation of selectFields() methods" 2017-10-30 23:20:37 +00:00
David Barratt 019d10b69d Use centralIdsFromNames() method to get central ids.
The centralIdsFromNames() includes optimizations and error checking
that was not in the original version.

Bug: T178313
Change-Id: I3d6334f2e81f3cee66b36690734f70958fdcefdb
2017-10-16 18:14:31 -04:00
Brad Jorsch 93136b71ac Update for deprecation of selectFields() methods
Various selectFields() methods were deprecated in MediaWiki core change
Idcfd1556, replaced with getQueryInfo() methods.

Change-Id: I5d62ad76fdb64a9c6efd228f27e9b5f512f17d5e
Depends-On: Idcfd15568489d9f03a7ba4460e96610d33bc4089
2017-10-12 16:04:15 -04:00
Antoine Musso 2034f73f33 updatePerUserBlacklist wfWaitForSlaves()
Commit a live hack. Master branch would have to be updated.

Bug: T173475
Bug: T177437
Change-Id: I80bec4ed0d92e04eed311b4e0d906ead7432abe8
2017-10-09 20:09:43 +00:00
David Barratt a7cc2c4827 Use main Database Connection for Maintenance Script
To access user_properties in the WMF cluster, we must use the standard database connection instead of the echo connection.

Bug: T173475
Change-Id: Ic7344e4521b30055f7986aefd61712e6c6a0052c
2017-10-05 16:45:02 -04:00
David Barratt 3ba76f7faa Use User Ids instead of User Names for Echo Mute
The echo mute list uses user names which are not stable. User ids should be used instead.

Bug: T173475
Change-Id: I947bcf37a8f85aaa105776d368dbd0ab76823aeb
2017-10-02 19:39:40 -04:00
libraryupgrader 7a23ddf4b0 build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Change-Id: I7b19fab3b1100c4973600ec95ee24160e141c5ac
2017-09-24 09:49:43 +00:00
Kunal Mehta aaf061c725 build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.ExtraParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle
* MediaWiki.FunctionComment.Missing.Protected
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: I8401abf121a7413fa191d7bc535e0ddd6cf8c3f7
2017-06-22 14:13:28 +00:00
Stephane Bisson 577d6b39b8 Fix generation of sample 'reverted' notifications
Follow-up to Id539a7db8d8f5e902177845bd212b4d6c2500f89

Pass the revision id instead of populating the request
object.

Change-Id: I4567d8b08999558d86c48aea5912de0e52bcf241
2016-12-21 12:29:04 -05:00
James D. Forrester 8c810dff48 build: Update mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: I25cb61b3b92798f1259d1575a336e2b056d5764f
2016-12-05 15:54:30 -08:00
Justin Du a0fe35a95d Update Maintenance scripts to use $this->requireExtension()
* Also added $this->mDescription to removeInvalidNotification

Bug: T152139
Change-Id: I146405a3b6e81680b0ee1fb081486170d914a2b1
2016-12-05 15:54:30 -08:00
Reedy 0cf447f20c Replace ArticleSaveComplete hook usage
Bug: T147559
Change-Id: Ia020095ff17c993b579ada9717bf1feb43ddb8ff
2016-10-06 17:23:09 +01:00
Stephane Bisson b3c07eedeb Remove etp_user
Target page entries used to exist for each user
that was notified for an event. They were
removed as the notifications were marked as read.

Now they remain so that the association between
pages and events can be used for moderation
regardless of the notifications read status.

This patch removes everything about
echo_target_page.etp_user from sql and php code.

Bug: T143959
Change-Id: Ib57510e6b0e9202a7e035f8ea59955dca8a0b24a
2016-09-09 09:32:28 -04:00
Matěj Suchánek 23f243a9a6 Generate sample notifications for Wikibase
Bug: T110604
Change-Id: I6e6817f80bbf8a8c28cfa59efdf424f736bb4e33
2016-08-04 16:49:06 +00:00
Stephane Bisson c24e029378 Generate sample notifications: Education Program
Change-Id: I1ca832d181ba8704a200fee78a84b3ec70106bed
2016-07-29 11:52:17 -04:00
Stephane Bisson c62c334ee2 Generate sample events: add 'reason' to user-rights
Change-Id: I7f8370816f57f26aafde7d46ea36253f7f4ee96e
2016-07-28 16:56:23 +00:00
jenkins-bot 68f8f589a3 Merge "Generate notifications: fix rollback session failure" 2016-07-19 21:23:15 +00:00
Matthew Flaschen ed626af0ad backfillUnreadWikis: Skip updateCount if race condition detected
Related doc fixes

Change-Id: I1b7545d2f86ec87e9701811ac5f4db0fec690681
2016-07-18 20:58:48 -04:00
Stephane Bisson 4e8e5a794f Generate notifications: fix rollback session failure
Change-Id: Ifbd90549accdbd0edeb979d27583e8f03f1366e5
2016-07-12 09:20:58 -04:00
Matthias Mullie 620d50f23f Change wfWikiId (lowercase d) to wfWikiID (uppercase D)
PHP can handle incorrect capitalization, but we should use the correct function
name.

Change-Id: I6db9bb90a8573f65cde503b771c9539faf38e75e
2016-06-29 15:11:21 +02:00
jenkins-bot 2eabf079f8 Merge "Clean up and fix updateEchoSchemaForSuppression.php" 2016-06-23 20:38:04 +00:00
Roan Kattouw 1d05d9298c backfillUnreadWikis.php: Add rebuild mode
In rebuild mode, we only process users who already have
a row in the euw table. This reduces the number of users
we have to process significantly. Thanks to Stephane
for this idea.

Also, don't force a recache of the alert and message counts,
it's OK to fetch them from cache. We also don't need to invalidate
any caches in this script, because the transition flag from
Ibcc8ac102 will ensure that the cached global counts are
correct.

Change-Id: I69c54cac47468647df2778b2d82f1b5dd9e574d3
2016-06-17 16:02:01 +01:00
Catrope 2771b94af7 Revert "Implement backfillUnreadWikis.php in terms of resetNotificationCount()"
Better idea: invalidate caches in this script, and write
a separate script to recompute existing euw rows.

This reverts commit c83af257d2.

Change-Id: I57bccfb726eada646cb318206d9091a20d59dcf5
2016-06-17 13:43:29 +00:00
Stephane Bisson 8520074d28 Maintenance script generates edit-thank notifications
Bug: T120152
Change-Id: I896fc133b781180b3bb8f1fbd2addaa99f9dc653
2016-06-16 17:46:51 +01:00
Stephane Bisson e8bc56e5d9 Don't set title for user-rights notifications
Same as I584c1150e4c98bb814e30bf6a6d3eb3e49ef6408
for the notifications generation script.

Change-Id: I3b13db662671a9e57f944171108a3b48544f784a
2016-06-14 10:38:41 -04:00
jenkins-bot d3e1846666 Merge "Implement backfillUnreadWikis.php in terms of resetNotificationCount()" 2016-06-11 15:54:55 +00:00
jenkins-bot 59473cc73a Merge "Add script to remove orphaned event rows" 2016-06-09 17:09:56 +00:00
Roan Kattouw c83af257d2 Implement backfillUnreadWikis.php in terms of resetNotificationCount()
This causes it to update the notification count cache as well.
Should we perhaps rename it to recacheNotificationCounts.php?

Bug: T132954
Change-Id: I540c4296f4fbadcf2267d77b53f71ee5c2eb8b52
2016-06-08 16:16:37 +02:00
Roan Kattouw 4c6cadfb27 Add script to remove orphaned event rows
Bug: T136425
Change-Id: Id42a893be81176f37d9d5e3fd7e850d3a6d42e10
2016-06-07 23:34:53 +02:00
Stephane Bisson 5072e87c0b backfillReadBundles.php: Use sub-select to target rows to update
UPDATE based on (user,display_hash) index

Bug: T136368
Change-Id: If3348c2e663517b632c9ff3194dd4a197c74159b
2016-06-07 14:01:32 +00:00
Roan Kattouw 99377e5525 Clean up and fix updateEchoSchemaForSuppression.php
This script was supposed to be run in production in 2013, but that
never happened. It was also never added to update.php.

* Use makeTitleSafe instead of newFromText, for correctness
* Fetch the columns that the update generator needs
* Replace wrapper for private method with closure
* Make the maintenance script logged

Bug: T136427
Bug: T50059
Change-Id: I6c2972120189f035483b5ca49610c008c4ba2c88
2016-06-06 23:56:28 +02:00
Roan Kattouw ca598c3420 backfillUnreadBundles.php: Use the correct database
Change-Id: Id2706b3baa410b7f42b8c7febdb96cd142558988
2016-06-06 21:11:19 +02:00
Stephane Bisson b3d168964c Maintenance: Backfill read timestamp on bundled notifications
This maintenance script sets the correct read_timestamp
on notifications that have been read as part of a
bundle.

Bug: T136368
Change-Id: I735fb230a14f95e0a983e733ec160eb8811b3197
2016-06-02 13:42:09 -04:00
Roan Kattouw 0807c3c5ad NotifUser: Refactor getNotificationCount() and friends, add caching for global counts
Previously, getNotificationCount() only looked at local notifications,
and foreign notifications were added in separately by getMessageCount()
and getAlertCount(). This didn't make any sense and resulted in
counter-intuitive things like I4d49b543.

Instead, add a $global flag to getNotificationCount(). If $global=false,
the local count is returned as before, but if $global=true, the
global count (=local+foreign) is returned. If $global is omitted,
the user's cross-wiki notification preference determines which is returned.

Update getLastUnreadNotificationCount() in the same way, since it had
the same issues.

Also add caching for global counts and timestamps, using a global
memc key.

Bug: T133623
Change-Id: If78bfc710acd91a075771b565cc99f4c302a104d
2016-05-02 16:16:57 -07:00
Stephane Bisson 9d6e6528ba Support generating sample notifications by types
Also added the force (-f) option to
bypass the confirmation. Very useful
when using the script in a loop.

Change-Id: I98c3e0408033903f8e2fb0afab773d4952a4e6d3
2016-03-02 15:04:56 -05:00
Stephane Bisson 74879c39fb Truncate secondary link labels
Bug: T121822
Change-Id: I3e36a6cd4bc8da96879158e1d7b65fd3a1d582fb
2016-02-18 06:55:36 -05:00
Stephane Bisson 467eeaf2e9 generateSampleNotifications.php: Generate OpenStackManager notifications
Change-Id: Iaddfa08e42735fd6befbe4c7b3e54b3f4e7f62d9
2016-02-15 19:55:47 +00:00
Stephane Bisson 88b16a0c81 Generate bundled page-linked notifications in test script
Change-Id: I6414c920e3a29ea5048819433aa86f41d8f54e69
2016-02-12 14:45:32 -05:00
jenkins-bot 9c7c869a29 Merge "Generate CX notifications in maintenance script" 2016-02-12 19:38:12 +00:00
Stephane Bisson 442f812774 Add subject to email notification body
Bug: T121831
Change-Id: Ib1a9212202d2c84de8d968d043f65e24b2d94fae
2016-02-10 12:34:26 -05:00
Stephane Bisson 522a79393d Generate CX notifications in maintenance script
Change-Id: Iec2f4b9d0815da1bf8ccdd5610f403133eeb4262
2016-02-08 10:37:49 -05:00
Stephane Bisson cbe602ee64 Generate sample notifications
Maintenance script that generates sample
notifications for Echo.

Change-Id: I5c88920a417a04cfd06d281f23b4c77368091776
2016-01-28 10:45:57 -05:00
Roan Kattouw 9f7fba935f Add progress markers to backfillUnreadWikis.php
Change-Id: I43fe3d9998b5ebf3ddbec9ced0394c70293b6f18
2016-01-18 19:14:34 -08:00
jenkins-bot 027e9b7431 Merge "Backfill echo_unread_wikis table" 2016-01-11 22:31:38 +00:00
Aaron Schulz 576303e03a Use Maintenance DB transaction methods
Change-Id: I0acde61f57240c95d8f2b8afd55bffbe7b5b98fb
2015-12-31 15:12:05 -08:00
Matthias Mullie ecd150888e Backfill echo_unread_wikis table
Bug: T119523
Change-Id: I13a7d349e7e3a66eb4e9ea3b26578fdd877e83a6
2015-12-16 19:52:16 +01:00
Geoffrey Mon 13948c949f Replace EchoBatchRowUpdate with BatchRowUpdate
Also removes tests for the class.

Bug: T119253
Change-Id: I4c0d7187c2b847297dd0867faecba26185cfba37
Depends-On: Iccafbbdb06711463fee0f30a11326c7771df30e2
2015-12-16 16:36:59 +00:00
Thiemo Mättig 66d5e17a25 Fix broken and incomplete PHPDoc tags
Change-Id: I0c8928a2dbf67cb15841fae6cc55c363357ec265
2015-12-14 11:03:09 +01:00
James D. Forrester 1e01328018 build: Enable phpcs rule 'MediaWiki.VariableAnalysis.UnusedGlobalVariables' and make pass
Change-Id: I1af3e34531ff9d02183a7ad0052712d9f137609c
2015-10-29 17:25:51 +00:00
James D. Forrester a49e3a592e build: Enable phpcs rule 'Squiz.Classes.ValidClassName.NotCamelCaps' and make pass
Change-Id: I3d8b9c04ef2be3fe456c2c66bb10afa11ba0cd45
2015-10-29 18:24:45 +01:00
James D. Forrester 852ddaf903 build: Enable phpcs rule 'MediaWiki.Usage.DirUsage.FunctionFound' and make pass
Change-Id: I05c9299944a5a8e215ecb2996f1a3846e257e12c
2015-10-29 12:57:40 +01:00
James D. Forrester becbea0941 build: Enable phpcs rule 'Squiz.WhiteSpace.LanguageConstructSpacing.Incorrect' and make pass
Change-Id: I9379c18263474ed13921791b920c7b06e58a84ad
2015-10-29 12:56:33 +01:00
Siebrand Mazeland 33126b69aa Update formatting
In preparation of Code Sniffer based updates.

Change-Id: Id5d43332b44a37665d57dc24ef8c432bc65b2f6a
2015-10-03 23:28:54 -04: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
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
bsitu b35f27c291 Delete invalid records from echo_target_page
Remove the records:

* If a page is no longer valid

* If a notification somehow has been read

* If a notification is no longer a bundle base and has not been removed

Change-Id: I282568691d6649c6e3263aea598c3bba29119a29
2014-08-19 11:34:01 -07:00
bsitu 76d8822b84 Remove invalid maintenance scripts
These maintenance scripts have never run before and will never run in
the future.  We decided that we don't understand user_properties table
enough to mess with it, and we went with another simpler approach instead

Change-Id: Ic33375a579267aca40a54d74f839fee042afc24f
2013-07-03 12:09:45 -07:00
Erik Bernhardson f38ce97efd Database updates for respecting oversight within Echo
Provides the first step of adding and populating a new database field
for Echo oversight deployment.  The new field is populated via a
maintenance script and Event::loadFromRow will accept both new and old
results.  Everything will still run when the 2 now unused fields are
later dropped from the db.

Bug: 48059
Change-Id: I24d4b61a061f94ed9aaaa6087f33b2ab37f773cd
2013-06-10 14:52:18 -07:00
bsitu 11aa91f1a0 Fix the maintenance script
It should wait for slave during each batch update

Change-Id: Iba8b172016317236981c11b4f9af9bb1723516ec
2013-05-03 18:52:05 -07:00
bsitu 5df153591d Add extra db slave wait to digest email cron
Change-Id: Iaa5fc89750b2a4bbe5d52bb9e75c2ac90fc3304b
2013-05-02 14:12:40 -07:00
kaldari 95c9825b83 Adding maintenance file for updating user caches after CopyExistingEmailPreference
Change-Id: If938e352e4aaa44d1e9e0718cc1bece26c7a7f74
2013-04-29 18:40:12 -07:00
lwelling 7c3bd0f3a0 Maintenance script to copy the preference of existing users who have opted out
of talk page email notifications to the analogous setting in the Echo version of
talk notifications

Change-Id: I5cdaf261d042f3586d2d02fed672ee35df5a9b90
2013-04-29 16:16:19 -04:00
kaldari 1d52f9c835 A maintenance script for pre-emptively updating email notice option
This script is designed to be run prior to the Echo deployment.

Change-Id: I66f532f21183109c6c3c997fa0e666cb19bfc832
2013-04-29 11:44:44 -07:00
Reedy adffeae19d Move maintenance scripts to maintenance directory
Left fixme comment

Change-Id: I30207558d21bb73c6caa6dd722016bc51b257395
2013-04-22 22:52:21 +01:00
jenkins-bot 4ee55737e8 Merge "Let maintenance script wait for slaves on the correct cluster" 2013-04-11 17:57:34 +00:00
Matthias Mullie 836aae69d2 Let maintenance script wait for slaves on the correct cluster
Change-Id: I45872e0912ed5949586a15ae77123c8f1bb6151c
2013-04-11 10:34:20 -07:00
jenkins-bot 7049e0452b Merge "remove unused table and columns" 2013-04-11 17:17:32 +00:00
bsitu 2be8a547a0 Add external db support to Echo
Change-Id: I84b0d904795d858d88d8e52c22f00d81c0e81303
2013-04-09 17:59:17 -07:00