cvs: phpweb / docs.php download-docs.php /include prepend.inc site.inc

From: Date: Sat, 01 Mar 2003 16:14:35 +0000
Subject: cvs: phpweb / docs.php download-docs.php /include prepend.inc site.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-15970@lists.php.net to get a copy of this message
goba Sat Mar 1 11:14:35 2003 EDT Modified files: /phpweb/include prepend.inc site.inc /phpweb docs.php download-docs.php Log: Integrate the langauge chooser to the main site flow, and update the documentation pages to use the new $LANG var to display documentation download pages "customized" to the user This also makes preferred_language()'s remove, as $LANG is perfect for this purpose... Index: phpweb/include/prepend.inc diff -u phpweb/include/prepend.inc:1.17 phpweb/include/prepend.inc:1.18 --- phpweb/include/prepend.inc:1.17 Tue Jan 7 17:15:57 2003 +++ phpweb/include/prepend.inc Sat Mar 1 11:14:34 2003 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: prepend.inc,v 1.17 2003/01/07 22:15:57 goba Exp $ +// $Id: prepend.inc,v 1.18 2003/03/01 16:14:34 goba Exp $ // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 // for cache control header descriptions (used in many places on the site). @@ -26,8 +26,13 @@ // Put the magic quotes setting to $MQ $MQ = (boolean) get_magic_quotes_gpc(); -// Load in always required parts +// Site details (mirror site information) include_once 'site.inc'; + +// Choose language used for translated parts +include_once 'langchooser.inc'; + +// Common layout functions include_once 'layout.inc'; // This file is generated on rsync.php.net and propogated Index: phpweb/include/site.inc diff -u phpweb/include/site.inc:1.240 phpweb/include/site.inc:1.241 --- phpweb/include/site.inc:1.240 Sun Jan 19 12:50:34 2003 +++ phpweb/include/site.inc Sat Mar 1 11:14:34 2003 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: site.inc,v 1.240 2003/01/19 17:50:34 goba Exp $ +// $Id: site.inc,v 1.241 2003/03/01 16:14:34 goba Exp $ // Define $MIRRORS array, and some constants include_once 'mirrors.inc'; @@ -43,13 +43,6 @@ global $MIRRORS, $MYSITE; if (!$site) { $site = $MYSITE; } return $MIRRORS[$site][6]; -} - -// Returns the preferred language, -// honoring user settings [for future usage] -function preferred_language() -{ - return default_language(); } // Returns true if the current (or specified) mirror Index: phpweb/docs.php diff -u phpweb/docs.php:1.121 phpweb/docs.php:1.122 --- phpweb/docs.php:1.121 Thu Jan 2 16:59:29 2003 +++ phpweb/docs.php Sat Mar 1 11:14:35 2003 @@ -86,7 +86,7 @@ foreach ($man_languages as $langnum => $langcode) { // Make preferred language bold - if ($langcode == preferred_language()) { echo "<b>"; } + if ($langcode == $LANG) { echo "<b>"; } echo '<a href="/manual/' . $langcode . '/">' . $LANGUAGES[$langcode] . '</a>'; echo ($lastlang != $langnum) ? ", " : ""; @@ -96,7 +96,7 @@ echo '<a href="http://dev.nexen.net/docs/php/annotee/">[Special French]</a>, '; } - if ($langcode == preferred_language()) { echo "</b>"; } + if ($langcode == $LANG) { echo "</b>"; } } @@ -107,10 +107,10 @@ // List printer friendly pages of all manual languages foreach ($man_languages as $langnum => $langcode) { - if ($langcode == preferred_language()) { echo "<b>"; } + if ($langcode == $LANG) { echo "<b>"; } echo '<a href="/manual/' . $langcode . '/print/index.php">' . $LANGUAGES[$langcode] . '</a>'; echo ($lastlang != $langnum) ? ", " : ""; - if ($langcode == preferred_language()) { echo "</b>"; } + if ($langcode == $LANG) { echo "</b>"; } } ?> @@ -120,10 +120,10 @@ // List printer friendly pages with notes of all manual languages foreach ($man_languages as $langnum => $langcode) { - if ($langcode == preferred_language()) { echo "<b>"; } + if ($langcode == $LANG) { echo "<b>"; } echo '<a href="/manual/' . $langcode . '/printwn/index.php">' . $LANGUAGES[$langcode] . '</a>'; echo ($lastlang != $langnum) ? ", " : ""; - if ($langcode == preferred_language()) { echo "</b>"; } + if ($langcode == $LANG) { echo "</b>"; } } ?> Index: phpweb/download-docs.php diff -u phpweb/download-docs.php:1.45 phpweb/download-docs.php:1.46 --- phpweb/download-docs.php:1.45 Thu Jan 2 17:59:53 2003 +++ phpweb/download-docs.php Sat Mar 1 11:14:35 2003 @@ -84,8 +84,8 @@ // Go through all possible manual languages foreach ($LANGUAGES as $langcode => $language) { - // See if current language is preferred - if ($langcode == preferred_language()) { $preflang = TRUE; } + // See if current language is the preferred one + if ($langcode == $LANG) { $preflang = TRUE; } else { $preflang = FALSE; } // Reset files array and format counter

« previous php.mirrors (#15970) next »