https://bugzilla.wikimedia.org/show_bug.cgi?id=25669

           Summary: Kill programmatic $IP prefixing of paths
           Product: MediaWiki
           Version: 1.17-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Resource Loader
        AssignedTo: tpars...@wikimedia.org
        ReportedBy: roan.katt...@gmail.com
                CC: roan.katt...@gmail.com


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().

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to