| @@ 137-139 (lines=3) @@ | ||
| 134 | } | |
| 135 | ||
| 136 | 	protected function getFileName( $code ) { | |
| 137 | 		if ( strval( $code ) === '' || strpos( $code, '/' ) !== false ) { | |
| 138 | throw new MWException( __METHOD__ . ": Invalid language \"$code\"" ); | |
| 139 | } | |
| 140 | ||
| 141 | 		return "{$this->directory}/l10n_cache-$code.cdb"; | |
| 142 | } | |
| @@ 1088-1094 (lines=7) @@ | ||
| 1085 | 		if ( strlen( $identifier ) > 128 ) { | |
| 1086 | throw new MWException( "The identifier '$identifier' is too long (max. 128)" ); | |
| 1087 | } | |
| 1088 | if ( ( strpos( $identifier, '[' ) !== false ) | |
| 1089 | || ( strpos( $identifier, ']' ) !== false ) | |
| 1090 | 		) { | |
| 1091 | // It may be allowed if you quoted with double quotation marks, but | |
| 1092 | // that would break if QUOTED_IDENTIFIER is OFF | |
| 1093 | throw new MWException( "Square brackets are not allowed in '$identifier'" ); | |
| 1094 | } | |
| 1095 | ||
| 1096 | return "[$identifier]"; | |
| 1097 | } | |