summaryrefslogtreecommitdiff
path: root/includes/OutputPage.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:17:42 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:17:42 -0400
commitf7d4cf9ed0ae68fec630d14e8f6aade38e49f036 (patch)
treea730c57badbe0e2f0f064ca2006c82d4b6ed54ea /includes/OutputPage.php
parentaee35e4a93d105024bcae947cd8b16c962191f5c (diff)
parent5d1e7dd0ccda0984ccf3e8e3d0f88ac888b05819 (diff)
Merge commit '5d1e7'
Diffstat (limited to 'includes/OutputPage.php')
-rw-r--r--includes/OutputPage.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 2f8094ab..55b1da00 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2743,7 +2743,7 @@ $templates
* call rather than a "<script src='...'>" tag.
* @return string The html "<script>", "<link>" and "<style>" tags
*/
- protected function makeResourceLoaderLink( $modules, $only, $useESI = false,
+ public function makeResourceLoaderLink( $modules, $only, $useESI = false,
array $extraQuery = array(), $loadCall = false
) {
$modules = (array)$modules;
@@ -3153,7 +3153,7 @@ $templates
* have to be purged on configuration changes.
* @return array
*/
- private function getJSVars() {
+ public function getJSVars() {
global $wgContLang;
$curRevisionId = 0;
@@ -3289,6 +3289,10 @@ $templates
if ( !$this->getTitle()->isJsSubpage() && !$this->getTitle()->isCssSubpage() ) {
return false;
}
+ if ( !$this->getTitle()->isSubpageOf( $this->getUser()->getUserPage() ) ) {
+ // Don't execute another user's CSS or JS on preview (T85855)
+ return false;
+ }
return !count( $this->getTitle()->getUserPermissionsErrors( 'edit', $this->getUser() ) );
}