https://bugzilla.wikimedia.org/show_bug.cgi?id=44117
Web browser: ---
Bug ID: 44117
Summary: API modules must make sure getContext()->getTitle()
returns a Title object.
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: WikidataRepo
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
API modules have a getContext() method that returns an ICOntextSource that can
be used with EditEntity, etc. That context object has a getTitle() method that
will return the context's internal title object or, if that is not set,
$wgTitle. Some extensions, like AbuseFilter, rely on this Title object being
present, the documentation of IContextSource also requires getTitle() to return
a Title object, and never null.
But in the API, $wgTitle may well be null, or, more frequently but just as bad,
something nonsensical or inappropriate (e.g. the main page). API modules that
modify an entity must ensure that getContext()->getTitle() returns the title
object that refers to the entity the module is operating on. This is necessary
to allow extensions like AbuseFilter to have the correct context for their
task.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l