| @@ 1076-1082 (lines=7) @@ | ||
| 1073 | if ( strlen( $identifier ) > 128 ) { |
|
| 1074 | throw new MWException( "The identifier '$identifier' is too long (max. 128)" ); |
|
| 1075 | } |
|
| 1076 | if ( ( strpos( $identifier, '[' ) !== false ) |
|
| 1077 | || ( strpos( $identifier, ']' ) !== false ) |
|
| 1078 | ) { |
|
| 1079 | // It may be allowed if you quoted with double quotation marks, but |
|
| 1080 | // that would break if QUOTED_IDENTIFIER is OFF |
|
| 1081 | throw new MWException( "Square brackets are not allowed in '$identifier'" ); |
|
| 1082 | } |
|
| 1083 | ||
| 1084 | return "[$identifier]"; |
|
| 1085 | } |
|
| @@ 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 | } |
|