This allows CommentStore to be added to MediaWikiServices
without the need of an aditional Factory.
This change includes a compatability layer to allow the behaviour
from 1.30 to continue to be used while deprecated.
CommentStore::newKey has been deprecated.
Keys are now passed into the public methods of CommentStore
where needed.
The following CommentStore methods have had their signatures changed
to introduced a $key parameter, but when used in conjunction with
CommentStore::newKey behaviour will remain unchanged:
* CommentStore::getFields
* CommentStore::getJoin
* CommentStore::getComment
* CommentStore::getCommentLegacy
* CommentStore::insert
* CommentStore::insertWithTemplate
Change-Id: I3abb62a5cfb0dcd456da9f4eb35583476ae41cfb
Redundant given this is the project-wide license already,
especially in file headers that already include the GPL license
header.
This and other minor fixups based on feedback from Ie0cea0ef5027c7e5.
* Add @file where missing.
* Move @ingroup and @deprecated from file to class doc where needed.
Change-Id: I7067abb7abee1f0c238cb2536e16192e946d8daa
These comments do not add anything. I argue they are worse than having
no comments, because I have to read them first to understand they
actually don't explain anything. Removing them makes room for actual
improvements in the future (if needed).
Change-Id: Iee70aad681b3385e9af282d5581c10addbb91ac4
Several classes have a "selectFields()" static method to tell callers
which fields to select from the database. With the recent comment table
change and the upcoming actor table change, this pattern has become too
simplistic as a SELECT will need to join several tables to be able to
retrieve all the needed fields.
Thus, we deprecate the selectFields() methods in favor of getQueryInfo()
methods that return tables and join conditions in addition to the
fields.
Change-Id: Idcfd15568489d9f03a7ba4460e96610d33bc4089
Get rid of isPerGroupRequestParameter and define a consistent
interface that all filter groups can implement.
Change-Id: Ib904bcdc697c65722a0041ac611d1e00c577389f
Followup to I3e48a9f2d9b70f0b9f6d7c6329db9c8e8001ee49
Reported in T174725#3590145
Comparing current value and active value with
different representation ("1" !== true) leads to
not applying filters that are ON by default.
Bug: T174725
Change-Id: If083610c0294756589adfc32a59388cc7422ad5d
CategoryMembershipChange is great, but it doesn't have a
machine-readable way to see if the category has been added or removed
from the page. We could parse the comments, but that would rely on
reading the comments and matching the message against the translated
strings.
This patch adds a couple of parameters and notes whether the change
was an addition or removal in rc_params.
Also, puts the evaluation of the AbortEmailNotification hook before
the check of rc_type in the hopes that the extension CatWatch can send
out emails at the right time.
Bug: T175052
Change-Id: I3e2ac0cc148b9d618e2f8b7853b14bff827ee443
Since the caller doesn't (and shouldn't) know whether CommentStore is
using the old or the new schema, it should leave truncation of comments
to CommentStore.
Change-Id: I92954c922514271d774518d6a6c28a01f33c88c2
* Respect different default values for 'limit' and 'day'
in RC and WL.
* Make 'latestrevision' respect 'watchlistextended'
Introducing 2 properties to ChangesListBooleanFilter
* activeValue: The value that defines when a filter is active.
Most filters are active when they are set to 'true' but
'extended' has no effect when it is 'true' and applies
filtering when it is set to false.
* isVisible: Whether this filter is visible anywhere.
'extended' is not visible in the legacy form but
it is activated from preference or URL. When
understanding form submission, it should not be assume
to be 'false' when not present in the request.
Bug: T171134
Change-Id: I3e48a9f2d9b70f0b9f6d7c6329db9c8e8001ee49
When the 'watchlistunwatchlinks' preference option is enabled, this
adds a '×' link to each entry of the watchlist that unwatches the page
of that entry. When clicked, it changes into a '+' which can be used to
re-watch the page (effectively undoing the earlier unwatch).
When a page is unwatched, its entries and the entries of its associated
talk page (or vice versa) become translucent and are struck through.
Without JS, '×'/'+' link to action=(un)watch for the relevant page.
In addition, ChangesList classes have been modified to allow a prefixer
that adds a prefix to each line (used in this case to put the unwatch
link) and to add HTML data attributes to reliably determine the target
page of each entry. Unit tests have been updated accordingly.
Bug: T2424
Change-Id: I450b2901413d7e75c11de2a446829fdbb22d31e1
- mostly auto fixes
- some too long lines fixed
- ignore amp space in one case passing by reference
Change-Id: I6472f83bc3cbf4bd629d83050cc3319b19ec465c
Reenable MediaWiki.WhiteSpace.SpaceBeforeClassBrace.NoSpaceBeforeBrace,
because the mentioned bug is fixed
Bug: T172933
Change-Id: I1593bdba2295ebed401b921f2beabed69dba7638
For both "Live Update" and "View newest changes", add a marker
between old and new groups when changes are grouped by page.
Bug: T163426
Change-Id: I00947d05e9b6022604a2a6b94eec94f6ed747c96
When "live update" is off and new changes are detected,
show a link to load and prepend the changes to the list.
Also adding a line between old and new changes
when grouping by pages is off.
Bug: T163426
Change-Id: I6a111d23956bdc04caa4c71e9deede056779aafa
And auto-fix all errors.
The `<exclude-pattern>` stanzas are now included in the default ruleset
and don't need to be repeated.
Change-Id: I928af549dc88ac2c6cb82058f64c7c7f3111598a
Having such comments is worse than not having them. They add zero
information. But you must read the text to understand there is
nothing you don't already know from the class and the method name.
This is similar to I994d11e. Even more trivial, because this here is
about comments that don't say anything but "constructor".
Change-Id: I474dcdb5997bea3aafd11c0760ee072dfaff124c
EnhancedChangesList renders an <h4> for every day, but it
does so before it starts rendering the changes for that day.
If all of the changes for a different day fail to render
(due to permissions issues, extension hooks, or whatever)
this would result in an empty heading.
Instead, render the heading after formatting is complete,
so that if all changes for a given day are dropped,
the heading is also dropped.
Bug: T171078
Change-Id: I8a0c6cbd679976d18d2c2e6e9ac972fb7b294a42
ChangesListStringOptionsGroup::modifyQuery checks for ALL and
behaves accordingly, but isSelected() didn't. This broke conflict
detection when an entire non-full-coverage group was selected.
Bug: T162630
Change-Id: Ie241744201380ca5450d5edbb3eba971194f3df4
The used phpcs has a bug, so the version 0.9.0 could not be enforced at the moment.
Will be fixed in next version, see T167168
Changed:
- Remove duplicate newline at end of file
- Add space between function and ( for closures
- and -> &&, or -> ||
Change-Id: I4172fb08861729bccd55aecbd07e029e2638d311
We push 'class' in the attribute array so the hook
can manipulate it, so it needs to be added to the attribute
whitelist as well.
Broken in I6dd006d0b1b0fd35c0020f0f9eea9113eca30b35.
Bug: T167922
Bug: T167535
Change-Id: Ic24400382a9dcbb990e12dfddae4ab7db14553cc