jenkins-bot has submitted this change and it was merged.

Change subject: Actually make resources work from vendor
......................................................................


Actually make resources work from vendor

Change-Id: Iaa6e344ea897a9a399dee7d4618389ce176c97b4
---
M client/WikibaseClient.hooks.php
M client/resources/Resources.php
M lib/resources/Resources.php
M lib/resources/api/resources.php
M lib/resources/entityChangers/resources.php
M lib/resources/experts/resources.php
M lib/resources/formatters/resources.php
M lib/resources/jquery.wikibase/resources.php
M lib/resources/jquery.wikibase/snakview/resources.php
M lib/resources/jquery.wikibase/toolbar/resources.php
M lib/resources/parsers/resources.php
M lib/resources/wikibase.RepoApi/resources.php
M lib/resources/wikibase.store/resources.php
M lib/resources/wikibase.utilities/resources.php
M repo/resources/Resources.php
15 files changed, 44 insertions(+), 44 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index f60ec9d..8f6b491 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -502,8 +502,8 @@
                global $wgExtensionAssetsPath;
 
                 preg_match(
-                        '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                                preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(.*)$+',
+                        '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                                preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'.*)$+',
                         __DIR__,
                         $remoteExtPathParts
                 );
diff --git a/client/resources/Resources.php b/client/resources/Resources.php
index c591f28..2c90075 100644
--- a/client/resources/Resources.php
+++ b/client/resources/Resources.php
@@ -2,14 +2,14 @@
 
 return call_user_func( function() {
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        return array(
diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index f2e85c4..bd7ce2a 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -12,14 +12,14 @@
  */
 return call_user_func( function() {
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        $modules = array(
diff --git a/lib/resources/api/resources.php b/lib/resources/api/resources.php
index 8379334..1b0236a 100644
--- a/lib/resources/api/resources.php
+++ b/lib/resources/api/resources.php
@@ -6,14 +6,14 @@
 return call_user_func( function() {
 
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        return array(
diff --git a/lib/resources/entityChangers/resources.php 
b/lib/resources/entityChangers/resources.php
index 6b0c1ed..82621f8 100644
--- a/lib/resources/entityChangers/resources.php
+++ b/lib/resources/entityChangers/resources.php
@@ -6,14 +6,14 @@
 return call_user_func( function() {
 
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        return array(
diff --git a/lib/resources/experts/resources.php 
b/lib/resources/experts/resources.php
index 50997cc..5da1565 100644
--- a/lib/resources/experts/resources.php
+++ b/lib/resources/experts/resources.php
@@ -8,14 +8,14 @@
 return call_user_func( function() {
 
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        return array(
diff --git a/lib/resources/formatters/resources.php 
b/lib/resources/formatters/resources.php
index c85d338..d202543 100644
--- a/lib/resources/formatters/resources.php
+++ b/lib/resources/formatters/resources.php
@@ -8,14 +8,14 @@
 return call_user_func( function() {
 
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        return array(
diff --git a/lib/resources/jquery.wikibase/resources.php 
b/lib/resources/jquery.wikibase/resources.php
index 2bd68f3..4759082 100644
--- a/lib/resources/jquery.wikibase/resources.php
+++ b/lib/resources/jquery.wikibase/resources.php
@@ -7,14 +7,14 @@
  */
 return call_user_func( function() {
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        $modules = array(
diff --git a/lib/resources/jquery.wikibase/snakview/resources.php 
b/lib/resources/jquery.wikibase/snakview/resources.php
index 11e053c..5762c22 100644
--- a/lib/resources/jquery.wikibase/snakview/resources.php
+++ b/lib/resources/jquery.wikibase/snakview/resources.php
@@ -7,14 +7,14 @@
  */
 return call_user_func( function() {
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        $modules = array(
diff --git a/lib/resources/jquery.wikibase/toolbar/resources.php 
b/lib/resources/jquery.wikibase/toolbar/resources.php
index bc3def0..4dec8cd 100644
--- a/lib/resources/jquery.wikibase/toolbar/resources.php
+++ b/lib/resources/jquery.wikibase/toolbar/resources.php
@@ -7,14 +7,14 @@
  */
 return call_user_func( function() {
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        $modules = array(
diff --git a/lib/resources/parsers/resources.php 
b/lib/resources/parsers/resources.php
index 84b9b85..9717d3d 100644
--- a/lib/resources/parsers/resources.php
+++ b/lib/resources/parsers/resources.php
@@ -8,14 +8,14 @@
 return call_user_func( function() {
 
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        return array(
diff --git a/lib/resources/wikibase.RepoApi/resources.php 
b/lib/resources/wikibase.RepoApi/resources.php
index 7d8ee42..21427ec 100644
--- a/lib/resources/wikibase.RepoApi/resources.php
+++ b/lib/resources/wikibase.RepoApi/resources.php
@@ -7,14 +7,14 @@
  */
 return call_user_func( function() {
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        $modules = array(
diff --git a/lib/resources/wikibase.store/resources.php 
b/lib/resources/wikibase.store/resources.php
index a250fba..60dafee 100644
--- a/lib/resources/wikibase.store/resources.php
+++ b/lib/resources/wikibase.store/resources.php
@@ -7,14 +7,14 @@
  */
 return call_user_func( function() {
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        $modules = array(
diff --git a/lib/resources/wikibase.utilities/resources.php 
b/lib/resources/wikibase.utilities/resources.php
index bdf6b23..841939a 100644
--- a/lib/resources/wikibase.utilities/resources.php
+++ b/lib/resources/wikibase.utilities/resources.php
@@ -7,14 +7,14 @@
  */
 return call_user_func( function() {
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
        );
 
        $modules = array(
diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index a984f4f..51a6207 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -12,14 +12,14 @@
  */
 return call_user_func( function() {
        preg_match(
-               '+^.*?' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'(?:vendor|extensions)' .
-                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '(.*)$+',
+               '+' . preg_quote( DIRECTORY_SEPARATOR, '+' ) . 
'((?:vendor|extensions)' .
+                       preg_quote( DIRECTORY_SEPARATOR, '+' ) . '.*)$+',
                __DIR__,
                $remoteExtPathParts
        );
        $moduleTemplate = array(
                'localBasePath' => __DIR__,
-               'remoteExtPath' => $remoteExtPathParts[1],
+               'remoteExtPath' => '..' . DIRECTORY_SEPARATOR . 
$remoteExtPathParts[1],
                'position' => 'top' // reducing the time between DOM 
construction and JS initialisation
        );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/171538
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa6e344ea897a9a399dee7d4618389ce176c97b4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Adrian Lang <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to