Page MenuHomePhabricator

Store Commons path in a variable/constant in InitialiseSettings.php instead of duplicating it
Closed, InvalidPublic


The text "//" in InitialiseSettings.php is currently duplicated a lot (over 350 times; cf. I'm wondering whether it makes sense to store this string in a reusable variable (e.g., $commonsPath).

Pro: it would reduce the overall file size and make certain sections (particularly the logo section) easier to read.

Con: it would slightly obfuscate the path to (for example) a logo. Rather than being a mostly complete string as it is now, it would become "$commonsPath . /1/d/whatever.png".

Version: wmf-deployment
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:17 AM
bzimport set Reference to bz48618.
bzimport added a subscriber: Unknown Object (MLST).
Reedy added a comment.May 19 2013, 4:39 PM

Or even a constant could make sense at the top of the file (it's really not going to be changing any time soon etc)

Change 131914 had a related patch set uploaded by Withoutaname:
Reduce string URLs to defined constant

Krenair added a subscriber: Krenair.
Krenair closed this task as Invalid.Aug 13 2015, 10:26 AM

After there are only two occurrences left, one of which will be dealt with in T49662 and the other is wgUploadPath.

Restricted Application added subscribers: Steinsplitter, Matanya. · View Herald TranscriptAug 13 2015, 10:26 AM