Page MenuHomePhabricator

Kill programmatic $IP prefixing of paths
Closed, ResolvedPublic

Description

Currently, all paths passed to ResourceLoaderFileModule are prefixed with $IP before being used. This means extensions have to hardcode their location. because the more elegant solution of using paths relative to FILE (resulting in absolute paths) won't work.

Example of bad code that works:
new ResourceLoaderFileModule( $resources, 'extensions/WikiEditor/modules/' )

Example of good code that breaks:
new ResourceLoaderFileModule( $resources, dirname( FILE ) . '/modules/' )

$IP prefixing should be taken out of the software entirely, and be moved to the definition of core resources that specify paths relative to $IP (i.e. Resources.php) or be the default value for the $basepath parameter to ResourceLoaderFileModule::__construct().


Version: 1.17.x
Severity: enhancement

Details

Reference
bz25669

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:15 PM
bzimport set Reference to bz25669.