Index: trunk/extensions/SelectionSifter/SpecialFilterRatings.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | if( $action == 'addtoselection' ) { |
31 | 31 | $success = Selection::addEntries( $selection_name, $entries ); |
32 | 32 | $sel_page = new SpecialSelection(); |
33 | | - |
| 33 | + |
34 | 34 | $url = $sel_page->getTitle()->getLinkUrl( array( 'name' => $selection_name ) ); |
35 | 35 | $return = array( |
36 | 36 | 'status' => $success, |
— | — | @@ -40,31 +40,31 @@ |
41 | 41 | return; |
42 | 42 | } |
43 | 43 | |
44 | | - $fields = array( |
45 | | - 'Project-Name' => array( |
46 | | - 'type' => 'text', |
47 | | - 'label-message' => 'ss-project', |
48 | | - 'tabindex' => '1' |
49 | | - ), |
50 | | - 'Importance' => array( |
51 | | - 'type' => 'text', |
52 | | - 'label-message' => 'ss-importance', |
53 | | - 'tabindex' => '2' |
54 | | - ), |
55 | | - 'Quality' => array( |
56 | | - 'type' => 'text', |
57 | | - 'label-message' => 'ss-quality', |
58 | | - 'tabindex' => '3' |
59 | | - ) |
60 | | - ); |
| 44 | + $fields = array( |
| 45 | + 'Project-Name' => array( |
| 46 | + 'type' => 'text', |
| 47 | + 'label-message' => 'ss-project', |
| 48 | + 'tabindex' => '1' |
| 49 | + ), |
| 50 | + 'Importance' => array( |
| 51 | + 'type' => 'text', |
| 52 | + 'label-message' => 'ss-importance', |
| 53 | + 'tabindex' => '2' |
| 54 | + ), |
| 55 | + 'Quality' => array( |
| 56 | + 'type' => 'text', |
| 57 | + 'label-message' => 'ss-quality', |
| 58 | + 'tabindex' => '3' |
| 59 | + ) |
| 60 | + ); |
61 | 61 | |
62 | | - $project = $request->getText( 'wpProject' ); |
63 | | - $importance = $request->getText( 'wpImportance' ); |
64 | | - $quality = $request->getText( 'wpQuality' ); |
| 62 | + $project = $request->getText( 'wpProject' ); |
| 63 | + $importance = $request->getText( 'wpImportance' ); |
| 64 | + $quality = $request->getText( 'wpQuality' ); |
65 | 65 | |
66 | 66 | $filters = array_filter( array( |
67 | | - 'r_project' => $project, |
68 | | - 'r_importance' => $importance, |
| 67 | + 'r_project' => $project, |
| 68 | + 'r_importance' => $importance, |
69 | 69 | 'r_quality' => $quality |
70 | 70 | ) ); |
71 | 71 | |
— | — | @@ -72,14 +72,14 @@ |
73 | 73 | $this->outputHeader(); |
74 | 74 | $out->setPageTitle( $this->msg( 'ss-filter-ratings' ) ); |
75 | 75 | |
76 | | - $form = new HTMLForm( $fields, $this->getContext() ); |
77 | | - $form->setMethod( 'get' ); |
78 | | - $form->prepareForm(); |
| 76 | + $form = new HTMLForm( $fields, $this->getContext() ); |
| 77 | + $form->setMethod( 'get' ); |
| 78 | + $form->prepareForm(); |
79 | 79 | |
80 | | - $form->displayForm( '' ); |
81 | | - |
82 | | - $pager = new RatingsPager( $this, $filters ); |
| 80 | + $form->displayForm( '' ); |
83 | 81 | |
| 82 | + $pager = new RatingsPager( $this, $filters ); |
| 83 | + |
84 | 84 | if ( $pager->getNumRows() ) { |
85 | 85 | $out->addHTML( |
86 | 86 | $pager->getNavigationBar() . |
— | — | @@ -89,13 +89,13 @@ |
90 | 90 | $out->addWikiMsg( 'ss-ratings-empty' ); |
91 | 91 | } |
92 | 92 | |
93 | | - return; |
| 93 | + return; |
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
97 | 97 | class RatingsPager extends TablePager { |
98 | | - protected $conds; |
99 | | - protected $page; |
| 98 | + protected $conds; |
| 99 | + protected $page; |
100 | 100 | |
101 | 101 | /** |
102 | 102 | * @param $page SpecialPage |
— | — | @@ -122,22 +122,22 @@ |
123 | 123 | } |
124 | 124 | |
125 | 125 | return $headers; |
126 | | - } |
| 126 | + } |
127 | 127 | |
128 | 128 | function getQueryInfo() { |
129 | 129 | return array( |
130 | 130 | 'tables' => array( 'ratings' ), |
131 | 131 | 'fields' => array( |
132 | | - 'r_id', |
133 | | - 'r_project', |
134 | | - 'r_namespace', |
135 | | - 'r_article', |
136 | | - 'r_quality', |
137 | | - 'r_importance' |
| 132 | + 'r_id', |
| 133 | + 'r_project', |
| 134 | + 'r_namespace', |
| 135 | + 'r_article', |
| 136 | + 'r_quality', |
| 137 | + 'r_importance' |
138 | 138 | ), |
139 | 139 | 'conds' => $this->conds |
140 | 140 | ); |
141 | | - } |
| 141 | + } |
142 | 142 | |
143 | 143 | function getIndexField() { |
144 | 144 | return 'r_id'; |
— | — | @@ -151,24 +151,24 @@ |
152 | 152 | return false; |
153 | 153 | } |
154 | 154 | |
155 | | - function formatValue( $name, $value ) { |
156 | | - $row = $this->mCurrentRow; |
| 155 | + function formatValue( $name, $value ) { |
| 156 | + $row = $this->mCurrentRow; |
157 | 157 | |
158 | | - switch( $name ) { |
159 | | - case 'r_project': |
160 | | - $project_title = Title::newFromText( $row->r_project ); |
161 | | - return Linker::linkKnown( $project_title, htmlspecialchars( $project_title->getText() ) ); |
162 | | - break; |
163 | | - case 'r_quality': |
164 | | - return $value; |
165 | | - break; |
166 | | - case 'r_importance': |
167 | | - return $value; |
168 | | - break; |
169 | | - case 'r_article': |
170 | | - $title = Title::makeTitleSafe( $row->r_namespace, $row->r_article ); |
171 | | - return Linker::linkKnown( $title, htmlspecialchars( $title->getText() ) ); |
172 | | - break; |
173 | | - } |
174 | | - } |
| 158 | + switch( $name ) { |
| 159 | + case 'r_project': |
| 160 | + $project_title = Title::newFromText( $row->r_project ); |
| 161 | + return Linker::linkKnown( $project_title, htmlspecialchars( $project_title->getText() ) ); |
| 162 | + break; |
| 163 | + case 'r_quality': |
| 164 | + return $value; |
| 165 | + break; |
| 166 | + case 'r_importance': |
| 167 | + return $value; |
| 168 | + break; |
| 169 | + case 'r_article': |
| 170 | + $title = Title::makeTitleSafe( $row->r_namespace, $row->r_article ); |
| 171 | + return Linker::linkKnown( $title, htmlspecialchars( $title->getText() ) ); |
| 172 | + break; |
| 173 | + } |
| 174 | + } |
175 | 175 | } |
Index: trunk/extensions/SelectionSifter/SpecialAssessmentLog.php |
— | — | @@ -25,25 +25,25 @@ |
26 | 26 | $this->outputHeader(); |
27 | 27 | $out->setPageTitle( $this->msg( 'ss-assessment-log' ) ); |
28 | 28 | |
29 | | - $fields = array( |
30 | | - 'Project' => array( |
31 | | - 'type' => 'text', |
32 | | - 'label-message' => 'ss-project', |
33 | | - 'tabindex' => '1' |
34 | | - ) |
35 | | - ); |
| 29 | + $fields = array( |
| 30 | + 'Project' => array( |
| 31 | + 'type' => 'text', |
| 32 | + 'label-message' => 'ss-project', |
| 33 | + 'tabindex' => '1' |
| 34 | + ) |
| 35 | + ); |
36 | 36 | |
37 | | - $project = $request->getText( 'wpProject' ); |
| 37 | + $project = $request->getText( 'wpProject' ); |
38 | 38 | |
39 | 39 | $filters = array_filter( array( |
40 | | - 'l_project' => $project |
| 40 | + 'l_project' => $project |
41 | 41 | ) ); |
42 | 42 | |
43 | | - $form = new HTMLForm( $fields, $this->getContext() ); |
44 | | - $form->setMethod( 'get' ); |
45 | | - $form->prepareForm(); |
| 43 | + $form = new HTMLForm( $fields, $this->getContext() ); |
| 44 | + $form->setMethod( 'get' ); |
| 45 | + $form->prepareForm(); |
46 | 46 | |
47 | | - $form->displayForm( '' ); |
| 47 | + $form->displayForm( '' ); |
48 | 48 | |
49 | 49 | $pager = new AssessmentLogPager( $this, $filters ); |
50 | 50 | if( $pager->getNumRows() ) { |