Follow-up Idbcb76f: Only apply /includes folder fix to local path

Also use dirname(__DIR__) instead of appending ../

Change-Id: Ie88fb03617b25a675e1f4af97f8cb7c29c2fb8b3
This commit is contained in:
Ed Sanders 2018-02-12 21:58:16 +00:00
parent 79c0106b13
commit ec8208d125

View file

@ -892,7 +892,7 @@ class VisualEditorHooks {
$resourceModules = $resourceLoader->getConfig()->get( 'ResourceModules' );
$veResourceTemplate = [
'localBasePath' => __DIR__,
'localBasePath' => dirname( __DIR__ ),
'remoteExtPath' => 'VisualEditor',
];
@ -905,8 +905,8 @@ class VisualEditorHooks {
$resourceLoader->register( [
'jquery.uls.data' => $veResourceTemplate + [
'scripts' => [
'../lib/ve/lib/jquery.uls/src/jquery.uls.data.js',
'../lib/ve/lib/jquery.uls/src/jquery.uls.data.utils.js',
'lib/ve/lib/jquery.uls/src/jquery.uls.data.js',
'lib/ve/lib/jquery.uls/src/jquery.uls.data.utils.js',
],
'targets' => [ 'desktop', 'mobile' ],
] ] );
@ -1096,7 +1096,7 @@ class VisualEditorHooks {
'ext.visualEditor.desktopArticleTarget',
'ext.visualEditor.rebase'
],
'localBasePath' => __DIR__ . '/..',
'localBasePath' => dirname( __DIR__ ),
'remoteExtPath' => 'VisualEditor',
];