Index: trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | $title = Title::newFromRow( $row ); |
97 | 97 | $link = $this->skin->makeKnownLinkObj( $title, null, 'redirect=no&reviewform=1' ); |
98 | 98 | $hist = $this->skin->makeKnownLinkObj( $title, wfMsgHtml('hist'), 'action=history' ); |
99 | | - $css = $stxt = $review = $underReview = ''; |
| 99 | + $stxt = $review = $underReview = $watching = ''; |
100 | 100 | if( !is_null($size = $row->page_len) ) { |
101 | 101 | $stxt = ($size == 0) |
102 | 102 | ? wfMsgHtml('historyempty') |
— | — | @@ -120,14 +120,15 @@ |
121 | 121 | } |
122 | 122 | if( $wgUser->isAllowed('unwatchedpages') ) { |
123 | 123 | $uw = self::usersWatching( $title ); |
124 | | - $watching = $uw ? |
125 | | - wfMsgExt( 'unreviewed-watched', array('parsemag'), $uw ) : wfMsgHtml( 'unreviewed-unwatched' ); |
126 | | - $watching = " $watching"; |
127 | | - // Oh-noes! |
128 | | - $css = $uw ? "" : " class='fr-unreviewed-unwatched'"; |
| 124 | + $watching = $uw |
| 125 | + ? wfMsgExt( 'unreviewed-watched', array('parsemag'), $uw ) |
| 126 | + : wfMsgHtml( 'unreviewed-unwatched'); |
| 127 | + $watching = " $watching"; // Oh-noes! |
129 | 128 | } else { |
130 | | - $watching = ""; |
| 129 | + $uw = -1; |
131 | 130 | } |
| 131 | + $css = self::getLineClass( $hours, $uw ); |
| 132 | + $css = $css ? " class='$css'" : ""; |
132 | 133 | $pageId = isset($row->page_id) ? $row->page_id : $row->qc_value; |
133 | 134 | $key = wfMemcKey( 'unreviewedPages', 'underReview', $pageId ); |
134 | 135 | $val = $wgMemc->get( $key ); |
— | — | @@ -172,6 +173,17 @@ |
173 | 174 | return $count; |
174 | 175 | } |
175 | 176 | |
| 177 | + protected static function getLineClass( $hours, $uw ) { |
| 178 | + if( $uw == 0 ) |
| 179 | + return 'fr-unreviewed-unwatched'; |
| 180 | + else if( $hours > 20*24 ) |
| 181 | + return 'fr-pending-long2'; |
| 182 | + else if( $hours > 7*24 ) |
| 183 | + return 'fr-pending-long'; |
| 184 | + else |
| 185 | + return ""; |
| 186 | + } |
| 187 | + |
176 | 188 | /** |
177 | 189 | * There may be many pages, most of which are reviewed |
178 | 190 | */ |