nlopess Sat May 1 15:58:13 2004 EDT
Modified files: /livedocs config.php.in handlers.php livedoc.php Log: kill some E_NOTICEs remove some unused constants fix the message if the translation is otdated for non DYNAMIC http://cvs.php.net/diff.php/livedocs/config.php.in?r1=1.8&r2=1.9&ty=u Index: livedocs/config.php.in diff -u livedocs/config.php.in:1.8 livedocs/config.php.in:1.9 --- livedocs/config.php.in:1.8 Sat Apr 3 14:22:43 2004 +++ livedocs/config.php.in Sat May 1 15:58:13 2004 @@ -19,15 +19,13 @@ // | the ./configure call | // +----------------------------------------------------------------------+ // -// $Id: config.php.in,v 1.8 2004/04/03 19:22:43 nlopess Exp $ +// $Id: config.php.in,v 1.9 2004/05/01 19:58:13 nlopess Exp $ define('FALLBACK_LANG', 'en'); define('PHPDOC', '@PHPDOCFORPHP@'); -define('LIVEDOCS', '@LIVEDOCSFORPHP@'); define('OUTPUTDIR', '@OUTPUTDIRFORPHP@'); define('FORCE_DYNAMIC', @FORCE_DYNAMIC@); define('WEBBASE', '@WEBBASE@'); -define('GENDIR', '@GENDIRFORPHP@'); define('LANGUAGES', '@LANGUAGES@'); define('THEME_NAME', '@THEMENAME@'); define('BUILD_TYPE', '@BUILDTYPE@'); http://cvs.php.net/diff.php/livedocs/handlers.php?r1=1.5&r2=1.6&ty=u Index: livedocs/handlers.php diff -u livedocs/handlers.php:1.5 livedocs/handlers.php:1.6 --- livedocs/handlers.php:1.5 Wed Apr 28 12:08:53 2004 +++ livedocs/handlers.php Sat May 1 15:58:13 2004 @@ -18,7 +18,7 @@ // | Special Handlers for $aliases | // +----------------------------------------------------------------------+ // -// $Id: handlers.php,v 1.5 2004/04/28 16:08:53 nlopess Exp $ +// $Id: handlers.php,v 1.6 2004/05/01 19:58:13 nlopess Exp $ /*********************************** @@ -63,7 +63,7 @@ echo "</div><hr />\n"; /* Sanitize index letter */ - if (preg_match('/^[A-Z]{0,1}$/i', $_GET['i'])) { + if (isset($_GET['i']) && preg_match('/^[A-Z]{0,1}$/i', $_GET['i'])) { $idxl = $_GET['i']; } else { $idxl = 'a'; http://cvs.php.net/diff.php/livedocs/livedoc.php?r1=1.97&r2=1.98&ty=u Index: livedocs/livedoc.php diff -u livedocs/livedoc.php:1.97 livedocs/livedoc.php:1.98 --- livedocs/livedoc.php:1.97 Sat May 1 06:31:13 2004 +++ livedocs/livedoc.php Sat May 1 15:58:13 2004 @@ -18,7 +18,7 @@ // | Generate an HTML version of a phpdoc/docbook page on the fly | // +----------------------------------------------------------------------+ // -// $Id: livedoc.php,v 1.97 2004/05/01 10:31:13 nlopess Exp $ +// $Id: livedoc.php,v 1.98 2004/05/01 19:58:13 nlopess Exp $ define('LIVEDOC_SOURCE', dirname(__FILE__)); include LIVEDOC_SOURCE . '/common.php'; @@ -125,7 +125,7 @@ } /* Checks if translated file is updated */ -if ($lang != 'en' && $lang_rev > 0) { +if ($lang != 'en' && isset($lang_rev)) { /* get english file revision */ $data = @file_get_contents(FALLBACK_BASE . $filename); @@ -136,7 +136,7 @@ } if ($lang_rev < $en_rev) { - $link = FORCE_DYNAMIC ? WEBBASE . "index.php?l=en&q=$current_page" : "en/$current_page.html"; + $link = FORCE_DYNAMIC ? WEBBASE . "index.php?l=en&q=$current_page" : WEBBASE . "en/$current_page.html"; echo '<div class="warning">The translation of this file is outdated. '; echo "<a href ='$link'>Click here to read this file in english.</a></div>"; }