r53100 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53099‎ | r53100 | r53101 >
Date:04:58, 11 July 2009
Author:aaron
Status:deferred
Tags:
Comment:
special page & CSS cleanup
Modified paths:
  • /trunk/extensions/ReaderFeedback/ReaderFeedback.hooks.php (modified) (history)
  • /trunk/extensions/ReaderFeedback/ReaderFeedback.php (modified) (history)
  • /trunk/extensions/ReaderFeedback/ReaderFeedbackXML.php (modified) (history)
  • /trunk/extensions/ReaderFeedback/readerfeedback.css (modified) (history)
  • /trunk/extensions/ReaderFeedback/specialpages/LikedPages_body.php (modified) (history)
  • /trunk/extensions/ReaderFeedback/specialpages/ProblemPages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ReaderFeedback/ReaderFeedback.hooks.php
@@ -124,7 +124,7 @@
125125 $action = $reviewTitle->getLocalUrl( 'action=submit' );
126126 $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action,
127127 'id' => 'mw-feedbackform' ) );
128 - $form .= Xml::openElement( 'fieldset', array('class' => 'flaggedrevs_reviewform noprint') );
 128+ $form .= Xml::openElement( 'fieldset', array('class' => 'feedback_reviewform noprint') );
129129 $form .= "<legend><strong>" . wfMsgHtml( 'readerfeedback' ) . "</strong></legend>\n";
130130 # Avoid clutter
131131 if( !$wgUser->isAllowed('review') ) {
@@ -141,7 +141,7 @@
142142 $form .= '&nbsp;' . Xml::openElement( 'select', $attribs );
143143 $levels = array_reverse($levels,true);
144144 foreach( $levels as $i => $name ) {
145 - $optionClass = array( 'class' => "fr-rating-option-$i" );
 145+ $optionClass = array( 'class' => "rfb-rating-option-$i" );
146146 $form .= Xml::option( wfMsg("readerfeedback-level-$i"), $i, ($i == $selected), $optionClass ) ."\n";
147147 }
148148 $form .= Xml::option( wfMsg("readerfeedback-level-none"), -1, (-1 == $selected) ) ."\n";
Index: trunk/extensions/ReaderFeedback/specialpages/ProblemPages_body.php
@@ -1,6 +1,6 @@
22 <?php
33 if ( !defined( 'MEDIAWIKI' ) ) {
4 - echo "FlaggedRevs extension\n";
 4+ echo "ReaderFeedback extension\n";
55 exit( 1 );
66 }
77
@@ -9,7 +9,7 @@
1010 public function __construct() {
1111 SpecialPage::SpecialPage( 'ProblemPages' );
1212 wfLoadExtensionMessages( 'ProblemPages' );
13 - wfLoadExtensionMessages( 'FlaggedRevs' );
 13+ wfLoadExtensionMessages( 'ReaderFeedback' );
1414 }
1515
1616 public function execute( $par ) {
@@ -37,16 +37,16 @@
3838 }
3939
4040 protected function showForm() {
41 - global $wgOut, $wgScript, $wgFlaggedRevsNamespaces;
 41+ global $wgOut, $wgScript, $wgFeedbackNamespaces;
4242 $form = Xml::openElement( 'form',
4343 array( 'name' => 'reviewedpages', 'action' => $wgScript, 'method' => 'get' ) );
4444 $form .= "<fieldset><legend>".wfMsgHtml('problempages-leg')."</legend>\n";
4545 $form .= Xml::hidden( 'title', $this->getTitle()->getPrefixedDBKey() );
46 - if( count($wgFlaggedRevsNamespaces) > 1 ) {
47 - $form .= FlaggedRevsXML::getNamespaceMenu( $this->namespace ) . '&nbsp;';
 46+ if( count($wgFeedbackNamespaces) > 1 ) {
 47+ $form .= ReaderFeedbackXML::getNamespaceMenu( $this->namespace ) . '&nbsp;';
4848 }
49 - if( count( FlaggedRevs::getFeedbackTags() ) > 0 ) {
50 - $form .= FlaggedRevsXML::getTagMenu( $this->tag );
 49+ if( count( ReaderFeedback::getFeedbackTags() ) > 0 ) {
 50+ $form .= ReaderFeedbackXML::getTagMenu( $this->tag );
5151 }
5252 $form .= " ".Xml::submitButton( wfMsg( 'go' ) );
5353 $form .= "</fieldset></form>\n";
@@ -55,7 +55,7 @@
5656
5757 protected function showPageList() {
5858 global $wgOut;
59 - $tags = FlaggedRevs::getFeedbackTags();
 59+ $tags = ReaderFeedback::getFeedbackTags();
6060 $pager = new ProblemPagesPager( $this, array(), $this->namespace, $this->tag );
6161 if( isset($tags[$this->tag]) && $pager->getNumRows() ) {
6262 $wgOut->addHTML( wfMsgExt('problempages-list', array('parse') ) );
@@ -97,12 +97,12 @@
9898 $this->mForm = $form;
9999 $this->mConds = $conds;
100100 # Must be a content page...
101 - global $wgFlaggedRevsNamespaces;
 101+ global $wgFeedbackNamespaces;
102102 if( !is_null($namespace) ) {
103103 $namespace = intval($namespace);
104104 }
105 - if( is_null($namespace) || !in_array($namespace,$wgFlaggedRevsNamespaces) ) {
106 - $namespace = empty($wgFlaggedRevsNamespaces) ? -1 : $wgFlaggedRevsNamespaces[0];
 105+ if( is_null($namespace) || !in_array($namespace,$wgFeedbackNamespaces) ) {
 106+ $namespace = empty($wgFeedbackNamespaces) ? -1 : $wgFeedbackNamespaces[0];
107107 }
108108 $this->namespace = $namespace;
109109 $this->tag = $tag;
Index: trunk/extensions/ReaderFeedback/specialpages/LikedPages_body.php
@@ -1,6 +1,6 @@
22 <?php
33 if ( !defined( 'MEDIAWIKI' ) ) {
4 - echo "FlaggedRevs extension\n";
 4+ echo "ReaderFeedback extension\n";
55 exit( 1 );
66 }
77
@@ -9,7 +9,7 @@
1010 public function __construct() {
1111 SpecialPage::SpecialPage( 'LikedPages' );
1212 wfLoadExtensionMessages( 'LikedPages' );
13 - wfLoadExtensionMessages( 'FlaggedRevs' );
 13+ wfLoadExtensionMessages( 'ReaderFeedback' );
1414 }
1515
1616 public function execute( $par ) {
@@ -37,16 +37,16 @@
3838 }
3939
4040 protected function showForm() {
41 - global $wgOut, $wgTitle, $wgScript, $wgFlaggedRevsNamespaces;
 41+ global $wgOut, $wgTitle, $wgScript, $wgFeedbackNamespaces;
4242 $form = Xml::openElement( 'form',
4343 array( 'name' => 'reviewedpages', 'action' => $wgScript, 'method' => 'get' ) );
4444 $form .= "<fieldset><legend>".wfMsgHtml('likedpages-leg')."</legend>\n";
4545 $form .= Xml::hidden( 'title', $wgTitle->getPrefixedDBKey() );
46 - if( count($wgFlaggedRevsNamespaces) > 1 ) {
47 - $form .= FlaggedRevsXML::getNamespaceMenu( $this->namespace ) . '&nbsp;';
 46+ if( count($wgFeedbackNamespaces) > 1 ) {
 47+ $form .= ReaderFeedbackXML::getNamespaceMenu( $this->namespace ) . '&nbsp;';
4848 }
49 - if( count( FlaggedRevs::getFeedbackTags() ) > 0 ) {
50 - $form .= FlaggedRevsXML::getTagMenu( $this->tag );
 49+ if( count( ReaderFeedback::getFeedbackTags() ) > 0 ) {
 50+ $form .= ReaderFeedbackXML::getTagMenu( $this->tag );
5151 }
5252 $form .= " ".Xml::submitButton( wfMsg( 'go' ) );
5353 $form .= "</fieldset></form>\n";
@@ -55,7 +55,7 @@
5656
5757 protected function showPageList() {
5858 global $wgOut;
59 - $tags = FlaggedRevs::getFeedbackTags();
 59+ $tags = ReaderFeedback::getFeedbackTags();
6060 $pager = new LikedPagesPager( $this, array(), $this->namespace, $this->tag );
6161 if( isset($tags[$this->tag]) && $pager->getNumRows() ) {
6262 $wgOut->addHTML( wfMsgExt('likedpages-list', array('parse') ) );
@@ -97,12 +97,12 @@
9898 $this->mForm = $form;
9999 $this->mConds = $conds;
100100 # Must be a content page...
101 - global $wgFlaggedRevsNamespaces;
 101+ global $wgFeedbackNamespaces;
102102 if( !is_null($namespace) ) {
103103 $namespace = intval($namespace);
104104 }
105 - if( is_null($namespace) || !in_array($namespace,$wgFlaggedRevsNamespaces) ) {
106 - $namespace = empty($wgFlaggedRevsNamespaces) ? -1 : $wgFlaggedRevsNamespaces[0];
 105+ if( is_null($namespace) || !in_array($namespace,$wgFeedbackNamespaces) ) {
 106+ $namespace = empty($wgFeedbackNamespaces) ? -1 : $wgFeedbackNamespaces[0];
107107 }
108108 $this->namespace = $namespace;
109109 $this->tag = $tag;
Index: trunk/extensions/ReaderFeedback/ReaderFeedback.php
@@ -81,6 +81,7 @@
8282
8383 # Load reader feedback UI
8484 $wgAutoloadClasses['ReaderFeedbackPage'] = $dir . 'specialpages/ReaderFeedback_body.php';
 85+$wgAutoloadClasses['ReaderFeedbackXML'] = $dir.'ReaderFeedbackXML.php';
8586
8687 # Page rating history
8788 $wgAutoloadClasses['RatingHistory'] = $dir . 'specialpages/RatingHistory_body.php';
Index: trunk/extensions/ReaderFeedback/ReaderFeedbackXML.php
@@ -9,7 +9,7 @@
1010 wfLoadExtensionMessages( 'ReaderFeedback' );
1111 $s = "<label for='wpRatingTag'>" . wfMsgHtml('revreview-tagfilter') . "</label>&nbsp;";
1212 $s .= Xml::openElement( 'select', array('name' => 'ratingtag', 'id' => 'wpRatingTag') );
13 - foreach( FlaggedRevs::getFeedbackTags() as $tag => $weight ) {
 13+ foreach( ReaderFeedback::getFeedbackTags() as $tag => $weight ) {
1414 $s .= Xml::option( wfMsg( "readerfeedback-$tag" ), $tag, $selected===$tag );
1515 }
1616 $s .= Xml::closeElement('select')."\n";
Index: trunk/extensions/ReaderFeedback/readerfeedback.css
@@ -1,351 +1,28 @@
2 -/* Every time you change this CSS please bump $wgFlaggedRevStyleVersion in FlaggedRevs.php */
 2+/* Every time you change this CSS please bump $wgFeedbackStyleVersion in ReaderFeedback.php */
33
4 -/* Standard User Interface */
5 -.flaggedrevs_basic,
6 -.flaggedrevs_quality,
7 -.flaggedrevs_pristine,
8 -.flaggedrevs_notice,
9 -.flaggedrevs_editnotice,
10 -.flaggedrevs_diffnotice,
11 -.flaggedrevs_warning,
12 -.flaggedrevs_preview {
13 - border: 1px solid #aaa;
14 - padding: 5px;
15 - font-weight: normal;
16 - line-height: 1.5em;
17 - margin: .5em 1em 0em 0em;
18 - text-align: center;
19 - clear: both;
20 -}
21 -
22 -.flaggedrevs_basic {
23 - background-color: #f0f8ff;
24 -}
25 -.flaggedrevs_quality {
26 - background-color: #f0fff0;
27 -}
28 -.flaggedrevs_pristine {
29 - background-color: #fffff0;
30 -}
31 -.flaggedrevs_notice {
32 - background-color: #f9f9f9;
33 -}
34 -.flaggedrevs_preview {
35 - background-color: #f9f9f9;
36 - color: #8b0000;
37 -}
38 -
39 -.flaggedrevs_warning {
40 - font-size: 85%;
41 - background-color: #fffff0;
42 - margin: 0em 1em 0em 0em;
43 -}
44 -.flaggedrevs_editnotice {
45 - font-size: 85%;
46 - background-color: #f9f9f9;
47 -}
48 -.flaggedrevs_diffnotice {
49 - font-size: 85%;
50 - background-color: #f9f9f9;
51 -}
52 -
53 -.flaggedrevs_notes {
54 - border: 1px solid #aaa;
55 - background-color: #f9f9f9;
56 - padding: 5px;
57 - font-size: 85%;
58 - margin-left: 50px;
59 - margin-right: 50px;
60 - text-align: center;
61 -}
62 -
63 -.fr-text-value {
64 - width: 100px;
65 -}
66 -
67 -.fr-checkbox {
68 - padding: 0px;
69 - width: 16px;
70 - height: 16px;
71 - position: relative;
72 - float: left;
73 - top: 0px;
74 - right: 0px;
75 - background-repeat: no-repeat;
76 - background-position: 0px 0px;
77 - background-image: url(../FlaggedRevs/img/boxC.png);
78 -}
79 -
80 -.fr-marker-20,
81 -.fr-marker-40,
82 -.fr-marker-60,
83 -.fr-marker-80,
84 -.fr-marker-100 {
85 - background-position: bottom left;
86 - background-repeat: no-repeat;
87 - padding-bottom: 3px;
88 -}
89 -
90 -.fr-marker-20 {
91 - background-image: url(../FlaggedRevs/img/bar_20.png);
92 -}
93 -.fr-marker-40 {
94 - background-image: url(../FlaggedRevs/img/bar_40.png);
95 -}
96 -.fr-marker-60 {
97 - background-image: url(../FlaggedRevs/img/bar_60.png);
98 -}
99 -.fr-marker-80 {
100 - background-image: url(../FlaggedRevs/img/bar_80.png);
101 -}
102 -.fr-marker-100 {
103 - background-image: url(../FlaggedRevs/img/bar_100.png);
104 -}
105 -
106 -/* Short User Interface */
107 -.flaggedrevs_short {
108 - border: 0px;
109 - background-color: #f9f9f9;
110 - padding: 1px;
111 - font-size: 95%;
112 - font-weight: normal;
113 - margin: 0em 0em 0em 1em;
114 - float: right;
115 - text-align: left;
116 - max-width: 450px;
117 - line-height: 16px;
118 -}
119 -
120 -.fr-text {
121 - height: 1em;
122 - line-height: 1em;
123 - margin: 0px 7px 0px 0px;
124 - padding: 0px;
125 - font-weight: bold;
126 - width: 80px;
127 -}
128 -
129 -.fr-value20,
130 -.fr-value40,
131 -.fr-value60,
132 -.fr-value80,
133 -.fr-value100 {
134 - height: 1em;
135 - line-height: 1em;
136 - width: 95px;
137 - float: left;
138 - background-repeat: no-repeat;
139 - background-position: 50% 50%;
140 - text-align: center;
141 -}
142 -
143 -.fr-value20 {
144 - background-image: url(../FlaggedRevs/img/fr-marker-20.png);
145 -}
146 -.fr-value40 {
147 - background-image: url(../FlaggedRevs/img/fr-marker-40.png);
148 -}
149 -.fr-value60 {
150 - background-image: url(../FlaggedRevs/img/fr-marker-60.png);
151 -}
152 -.fr-value80 {
153 - background-image: url(../FlaggedRevs/img/fr-marker-80.png);
154 -}
155 -.fr-value100 {
156 - background-image: url(../FlaggedRevs/img/fr-marker-100.png);
157 -}
158 -
159 -.flaggedrevs-box0,
160 -.flaggedrevs-box1,
161 -.flaggedrevs-box2,
162 -.flaggedrevs-box3 {
163 - border: 1px solid #aaa;
164 - text-align: center;
165 - font-size: 85%;
166 - clear: both;
167 -}
168 -
169 -.flaggedrevs-box0 {
170 - background-color: #f9f9f9;
171 -}
172 -.flaggedrevs-box1 {
173 - background-color: #f0f8ff;
174 -}
175 -.flaggedrevs-box2 {
176 - background-color: #f0fff0;
177 -}
178 -.flaggedrevs-box3 {
179 - background-color: #fffff0;
180 -}
181 -
182 -/* Both User Interfaces */
183 -.flaggedrevs-color-0 {
184 - background-color: #f9f9f9;
185 -}
186 -.flaggedrevs-color-1 {
187 - background-color: #f0f8ff;
188 -}
189 -.flaggedrevs-color-2 {
190 - background-color: #f0fff0;
191 -}
192 -.flaggedrevs-color-3 {
193 - background-color: #fffff0;
194 -}
195 -
196 -.flaggedrevs-unreviewed {
197 - background-color: #fffff0;
198 -}
199 -
200 -.flaggedrevs-unreviewed2 {
201 - background-color: #faebd7;
202 -}
203 -
204 -.flaggedrevs_toggle {
205 - color: blue;
206 - white-space: nowrap;
207 - cursor:pointer;
208 -}
209 -
210 -.fr-icon-current,
211 -.fr-icon-stable,
212 -.fr-icon-quality,
213 -.fr-icon-locked,
214 -.fr-icon-unlocked {
215 - padding: 0px;
216 - margin: 0em .2em 0em 0em;
217 - width: 16px;
218 - height: 16px;
219 - float: left;
220 - background-repeat: no-repeat;
221 - background-position: center center;
222 -}
223 -.fr-icon-current {
224 - background-image: url(../FlaggedRevs/img/1.png);
225 -}
226 -.fr-icon-stable {
227 - background-image: url(../FlaggedRevs/img/2.png);
228 -}
229 -.fr-icon-quality {
230 - background-image: url(../FlaggedRevs/img/3.png);
231 -}
232 -.fr-icon-locked {
233 - background-image: url(../FlaggedRevs/img/lock-closed.png);
234 -}
235 -.fr-icon-unlocked {
236 - width: 23px;
237 - background-image: url(../FlaggedRevs/img/lock-open.png);
238 -}
239 -
240 -.fr-diff-ratings {
241 - font-size: 90%;
242 - line-height: 1em;
243 -}
244 -
245 -.fr-diff-to-stable {
246 - line-height: 1em;
247 -}
248 -
249 -.fr-hist-stable-user,
250 -.fr-hist-quality-user,
251 -.fr-hist-autoreviewed {
252 - font-weight: bold;
253 -}
254 -
255 -/* Site notices */
256 -.fr-backlognotice {
257 - padding: 3px;
258 - margin: 5px;
259 - border: 1px solid #990000;
260 - background-color: #f5ecec;
261 -}
262 -.fr-watchlist-old-notice {
263 - padding: 3px;
264 - margin: 5px;
265 - border: 1px solid #990000;
266 - background-color: #FEECD7;
267 -}
268 -
269 -/* Special pages */
270 -.fr-pending-long {
271 - background-color: #f5ecec;
272 -}
273 -.fr-pending-long2 {
274 - background-color: #f5dddd;
275 -}
276 -.fr-pending-long3 {
277 - background-color: #e2caca;
278 -}
279 -
280 -.fr-unreviewed-unwatched {
281 - background-color: #faebd7;
282 -}
283 -
284 -.fr-under-review {
285 - background-color: yellow;
286 -}
287 -
2884 /* Review form */
289 -.flaggedrevs_reviewform {
 5+.feedback_reviewform {
2906 background-color: #f9f9f9;
2917 font-size: 90%;
2928 clear: both;
2939 }
29410
295 -.fr-rating-controls,
296 -.fr-rating-controls-disabled {
297 - vertical-align: middle;
298 - line-height: 1em;
299 -}
300 -
301 -.fr-rating-controls-disabled {
302 - color: GrayText;
303 -}
304 -
305 -.fr-rating-options {
306 - margin-right: 1.5em;
307 -}
308 -
309 -.fr-rating-option-0 {
 11+.rfb-rating-option-0 {
31012 background-color: #f5ecec;
31113 }
312 -.fr-rating-option-1 {
 14+.rfb-rating-option-1 {
31315 background-color: #f0f8ff;
31416 }
315 -.fr-rating-option-2 {
 17+.rfb-rating-option-2 {
31618 background-color: #f0fff0;
31719 }
318 -.fr-rating-option-3 {
 20+.rfb-rating-option-3 {
31921 background-color: #fef0db;
32022 }
321 -.fr-rating-option-4 {
 23+.rfb-rating-option-4 {
32224 background-color: #fffff0;
32325 }
32426
325 -.fr-diff-patrollink {
326 - text-align: center;
327 -}
328 -
329 -.fr-notes-box {
330 - width: 95%;
331 - margin: 0em 1em 0em .5em;
332 -}
333 -
334 -.fr-comment-box {
335 - margin-top: .25em;
336 -}
337 -
338 -.fr-rating-dave {
339 - background-color: #E0ECF8;
340 -}
341 -
342 -.fr-rating-rave {
343 - background-color: #E0F8EC;
344 -}
345 -
346 -.fr-hiddenform {
347 - display: none;
348 -}
349 -
35027 /* Reader feedback form */
35128 .fr_reader_feedback_plot {
35229 background-color: #F8F8F8;

Status & tagging log