r41589 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41588‎ | r41589 | r41590 >
Date:05:26, 3 October 2008
Author:mattj
Status:old (Comments)
Tags:
Comment:
Add config option $wgWikiSVN, allowing setting a particular repo name which is holding the code for the current wiki.
Used to highlight which revisions are actively running the current wiki.
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.php (modified) (history)
  • /trunk/extensions/CodeReview/CodeRevisionListView.php (modified) (history)
  • /trunk/extensions/CodeReview/codereview.css (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.php
@@ -86,4 +86,8 @@
8787 $wgSubversionProxy = false;
8888 $wgSubversionProxyTimeout = 30; // default 3 secs is too short :)
8989
 90+
9091 $wgCodeReviewStyleVersion = 1;
 92+// The name of a repo which represents the code running on this wiki, used to highlight active revisions
 93+$wgWikiSVN = 'MediaWiki';
 94+
Index: trunk/extensions/CodeReview/codereview.css
@@ -60,3 +60,12 @@
6161 .mw-codereview-diff .meta {
6262 color: darkcyan;
6363 }
 64+
 65+.mw-codereview-live td {
 66+ border-color: #a0dfa0 !important;;
 67+ border-width: 2px !important;
 68+}
 69+
 70+.mw-codereview-notlive td {
 71+
 72+}
\ No newline at end of file
Index: trunk/extensions/CodeReview/CodeRevisionListView.php
@@ -32,9 +32,11 @@
3333 class SvnRevTablePager extends TablePager {
3434
3535 function __construct( CodeRevisionListView $view ){
 36+ global $IP;
3637 $this->mView = $view;
3738 $this->mRepo = $view->mRepo;
3839 $this->mDefaultDirection = true;
 40+ $this->mCurSVN = SpecialVersion::getSvnRevision( $IP );
3941 parent::__construct();
4042 }
4143
@@ -93,11 +95,16 @@
9496
9597 // Note: this function is poorly factored in the parent class
9698 function formatRow( $row ) {
 99+ global $wgWikiSVN;
 100+ $class = "mw-codereview-status-{$row->cr_status}";
 101+ if($this->mRepo->mName == $wgWikiSVN){
 102+ $class .= " mw-codereview-" . ( $row->cr_id <= $this->mCurSVN ? 'live' : 'notlive' );
 103+ }
97104 return str_replace(
98105 '<tr>',
99106 Xml::openElement( 'tr',
100 - array( 'class' => "mw-codereview-status-{$row->cr_status}" ) ),
101 - parent::formatRow( $row ) );
 107+ array( 'class' => $class ) ),
 108+ parent::formatRow( $row ) );
102109 }
103110
104111 function getTitle(){

Follow-up revisions

RevisionCommit summaryAuthorDate
r77933*(bug 26257) Kill live/notlive status...reedy23:50, 6 December 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   18:48, 22 October 2008

This makes me warm and fuzzy :D

Status & tagging log