Commit e77b6304 authored by Konstantin Pavlov's avatar Konstantin Pavlov

Use SCRIPT_NAME instead of SCRIPT_FILENAME.

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