Index: anwiki/_override/global/global/global.tpl.php |
=================================================================== |
--- a/anwiki/_override/global/global/global.tpl.php |
+++ b/anwiki/_override/global/global/global.tpl.php |
@@ -13,35 +13,19 @@ class AnwTemplateOverride_global extends |
</head> |
<body> |
$sBody |
</body> |
</html> |
EOF; |
- $HTML = $this->moveLanguageSelection($HTML); |
return $this->moveMetaTagsToHead($HTML); |
} |
- private function moveLanguageSelection($HTML) |
- { |
- $pattern = '/{{#LANGUAGESELECTION}}(.*){{\/LANGUAGESELECTION}}/s'; |
- preg_match($pattern, $HTML, $matches); |
- if (count($matches) > 1) |
- { |
- $HTML = preg_replace($pattern, "", $HTML); |
- $languageSelection = $matches[1]; |
- } |
- else |
- $languageSelection = ""; |
- $HTML = preg_replace('/<li>\s*<a\b.*?>LANGUAGESELECTION<\/a>\s*<\/li>/', $languageSelection, $HTML); |
- return $HTML; |
- } |
- |
private function moveMetaTagsToHead($HTML) |
{ |
do |
{ |
$HTML = preg_replace('/(<\/head>.*<body\b.*)(<meta\b[^>]*\/>\s*)/is', '$2$1', $HTML, 1, $count); |
} while ($count); |
return $HTML; |
} |