Commit graph

9 commits

Author SHA1 Message Date
Umherirrender b0f6c21b8e Parse messages in string context
The current default for Message::__toString() is to parse, so this
keeps that behaviour unchanged.

Change-Id: Icf83608b031390126b5e8d29a5600d37589cf411
2020-05-24 17:11:57 +02:00
Thiemo Kreuz a429c8cc35 Fix escaping issues and a series of unrelated code cleanups
Actual changes:
* Let the special page accept the subpage parameter, e.g.
  [[Special:MathWikibase/Q6203]].
* Fix some of the message escaping issues in SpecialMathWikibase.
  Messages that are just plain text and not supposed to contain any
  parameters, wikitext, HTML, or something like this should be
  properly escaped, either via Html::rawElement( $msg->escaped() ) or
  better Html::element( $msg->plain ). The later approach is cheaper.

Other code cleanups that don't affect production:
* Reduce the amount of duplicate code in SpecialMathWikibase.
* Make use of the preg_match() return value.
* Remove default parameters from parent::__construct() call.
* Remove some auto-generated comments.
* Remove some comments that don't add new information, but just repeat
  what the code already says.
* Make use of PHPUnit's assertCount().

We can split this patch into smaller patches, if you prefer. This
should especially be done if one of the changes is controversial, to
not block the other changes. Please tell me.

Change-Id: I8c20014435af3d2ac9c7381fe5fd00b9fe49b2c2
2020-03-21 14:53:15 +00:00
Timo Tijhof f59757a338 Replace $wgContLanguageCode with $wgLanguageCode
$wgContLanguageCode has been an unconfigurable copy of $wgLanguageCode
since 2006 (MW 1.8).

Bug: T247674
Change-Id: I1d2ec1e63320086fdf9ab7c6321f949c99c1ab2a
2020-03-14 19:31:26 +00:00
libraryupgrader 5018e51b29 build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate

Change-Id: I57bb0f5bc4167ea4b4a50d666ad95c02fcc7d8c9
2020-01-14 22:01:54 +00:00
DannyS712 cf906ea1bc Replace @return true|false with @return bool
Change-Id: If6111abcb2c17622e58189a8b7200fc9a49c7b84
2019-12-28 10:29:18 +00:00
jenkins-bot 13053e0a9c Merge "Fix capitalization of HTML Class" 2019-11-15 22:33:46 +00:00
Moritz Schubotz (physikerwelt) 848168c3a1
Fix capitalization of HTML Class
* Replace HTML->Html

Introduced in Idd22057a88312bf1a1cb5546d0a6edca5678d80d

Change-Id: If44743507d6897fa7600a16fc2002443cc3a556e
2019-11-15 23:03:48 +01:00
AndreG-P 54518a4981 Delete Wikibase repository dependency in Math extension
With this commit, the Math extension only depends on WikibaseClient
and no longer on WikibaseRepo.

Bug: T208758
Change-Id: Iac8f2568e0da1a4aff4f4b22d124626c8ecca8eb
2019-11-16 01:30:12 +09:00
Moritz Schubotz (physikerwelt) 4a7bc3ee31 Add special page and API endpoint that show information from math Wikibase items
Add a special page and an API endpoint to fetch data from Wikibase
items with a given qID. The special page summarizes information from
Wikibase. The API endpoint allows to request the information
directly. Both, the API endpoint and the special page, fetch the data
from a new helper class for consistency.

Bug: T208758
Bug: T229939
Change-Id: Idd22057a88312bf1a1cb5546d0a6edca5678d80d
2019-11-14 23:42:35 +09:00