Index: trunk/extensions/CodeReview/SpecialCode.php |
— | — | @@ -7,12 +7,17 @@ |
8 | 8 | } |
9 | 9 | |
10 | 10 | function execute( $subpage ) { |
11 | | - global $wgOut, $wgRequest, $wgUser, $wgScriptPath, $wgCodeReviewStyleVersion; |
| 11 | + global $wgOut, $wgRequest, $wgUser, $wgScriptPath; |
12 | 12 | |
13 | 13 | wfLoadExtensionMessages( 'CodeReview' ); |
14 | 14 | |
15 | 15 | $this->setHeaders(); |
16 | | - $wgOut->addStyle( "$wgScriptPath/extensions/CodeReview/codereview.css?$wgCodeReviewStyleVersion" ); |
| 16 | + global $wgCodeReviewStylePath, $wgCodeReviewStyleVersion; |
| 17 | + $stylePath = str_replace( '$wgScriptPath', $wgScriptPath, $wgCodeReviewStylePath ); |
| 18 | + $encCssFile = htmlspecialchars( "$stylePath/codereview.css?$wgCodeReviewStyleVersion" ); |
| 19 | + $encJsFile = htmlspecialchars( "$stylePath/codereview.js?$wgCodeReviewStyleVersion" ); |
| 20 | + $wgOut->addExtensionStyle( $encCssFile ); |
| 21 | + $wgOut->addScriptFile( "$wgScriptPath/extensions/CodeReview/codereview.js" ); |
17 | 22 | |
18 | 23 | if( $subpage == '' ) { |
19 | 24 | $view = new CodeRepoListView(); |
Index: trunk/extensions/CodeReview/CodeRevisionView.php |
— | — | @@ -296,7 +296,6 @@ |
297 | 297 | global $wgOut, $wgScriptPath; |
298 | 298 | $encRepo = Xml::encodeJsVar( $this->mRepo->getName() ); |
299 | 299 | $encRev = Xml::encodeJsVar( $this->mRev->getId() ); |
300 | | - $wgOut->addScriptFile( "$wgScriptPath/extensions/CodeReview/codereview.js" ); |
301 | 300 | $wgOut->addInlineScript( |
302 | 301 | "addOnloadHook( |
303 | 302 | function() { |
Index: trunk/extensions/CodeReview/CodeReview.php |
— | — | @@ -96,6 +96,8 @@ |
97 | 97 | $wgSubversionProxy = false; |
98 | 98 | $wgSubversionProxyTimeout = 30; // default 3 secs is too short :) |
99 | 99 | |
| 100 | +# Use a literal $wgScriptPath as a placeholder for the runtime value of $wgScriptPath |
| 101 | +$wgCodeReviewStylePath = '$wgScriptPath/extensions/CodeReview'; |
100 | 102 | |
101 | 103 | $wgCodeReviewStyleVersion = 3; |
102 | 104 | // The name of a repo which represents the code running on this wiki, used to highlight active revisions |