Index: trunk/extensions/Translate/specials/SpecialMessageGroupStats.php |
— | — | @@ -107,12 +107,7 @@ |
108 | 108 | function getTable() { |
109 | 109 | $table = $this->table; |
110 | 110 | |
111 | | - global $wgTranslateWorkflowStates; |
112 | | - if ( $wgTranslateWorkflowStates ) { |
113 | | - $this->states = self::getWorkflowStates( $this->target ); |
114 | | - $this->statemap = array_flip( $wgTranslateWorkflowStates ); |
115 | | - $table->addExtraColumn( wfMessage( 'translate-stats-workflow' ) ); |
116 | | - } |
| 111 | + $this->workflowStatesColumn(); |
117 | 112 | $out = ''; |
118 | 113 | |
119 | 114 | if ( $this->purge ) { |
Index: trunk/extensions/Translate/specials/SpecialLanguageStats.php |
— | — | @@ -229,11 +229,26 @@ |
230 | 230 | } |
231 | 231 | |
232 | 232 | /** |
| 233 | + * Adds a workflow states column if its needed. |
| 234 | + */ |
| 235 | + function workflowStatesColumn() { |
| 236 | + global $wgTranslateWorkflowStates; |
| 237 | + if ( $wgTranslateWorkflowStates ) { |
| 238 | + $this->states = self::getWorkflowStates( $this->target ); |
| 239 | + $this->statemap = array_flip( $wgTranslateWorkflowStates ); |
| 240 | + $table->addExtraColumn( wfMessage( 'translate-stats-workflow' ) ); |
| 241 | + } |
| 242 | + return; |
| 243 | + } |
| 244 | + |
| 245 | + |
| 246 | + /** |
233 | 247 | * Returns the table itself. |
234 | 248 | * @return \string HTML |
235 | 249 | */ |
236 | 250 | function getTable() { |
237 | 251 | $table = $this->table; |
| 252 | + |
238 | 253 | $out = ''; |
239 | 254 | |
240 | 255 | if ( $this->purge ) { |