r44459 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44458‎ | r44459 | r44460 >
Date:19:03, 11 December 2008
Author:brion
Status:ok
Tags:
Comment:
Revert r43991 "(bug 16049) Editable stylesheet location for CodeReview"
This doesn't seem to do what was requested in the bug -- the bug asked for an on-wiki editable CSS page, like the GeSHI syntax highlighting extension has.
This is providing a LocalSettings.php-level override for the location of the extensions directory where the CSS and JS files are to be loaded... which shouldn't be needed, and if it were it should be a general system for all extensions to be able to use (eg to pull extension styles from a static server, the way we can override the wiki's core style path)
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.php (modified) (history)
  • /trunk/extensions/CodeReview/CodeRevisionView.php (modified) (history)
  • /trunk/extensions/CodeReview/SpecialCode.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/SpecialCode.php
@@ -7,17 +7,12 @@
88 }
99
1010 function execute( $subpage ) {
11 - global $wgOut, $wgRequest, $wgUser, $wgScriptPath;
 11+ global $wgOut, $wgRequest, $wgUser, $wgScriptPath, $wgCodeReviewStyleVersion;
1212
1313 wfLoadExtensionMessages( 'CodeReview' );
1414
1515 $this->setHeaders();
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" );
 16+ $wgOut->addStyle( "$wgScriptPath/extensions/CodeReview/codereview.css?$wgCodeReviewStyleVersion" );
2217
2318 if( $subpage == '' ) {
2419 $view = new CodeRepoListView();
Index: trunk/extensions/CodeReview/CodeRevisionView.php
@@ -296,6 +296,7 @@
297297 global $wgOut, $wgScriptPath;
298298 $encRepo = Xml::encodeJsVar( $this->mRepo->getName() );
299299 $encRev = Xml::encodeJsVar( $this->mRev->getId() );
 300+ $wgOut->addScriptFile( "$wgScriptPath/extensions/CodeReview/codereview.js" );
300301 $wgOut->addInlineScript(
301302 "addOnloadHook(
302303 function() {
Index: trunk/extensions/CodeReview/CodeReview.php
@@ -96,8 +96,6 @@
9797 $wgSubversionProxy = false;
9898 $wgSubversionProxyTimeout = 30; // default 3 secs is too short :)
9999
100 -# Use a literal $wgScriptPath as a placeholder for the runtime value of $wgScriptPath
101 -$wgCodeReviewStylePath = '$wgScriptPath/extensions/CodeReview';
102100
103101 $wgCodeReviewStyleVersion = 3;
104102 // The name of a repo which represents the code running on this wiki, used to highlight active revisions

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r43991(bug 16049) Editable stylesheet location for CodeReviewaaron07:53, 27 November 2008

Status & tagging log