Last modified: 2010-10-27 22:23:53 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 T27669, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25669 - Kill programmatic $IP prefixing of paths
Kill programmatic $IP prefixing of paths
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.17.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-27 12:45 UTC by Roan Kattouw
Modified: 2010-10-27 22:23 UTC (History)
1 user (show)

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


Attachments

Description Roan Kattouw 2010-10-27 12:45:47 UTC
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().
Comment 1 Roan Kattouw 2010-10-27 22:23:53 UTC
Fixed in r75587.

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


Navigation
Links