Page MenuHomePhabricator

Support configuration settings that are filesystem paths in extension.json
Closed, ResolvedPublic

Description

Some configuration settings are path based:

$wgTorOnionooCA = __DIR__ . "/torproject.crt";

or

$GLOBALS['wgBabelLanguageCodesCdb'] = __DIR__ . '/codes.cdb';
$GLOBALS['wgBabelLanguageNamesCdb'] = __DIR__ . '/names.cdb';

We should be able to indicate that these settings are path based, and set them appropriately.

Event Timeline

Paladox raised the priority of this task from to Needs Triage.
Paladox updated the task description. (Show Details)
Paladox added subscribers: Paladox, Legoktm.
Legoktm renamed this task from Add support for path configuration to Support configuration settings that are filesystem paths in extension.json.May 31 2015, 9:15 PM
Legoktm triaged this task as Medium priority.

Oh yet, please. THis way, extensions could easily define their own services by adding a path to $wgExtensionWiringFiles.

I see two ways:

  1. have a magic syntax for placeholders in strings, e.g. {{DIR}} or $DIR$ or something. That's convenient, but brittle.
  2. have a special key, like _pathes, that enumerates all keys (or key-pathes) that should be treated as containing path based information.

Change 300674 had a related patch set uploaded (by Legoktm):
registration: Support config setings that are relative paths

https://gerrit.wikimedia.org/r/300674

Change 300674 merged by jenkins-bot:
registration: Support config setings that are relative paths

https://gerrit.wikimedia.org/r/300674

Reedy assigned this task to Legoktm.