MarkAHershberger has uploaded a new change for review.
https://gerrit.wikimedia.org/r/304683
Change subject: Allow Collection+mwlib to use an alternate URL
......................................................................
Allow Collection+mwlib to use an alternate URL
Some wikis have require authentication for sll contributions
(e.g. Corporate wikis) and, since mwlib can't pass cookies the way
Parsoid can, an alternate method is needed.
Bug: T142924
Change-Id: Ifd044fa6c321dabf1f11ea90652a84b174ec78e3
---
M Collection.php
M Collection.templates.php
M RenderingAPI.php
3 files changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection
refs/changes/83/304683/1
diff --git a/Collection.php b/Collection.php
index 72f120b..2d0029f 100644
--- a/Collection.php
+++ b/Collection.php
@@ -506,3 +506,5 @@
}
$wgAjaxExportList[] = 'wfAjaxCollectionSortItems';
+$wgCollectionScript = $wgScript;
+$wgCollectionScriptPath = $wgScriptPath;
\ No newline at end of file
diff --git a/Collection.templates.php b/Collection.templates.php
index 31c4e05..0486b00 100644
--- a/Collection.templates.php
+++ b/Collection.templates.php
@@ -527,10 +527,10 @@
* @return string
*/
public function getProposalList () {
- global $wgScript, $wgExtensionAssetsPath;
+ global $wgCollectionScript, $wgExtensionAssetsPath;
$mediapath = $wgExtensionAssetsPath . '/Collection/images/';
- $baseUrl = $wgScript . "/";
+ $baseUrl = $wgCollectionScript . "/";
$prop = $this->data['proposals'];
$out = '';
diff --git a/RenderingAPI.php b/RenderingAPI.php
index edefd62..abb2bab 100644
--- a/RenderingAPI.php
+++ b/RenderingAPI.php
@@ -38,8 +38,8 @@
* @private
*/
function getBaseURL() {
- global $wgScriptPath;
- $scriptPath = $wgScriptPath ? $wgScriptPath : "/";
+ global $wgCollectionScriptPath;
+ $scriptPath = $wgCollectionScriptPath ? $wgCollectionScriptPath
: "/";
return wfExpandUrl( $scriptPath, PROTO_CANONICAL );
}
--
To view, visit https://gerrit.wikimedia.org/r/304683
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd044fa6c321dabf1f11ea90652a84b174ec78e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits