Skip to content
Snippets Groups Projects
Commit e77b6304 authored by Konstantin Pavlov's avatar Konstantin Pavlov
Browse files

Use SCRIPT_NAME instead of SCRIPT_FILENAME.

parent 2f8aa5a6
No related branches found
No related tags found
No related merge requests found
......@@ -95,7 +95,7 @@ function footer($tag = "", $alternate_lang=array(), $additional_class = "") {
if( isset($alternate_lang) && count($alternate_lang) > 0 ) {
echo "<div class='footerHeading'>Translations: ";
echo '<select ONCHANGE="location = this.options[this.selectedIndex].value;">';
$root_filename = explode('.', $_SERVER['SCRIPT_FILENAME'] );
$root_filename = explode('.', $_SERVER['SCRIPT_NAME'] );
echo '<option value="/'.$root_filename[0].'.html">&nbsp;</option>'."\n";
foreach($alternate_lang as $lang) {
if( $lang == "en" )
......
......@@ -164,7 +164,7 @@ function start_head( $title,
<?php
/* Alternate */
if( isset($alternate_lang) ) {
$root_filename = explode('.', $_SERVER['SCRIPT_FILENAME'] );
$root_filename = explode('.', $_SERVER['SCRIPT_NAME'] );
echo "<!-- ".$root_filename[0]." -->";
foreach($alternate_lang as $lang) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment