Commit graph

11 commits

Author SHA1 Message Date
Aaron Schulz
dbccb3a361 Use WikiMap methods for wiki ID logic in more places
Change-Id: I25b53576a8fecb7cfb0e4d684f064bebf6c968fc
2018-10-29 22:02:00 +00:00
Umherirrender
f739a8f368 Improve some parameter docs
Add missing @return and @param to function docs and fixed some @param

Change-Id: I810727961057cfdcc274428b239af5975c57468d
2017-09-10 20:32:31 +02:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Stephane Bisson
62961558a5 Encapsulate rc_params handling in RecentChange::parseParams
* Make MachineReadableRCFeedFormatter use it

* Some unit tests

* Also fixed some line-too-long warnings in RecentChange.php

Change-Id: I443d14f5d4cdac0945cb9c03608d55745bbb865b
2015-06-10 15:11:37 -04:00
Bryan Davis
78695ada64 Use safe attribute accessor for RecentChange
The RecentChange does not guarantee that all attributes are populated.
Handily it provides a safe getter function in
RecentChange::getAttribute() that will return null with out triggering
an undefined index warning for missing attributes. Protects against log
spam like "Notice: Undefined index: rc_id".

Change-Id: Idee844f0d40a2a084e17f201b5e1501d59a0464d
2014-09-13 05:02:33 +00:00
Kunal Mehta
e8ab2deb0f RCFeed: Add log_id property (exposes rc_logid attribute)
Bug: 20394
Change-Id: I005be8e41a5cbea934d4dac27184f03e9af7c648
2014-06-11 22:27:13 +00:00
Timo Tijhof
c0b0a12eab RCFeed: Use named types instead of exposing internal MW constant
Like we do in ApiQueryRecentChanges as well, expose the named
rc.type property, not the internal integer constants.

Change-Id: I89a948eee999032bb2e42cc23345affa879afb42
2014-06-04 04:55:02 +00:00
Ori Livneh
5c74ac9feb Expose server name in rc feed
Reviewers of Id819246a9 (Tim, Timo, Chad) have commented that it
would be preferable to identify wikis by their canonical hostname
rather than the value of $wgDBname. Exposing it here so that
the rcstream server can filter subscriptions by it.

Change-Id: I503a0134a8613daddaae9d8df29a1e27fbfd93bc
2014-05-09 09:55:00 +00:00
Ori Livneh
1f3f032f2a JSON RC format: cast 'patrolled' and 'minor' to boolean
This makes them consistent with 'bot'.

Change-Id: Id4342eedee8176b0b76458bdaf8ca69c89857d47
2014-05-03 11:30:05 -07:00
Kunal Mehta
f1d28a569d rcfeed: Use wfWikiID() instead of $wgDBname
Change-Id: Id1f408a4c498f23f656298e3453d2a9264e3ac7c
2014-01-10 17:52:25 -08:00
Kunal Mehta
c1bc3607f8 Add XMLRCFeedFormatter
Endpoints like XMPP natively support sending XML,
which can be advantageous in some cases.

Since most of the logic is the same as the existing
JSONRCFeedFormatter, it was moved into an abstract
MachineReadableRCFeedFormatter class, which simply
creates the array and lets the implementations format
it.

Change-Id: I44f22777cb55fc1ca6527b79ef40b340e2afbd58
2014-01-10 17:50:41 -08:00