[www-doc] [Git][VideoLAN.org/websites][master] Use SCRIPT_NAME instead of SCRIPT_FILENAME.

Konstantin Pavlov gitlab at videolan.org
Mon Jun 19 21:48:57 CEST 2017


Konstantin Pavlov pushed to branch master at VideoLAN organization / websites


Commits:
e77b6304 by Konstantin Pavlov at 2017-06-19T22:48:32+03:00
Use SCRIPT_NAME instead of SCRIPT_FILENAME.

- - - - -


2 changed files:

- www.videolan.org/include/footer.php
- www.videolan.org/include/header.php


Changes:

=====================================
www.videolan.org/include/footer.php
=====================================
--- a/www.videolan.org/include/footer.php
+++ b/www.videolan.org/include/footer.php
@@ -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"> </option>'."\n";
                         foreach($alternate_lang as $lang) {
                             if( $lang == "en" )


=====================================
www.videolan.org/include/header.php
=====================================
--- a/www.videolan.org/include/header.php
+++ b/www.videolan.org/include/header.php
@@ -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) {



View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/commit/e77b6304f336635f29ce0813911c394fd09271e3

---
View it on GitLab: https://code.videolan.org/VideoLAN.org/websites/commit/e77b6304f336635f29ce0813911c394fd09271e3
You're receiving this email because of your account on code.videolan.org.


More information about the www-doc mailing list