cvs: phpweb / docs.php my.php /include languages.inc shared-manual.inc

From: Date: Thu, 10 Apr 2008 18:41:13 +0000
Subject: cvs: phpweb / docs.php my.php /include languages.inc shared-manual.inc
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-1495@lists.php.net to get a copy of this message
philip Thu Apr 10 18:41:13 2008 UTC Modified files: /phpweb/include languages.inc shared-manual.inc /phpweb docs.php my.php Log: Define and utilize $ACTIVE_ONLINE_LANGUAGES http://cvs.php.net/viewvc.cgi/phpweb/include/languages.inc?r1=1.16&r2=1.17&diff_format=u Index: phpweb/include/languages.inc diff -u phpweb/include/languages.inc:1.16 phpweb/include/languages.inc:1.17 --- phpweb/include/languages.inc:1.16 Thu Apr 10 17:52:03 2008 +++ phpweb/include/languages.inc Thu Apr 10 18:41:13 2008 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: languages.inc,v 1.16 2008/04/10 17:52:03 philip Exp $ +// $Id: languages.inc,v 1.17 2008/04/10 18:41:13 philip Exp $ /* This is a list of all manual languages hosted @@ -79,6 +79,8 @@ 'tr' => 'Turkish', ); +$ACTIVE_ONLINE_LANGUAGES = array_diff($LANGUAGES, $INACTIVE_ONLINE_LANGUAGES); + // Convert between language codes back and forth // [We use non standard languages codes and so conversion // is needed when communicating with the outside world] http://cvs.php.net/viewvc.cgi/phpweb/include/shared-manual.inc?r1=1.239&r2=1.240&diff_format=u Index: phpweb/include/shared-manual.inc diff -u phpweb/include/shared-manual.inc:1.239 phpweb/include/shared-manual.inc:1.240 --- phpweb/include/shared-manual.inc:1.239 Wed Apr 9 18:12:47 2008 +++ phpweb/include/shared-manual.inc Thu Apr 10 18:41:13 2008 @@ -1,6 +1,6 @@ <?php // -*- C++ -*- -// $Id: shared-manual.inc,v 1.239 2008/04/09 18:12:47 philip Exp $ +// $Id: shared-manual.inc,v 1.240 2008/04/10 18:41:13 philip Exp $ /* @@ -150,7 +150,7 @@ function manual_navbar($location = "top") { - global $PGI, $LANG, $LANGUAGES, $INACTIVE_ONLINE_LANGUAGES; + global $PGI, $LANG, $LANGUAGES, $INACTIVE_ONLINE_LANGUAGES, $ACTIVE_ONLINE_LANGUAGES; // Start navbar with echo "<!--UdmComment-->\n<div class=\"manualnavbar manualnavbar_$location\">\n <span class=\"next\">\n"; @@ -182,11 +182,9 @@ // Quick access to filename $filename = $PGI['this'][0]; - // Disable all languages without online content - $online_languages = array_diff($LANGUAGES, $INACTIVE_ONLINE_LANGUAGES); - + // Disable all languages without online content // Add a dropdown item for all languages left - foreach ($online_languages as $code => $name) { + foreach ($ACTIVE_ONLINE_LANGUAGES as $code => $name) { if (!preg_match("!/$code/!", $_SERVER['BASE_PAGE']) // && file_exists($_SERVER['DOCUMENT_ROOT'] . "/$code/$filename") ) { http://cvs.php.net/viewvc.cgi/phpweb/docs.php?r1=1.140&r2=1.141&diff_format=u Index: phpweb/docs.php diff -u phpweb/docs.php:1.140 phpweb/docs.php:1.141 --- phpweb/docs.php:1.140 Fri Jan 11 11:28:57 2008 +++ phpweb/docs.php Thu Apr 10 18:41:13 2008 @@ -1,5 +1,5 @@ <?php -// $Id: docs.php,v 1.140 2008/01/11 11:28:57 bjori Exp $ +// $Id: docs.php,v 1.141 2008/04/10 18:41:13 philip Exp $ $_SERVER['BASE_PAGE'] = 'docs.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; @@ -44,8 +44,7 @@ // Check for really available manual languages $man_languages = array(); // Remove inactive online languages from the list to show -$online_languages = array_diff($LANGUAGES, $INACTIVE_ONLINE_LANGUAGES); -foreach ($online_languages as $code => $langname) { +foreach ($ACTIVE_ONLINE_LANGUAGES as $code => $langname) { // Avoid this stat call here for the moment // if (file_exists("manual/$code/index.php")) { $man_languages[] = $code; http://cvs.php.net/viewvc.cgi/phpweb/my.php?r1=1.35&r2=1.36&diff_format=u Index: phpweb/my.php diff -u phpweb/my.php:1.35 phpweb/my.php:1.36 --- phpweb/my.php:1.35 Sun Feb 24 22:28:59 2008 +++ phpweb/my.php Thu Apr 10 18:41:13 2008 @@ -1,5 +1,5 @@ <?php -// $Id: my.php,v 1.35 2008/02/24 22:28:59 bjori Exp $ +// $Id: my.php,v 1.36 2008/04/10 18:41:13 philip Exp $ $_SERVER['BASE_PAGE'] = 'my.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; @@ -7,7 +7,7 @@ header_nocache(); // Languages array copy and options to list -$langs = array_diff($LANGUAGES, $INACTIVE_ONLINE_LANGUAGES); +$langs = $ACTIVE_ONLINE_LANGUAGES; $options = array(); // We have post data, and it is an available language

« previous php.webmaster (#1495) next »