Index: trunk/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -1024,7 +1024,7 @@ |
1025 | 1025 | } |
1026 | 1026 | |
1027 | 1027 | /** |
1028 | | - * @param $tags |
| 1028 | + * @param $tags Array |
1029 | 1029 | * @return array |
1030 | 1030 | */ |
1031 | 1031 | protected function normalizeTags( $tags ) { |
— | — | @@ -1036,13 +1036,15 @@ |
1037 | 1037 | } |
1038 | 1038 | |
1039 | 1039 | /** |
1040 | | - * @param $tags |
| 1040 | + * @param $tags Array |
1041 | 1041 | * @return array |
1042 | 1042 | */ |
1043 | 1043 | protected function tagData( $tags ) { |
1044 | 1044 | $data = array(); |
1045 | 1045 | foreach ( $tags as $tag ) { |
1046 | | - if ( $tag == '' ) continue; |
| 1046 | + if ( $tag == '' ) { |
| 1047 | + continue; |
| 1048 | + } |
1047 | 1049 | $data[] = array( |
1048 | 1050 | 'ct_repo_id' => $this->repoId, |
1049 | 1051 | 'ct_rev_id' => $this->id, |
— | — | @@ -1052,23 +1054,21 @@ |
1053 | 1055 | } |
1054 | 1056 | |
1055 | 1057 | /** |
1056 | | - * @param $tag |
| 1058 | + * @param $tag String |
1057 | 1059 | * @return bool |
1058 | 1060 | */ |
1059 | 1061 | public function normalizeTag( $tag ) { |
1060 | | - global $wgContLang; |
1061 | | - $lower = $wgContLang->lc( $tag ); |
1062 | | - |
1063 | 1062 | $title = Title::newFromText( $tag ); |
1064 | | - if ( $title && $lower === $wgContLang->lc( $title->getPrefixedText() ) ) { |
1065 | | - return $lower; |
1066 | | - } else { |
1067 | | - return false; |
| 1063 | + if ( $title ) { |
| 1064 | + global $wgContLang; |
| 1065 | + return $wgContLang->lc( $title->getDbKey() ); |
1068 | 1066 | } |
| 1067 | + |
| 1068 | + return false; |
1069 | 1069 | } |
1070 | 1070 | |
1071 | 1071 | /** |
1072 | | - * @param $tag |
| 1072 | + * @param $tag String |
1073 | 1073 | * @return bool |
1074 | 1074 | */ |
1075 | 1075 | public function isValidTag( $tag ) { |