Last modified: 2014-05-07 00:22:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50618, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48618 - Store Commons path in a variable/constant in InitialiseSettings.php instead of duplicating it
Store Commons path in a variable/constant in InitialiseSettings.php instead o...
Status: PATCH_TO_REVIEW
Product: Wikimedia
Classification: Unclassified
Site requests (Other open bugs)
wmf-deployment
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-19 16:37 UTC by MZMcBride
Modified: 2014-05-07 00:22 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MZMcBride 2013-05-19 16:37:51 UTC
The text "//upload.wikimedia.org/wikipedia/commons/" in InitialiseSettings.php is currently duplicated a lot (over 350 times; cf. <https://noc.wikimedia.org/conf/InitialiseSettings.php.txt>). 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".
Comment 1 Sam Reed (reedy) 2013-05-19 16:39:39 UTC
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)
Comment 2 Gerrit Notification Bot 2014-05-07 00:22:09 UTC
Change 131914 had a related patch set uploaded by Withoutaname:
Reduce string URLs to defined constant

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links