| @@ 216-219 (lines=4) @@ | ||
| 213 | if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
|
| 214 | // break up string into pieces (languages and q factors) |
|
| 215 | $accept = $_SERVER['HTTP_ACCEPT_LANGUAGE']; |
|
| 216 | if (preg_match('/^(\w{2})-\w{2}$/', $accept, $matches)) { |
|
| 217 | // Special fix for IE11 which send fr-FR and nothing else |
|
| 218 | $accept = $accept . ',' . $matches[1] . ';q=0.8'; |
|
| 219 | } |
|
| 220 | preg_match_all('/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i', $accept, $lang_parse); |
|
| 221 | ||
| 222 | if (count($lang_parse[1])) { |
|
| @@ 27-30 (lines=4) @@ | ||
| 24 | return $method . "'" . $path . "'" . $end; |
|
| 25 | } |
|
| 26 | $hash = ''; |
|
| 27 | if (preg_match('/^(.+)#(.+)$/', $path, $matches)) { |
|
| 28 | $path = $matches[1]; |
|
| 29 | $hash = '#' . $matches[2]; |
|
| 30 | } |
|
| 31 | $comp = $book->getComponentName($component, $path); |
|
| 32 | if (!$comp) { |
|
| 33 | return $method . "'#'" . $end; |
|