mediawiki.Title: Generalise filename-matching in newFromImg
authorjarry1250 <jarry1250@gmail.com>
Mon, 21 Oct 2013 19:44:38 +0000 (20:44 +0100)
committerKrinkle <krinklemail@gmail.com>
Mon, 28 Oct 2013 09:42:13 +0000 (09:42 +0000)
commitd3c64655dc8e0cd773585d26ce15f49bf265e717
tree192c8d85cf9de242d4a9dc855239d52af54b4313
parent4e941cf4ca448077286fc79a48a76d17dd549c9c
mediawiki.Title: Generalise filename-matching in newFromImg

Both core and extensions can (and do) modify the thumbnail string
e.g. to add page numbers, languages, etc.

As bawolff notes in the commentary to bug 55963, the assumption
that the filename itself appears twice is likely to be violated
from time to time, but for the moment it suffices to fix the
apparent regression described in that bug report.

Also includes some additional test cases.

Bug: 55963
Change-Id: I9bb29a24f9bf50924699b913e31f44689906c525
resources/mediawiki/mediawiki.Title.js
tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js