Index: trunk/extensions/ProofreadPage/ApiQueryProofread.php |
— | — | @@ -71,10 +71,12 @@ |
72 | 72 | |
73 | 73 | $result = $this->getResult(); |
74 | 74 | foreach ( $data['query']['pages'] as $pageid => $data) { |
75 | | - $pageQuality = $qualityLevels[ $data['categories'][0]['title'] ]; |
76 | | - if ( $pageQuality === null ) { |
| 75 | + $title = $data['categories'][0]['title']; |
| 76 | + if ( !isset( $qualityLevels[ $title ] ) ) { |
77 | 77 | continue; |
78 | 78 | } |
| 79 | + |
| 80 | + $pageQuality = $qualityLevels[ $title ]; |
79 | 81 | $val = array( 'quality' => $pageQuality, 'quality_text' => $qualityText[ $pageQuality ] ); |
80 | 82 | $result->addValue( array( 'query', 'pages', $pageid ), 'proofread', $val ); |
81 | 83 | } |