Index: trunk/extensions/CodeReview/CodeRevision.php |
— | — | @@ -183,14 +183,24 @@ |
184 | 184 | $data[] = array( |
185 | 185 | 'ct_repo_id' => $this->mRepo, |
186 | 186 | 'ct_rev_id' => $this->mId, |
187 | | - 'ct_tag' => $tag ); |
| 187 | + 'ct_tag' => $this->normalizeTag( $tag ) ); |
188 | 188 | } |
189 | 189 | return $data; |
190 | 190 | } |
191 | 191 | |
192 | | - function isValidTag( $tag ) { |
193 | | - // fixme? |
| 192 | + function normalizeTag( $tag ) { |
| 193 | + global $wgContLang; |
| 194 | + $lower = $wgContLang->lc( $tag ); |
| 195 | + |
194 | 196 | $title = Title::newFromText( $tag ); |
195 | | - return $title && $title->getPrefixedText() === $tag; |
| 197 | + if( $title && $tag === $wgContLang->lc( $title->getPrefixedText() ) ) { |
| 198 | + return $lower; |
| 199 | + } else { |
| 200 | + return false; |
| 201 | + } |
196 | 202 | } |
| 203 | + |
| 204 | + function isValidTag( $tag ) { |
| 205 | + return ($this->normalizeTag( $tag ) !== false ); |
| 206 | + } |
197 | 207 | } |