If a user creates a redirect that goes to a [[Media:example.jpg]]
page, then an exception is thrown because NS_MEDIA is a virtual
namespace. This change catches this case and changes the namespace
to an NS_FILE namespace and the redirect works correctly. This
change only happens when we are dealing with a redirect so other
uses of the NS_MEDIA namespace shouldn't be affected.
Bug: T203942
Change-Id: Ia744059650e16510732a65d51b138b11cbd43eb4
* Trim "target" to remove trailing spaces from IP address in
Special:DeletedContributions that triggers MW internal error.
Bug: T187619
Change-Id: Ic6b0d8020553ecce4dcf97f9c78487d3174444d8
In a nutshell:
This commmit removes the use of drifting microtime()
in favour of non-drifting time(). Then, we increase the size of
the counter by x1000, and consider every 1000 increments as 1ms
for the purposes of UUID.
Why:
This means we eliminate the whole code that can produce a fatal
exception when the clock drifts by more than we can wait for,
which puts us in a logical conundrum we can't get out of, hence
it previously fatalled.
Not aborting random end-user requests and jobs is good.
This also means we avoid the vast majority of cases where
MediaWiki would busy-loop for upto 10ms in a likely-to-fail
attempt to sync the clock. This means the method runs faster,
which is a nice win, albeit not the main objective.
Bug: T94522
Change-Id: Ia8a847078ec76d633854db6823a20f0961c80f80
* DYM link was triggering the 'go' feature due to fulltext misspelled
* all ids are of the form mw-search-*, except one. Make it the same
(WikimediaEvents code was expecting everything to be mw-search-*)
Bug: T206232
Change-Id: Ib91ccf28879b8af2a8c0f2a40b9fe3ec4259a730
Previously, getCacheTime would default to the current time, potentially
causing the return value to change over subsequent calls. With this change,
the value is determined on the first call, and then remembered for subsequent
calls.
Bug: T205464
Change-Id: If240161c71d523ad5b0d33b9378950e0bebceb6e
Various miscellaneous clean ups with no change to any of the
logical code. This to make the next commit have a cleaner diff
for easier review.
* Make internal millitime() non-static.
* Improve documentation and add missing @covers annotations.
* Correct getTimestampedID88() documentation to state that
only two values need to be passed, not three.
This is significant because the Flow extension is actually
using this method in a subclass and passes only two values.
Bug: T94522
Change-Id: I2a0c51bea58df4cc0c253c1c10de3ac383f04c8e
In some cases it's useful adding a fragment to the url, e.g. when
accessing the beta features preference page. This patch adds support
for that on the Page object.
Change-Id: I4b6aa5e7e89e60f05e217fc557bf6786441855e6