Introduce a service to represent wfReadOnly() and friends.
It's necessary to have two service instances, one for wfReadOnly() and
one for wfConfiguredReadOnlyReason(), to avoid a circular dependency,
since LoadBalancer needs the configured reason during construction, but
wfReadOnly() needs to query the currently active load balancer.
Not having a cache of the configuration makes it possible to dynamically
change the configuration. Ideally things would not change the
configuration, and I removed such instances in core, but to support
extensions, I added a test ensuring that the configuration can be changed.
Change-Id: I9bbee946c10742526d3423208efd68cb3cc5a7ee
Current way of counting returned search results (e.g. for
Event Logging) relies on counting the appropriate elements
in the search results page's DOM, up to the limit the user
requested (e.g. 20 by default). This allows us to record
the total number and the offset, useful for event logging.
For example, if we wanted to know whether the user viewed
2nd or 3rd set of search results.
Change-Id: Ic8601e9eeddac84ba8e0d7dc6f127bf360b6f90f
Filters are in conflict when their combination is guaranteed
to return no results. For instance: minor and log entries
is a conflict because major/minor does not apply to
log entries and the field is set to major by default.
Letting conflicts go through result in some very slow
database queries.
Bug: T160220
Change-Id: Ia6b0125c675c4a3cc4e4be4f83d1bd10d23059ba
When you perform a particular search, the results can be polluted by
navigation elements that are not supposed to be displayed. This gives
editors the ability to mark sections of the document that should not
be indexed.
Bug: T162905
Change-Id: Iab2b83c3778cd5f7f44736c0da569fd938ae2968
In some languages, the 'rclinks' message ends
with '...<br />$3.' where $3 is a list of links.
When $3 is empty, we end up with a lonely period
on a new line.
This change removes $3 and adds it on the page
on its own. Unfortunately, it requires fixing all
the messages. Not sure if it's the proper way to
do this.
Bug: T162844
Change-Id: If17f056c135b2e51747a5a1c8aeaba785cf18ff2
When a page is created, anything that's trying to transclude that page
needs to have an HTMLCacheUpdate run on it. But that's not currently
happening.
Normal template transclusion happens to get updates only because
transclusion of a nonexistent template is rendered as a link to that
template, which registers a pagelink, and pagelinks *are* being updated
on page creation to cause redlinks to turn blue.
Change-Id: I18b8cfdeedc53f8fdb1e758a6fca1cd23d9574f8
At Wikimedia, $wgImageMagickConvertCommand points to a shell wrapper
that invokes ImageMagick convert with:
firejail --profile=/etc/firejail/mediawiki-converters.profile
firejail emits to stderr an information message:
Reading profile /etc/firejail/mediawiki-converters.profile
That ends up in HHVM stderr and is populated up to logstash as an error.
MediaWiki does check imagemagick version by running `convert -version`,
switch from wfShellExec() to wfShellExecWithStderr().
Bug: T158649
Change-Id: I78d1ef59533c605f59b42e10556bb595d6c2cc15
* Make sure waitFor() always handles laggedReplicaMode updates,
even if the actual waiting was deferred until a connection was
needed.
* Restore the old mWaitForPos in waitForOne()/waitForAll() since
this do not care about the generic reader index or the sort of
ChronologyProtector logic related to it.
Change-Id: I0767e9831b8fd7fd115a472354977e3c1e12114a