Page MenuHomePhabricator

Get value of $wgLegalTitleChars through the API
Closed, DeclinedPublic

Description

Would it be possible for an entry in meta=siteinfo to be able to get the value of $wgLegalTitleChars ?

Thanks


Version: 1.13.x
Severity: enhancement

Details

Reference
bz17024

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:25 PM
bzimport set Reference to bz17024.

Would be "fixed" when 17027 is done

Reopening as Bug 17027 "Output LocalSettings.php Variables via API" has been reverted as wontfix.

17025 is still there, just with a few tweaks to be added..

Can this be implemented seperately like 17025 was?

Thanks!

This is too tightly coupled to internal implementation behavior for a stable API. Note that the value of $wgLegalTitleChars is not sufficient to identify which titles are legal. I recommend removing this and resolving WONTFIX.

What's an example of an actual problem this is intended to solve? Is there a better way to solve it, like submitting a potential title for normalization and validity checks?

The intention is/was to use it in a Regex in AutoWikiBrowser to be used in a regex to help identify images (so hence wanting it was such), so they can be masked in wikitext during processing

Obviously, we can just use the default hardcoded, but then that could cause problems if people have changed it (with making it variablised for people to change, it means people *could* change it)

If you're just trying to validate one or more titles (i.e. check whether they're valid or not), use action=query&titles=Foo|Bar|Baz . I'll revert and WONTFIX in a minute.

Not exactly..

Just trying to think how to explain it better

(In reply to comment #6)

If you're just trying to validate one or more titles (i.e. check whether
they're valid or not), use action=query&titles=Foo|Bar|Baz . I'll revert and
WONTFIX in a minute.

Reverted in r46337, closing as WONTFIX. Feel free to REOPEN or file a new bug if you have a use case that isn't covered by the current possibilities.