cvs: docweb /include init.inc.php lib_general.inc.php /include/rfc rfc.php /scripts gen_picture_info.php gen_picture_info_all_lang.php rev.php /www
contact.php copyright.php credits.php error.php index.php revcheck.php

From: Date: Fri, 24 Sep 2004 17:32:19 +0000
Subject: cvs: docweb /include init.inc.php lib_general.inc.php /include/rfc rfc.php /scripts gen_picture_info.php gen_picture_info_all_lang.php rev.php /www
contact.php copyright.php credits.php error.php index.php revcheck.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-335@lists.php.net to get a copy of this message
sean Fri Sep 24 13:32:19 2004 EDT Added files: /docweb/include init.inc.php Modified files: /docweb/include lib_general.inc.php /docweb/include/rfc rfc.php /docweb/scripts gen_picture_info.php gen_picture_info_all_lang.php rev.php /docweb/www contact.php copyright.php credits.php error.php index.php revcheck.php Log: split init from libraries

http://cvs.php.net/diff.php/docweb/include/lib_general.inc.php?r1=1.26&r2=1.27&ty=u Index: docweb/include/lib_general.inc.php diff -u docweb/include/lib_general.inc.php:1.26 docweb/include/lib_general.inc.php:1.27 --- docweb/include/lib_general.inc.php:1.26 Mon Sep 13 14:57:23 2004 +++ docweb/include/lib_general.inc.php Fri Sep 24 13:32:19 2004 @@ -18,43 +18,9 @@ | Gabor Hojtsy <goba@php.net> | | Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ -$Id: lib_general.inc.php,v 1.26 2004/09/13 18:57:23 vincent Exp $ +$Id: lib_general.inc.php,v 1.27 2004/09/24 17:32:19 sean Exp $ */ -error_reporting(E_ALL); - -define('PATH_ROOT', realpath(dirname(__FILE__) . '/../')); -define('SQLITE_DIR', PATH_ROOT . '/sqlite/'); -define('CVS_DIR', PATH_ROOT . '/cvs/'); - -// project & language config -require_once('lib_proj_lang.inc.php'); - -// get defaults -list($defaultProject) = array_keys($PROJECTS); -list($defaultLanguage) = array_keys($LANGUAGES); - -// set up constants (use defaults if necessary) -define('SITE', isset($project) ? $project : $defaultProject); -define('LANGC', isset($language) ? $language : $defaultLanguage); -define('URI', isset($uri) ? $uri : $_SERVER['REQUEST_URI']); -define('LANGD', $LANGUAGES[LANGC]); - -// set up BASE_URL -if (substr($_SERVER['REQUEST_URI'], -1, 1) == '/') { - // is a directory, use verbatim - $baseURL = $_SERVER['REQUEST_URI']; -} else { - // not a dir, use the dirname - $baseURL = dirname($_SERVER['REQUEST_URI']); -} - -// this very dirty fix makes /rfc work -$baseURL = str_replace('/rfc', '', $baseURL); - -// actually define the constant (trim off any trailing slashes): -define('BASE_URL', rtrim($baseURL, '/')); - function is_translation($project, $language) { return is_dir(CVS_DIR . $GLOBALS['PROJECTS'][$project] . '/' . $language); @@ -88,7 +54,7 @@ $project = (in_array(SITE, array('www', 'livedocs')) ? 'php' : SITE); $locallinks = site_nav_provider(); $extlinks = ext_nav_provider(); - + $extra_style = ''; // prevent errors $guess_style = (in_array(SITE, array('www', 'livedocs', 'pecl')) ? '' : SITE . '.css'); @@ -96,7 +62,7 @@ foreach ($styles as $style_file) { if (!empty($style_file)) { $extra_style .= '@import url(/style/'. $style_file .");\n"; - } + } } // Set proper encoding with HTTP header first @@ -114,7 +80,7 @@ <link rel="shortcut icon" href="/images/favicon/{$project}/favicon.ico" /> <style type="text/css">@import url(/style/site.css); $extra_style</style> - + </head> <body> <div id="header"> @@ -208,8 +174,8 @@ section=\'' . $section . '\' AND file=\'' . $file . '\' AND doc=\'' . $doc . '\' - - ORDER BY + + ORDER BY date DESC'; $result = @sqlite_query($idx, $sql); @@ -252,7 +218,7 @@ if (!isset($project)) { $project = SITE; } if (!isset($lang)) { $lang = LANGC; } if (!isset($path)) { $path = URI; } - + $ret = '/'; if ($project != $GLOBALS['defaultProject']) { $ret .= "$project/"; http://cvs.php.net/diff.php/docweb/include/rfc/rfc.php?r1=1.11&r2=1.12&ty=u Index: docweb/include/rfc/rfc.php diff -u docweb/include/rfc/rfc.php:1.11 docweb/include/rfc/rfc.php:1.12 --- docweb/include/rfc/rfc.php:1.11 Mon Sep 20 12:17:34 2004 +++ docweb/include/rfc/rfc.php Fri Sep 24 13:32:19 2004 @@ -24,7 +24,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright Copyright (c) 1997-2004 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License - * @version $Id: rfc.php,v 1.11 2004/09/20 16:17:34 vincent Exp $ + * @version $Id: rfc.php,v 1.12 2004/09/24 17:32:19 sean Exp $ */ $path = realpath(dirname(__FILE__)); @@ -32,7 +32,7 @@ require_once 'DB.php'; require_once 'DB/storage.php'; require_once $path . '/rfc-config.php'; -require_once $path . '/../../include/lib_general.inc.php'; +require_once $path . '/../../include/init.inc.php'; define('PEAR_DATABASE_DSN', 'sqlite:///'.$path.'/../../sqlite/rfc.sqlite'); http://cvs.php.net/diff.php/docweb/scripts/gen_picture_info.php?r1=1.3&r2=1.4&ty=u Index: docweb/scripts/gen_picture_info.php diff -u docweb/scripts/gen_picture_info.php:1.3 docweb/scripts/gen_picture_info.php:1.4 --- docweb/scripts/gen_picture_info.php:1.3 Thu Aug 26 16:09:20 2004 +++ docweb/scripts/gen_picture_info.php Fri Sep 24 13:32:19 2004 @@ -3,7 +3,7 @@ include '../include/jpgraph/jpgraph_pie.php'; include '../include/jpgraph/jpgraph_pie3d.php'; -include '../include/lib_general.inc.php'; +include '../include/init.inc.php'; include '../include/lib_revcheck.inc.php'; $plop = array_shift($argv); http://cvs.php.net/diff.php/docweb/scripts/gen_picture_info_all_lang.php?r1=1.3&r2=1.4&ty=u Index: docweb/scripts/gen_picture_info_all_lang.php diff -u docweb/scripts/gen_picture_info_all_lang.php:1.3 docweb/scripts/gen_picture_info_all_lang.php:1.4 --- docweb/scripts/gen_picture_info_all_lang.php:1.3 Thu Aug 26 16:09:20 2004 +++ docweb/scripts/gen_picture_info_all_lang.php Fri Sep 24 13:32:19 2004 @@ -2,7 +2,7 @@ include '../include/jpgraph/jpgraph.php'; include '../include/jpgraph/jpgraph_bar.php'; -include '../include/lib_general.inc.php'; +include '../include/init.inc.php'; include '../include/lib_revcheck.inc.php'; http://cvs.php.net/diff.php/docweb/scripts/rev.php?r1=1.2&r2=1.3&ty=u Index: docweb/scripts/rev.php diff -u docweb/scripts/rev.php:1.2 docweb/scripts/rev.php:1.3 --- docweb/scripts/rev.php:1.2 Thu Aug 5 10:30:56 2004 +++ docweb/scripts/rev.php Fri Sep 24 13:32:19 2004 @@ -65,7 +65,7 @@ **/ // define some common variables -include '../include/lib_general.inc.php'; +include '../include/init.inc.php'; // grab the documentation type $TYPE = array_shift($argv); http://cvs.php.net/diff.php/docweb/www/contact.php?r1=1.3&r2=1.4&ty=u Index: docweb/www/contact.php diff -u docweb/www/contact.php:1.3 docweb/www/contact.php:1.4 --- docweb/www/contact.php:1.3 Sat Sep 11 08:33:52 2004 +++ docweb/www/contact.php Fri Sep 24 13:32:19 2004 @@ -1,8 +1,8 @@ <?php -/* $Id: contact.php,v 1.3 2004/09/11 12:33:52 goba Exp $ */ +/* $Id: contact.php,v 1.4 2004/09/24 17:32:19 sean Exp $ */ // TODO: list of all project mailing lists somewhere (not here!) -include_once '../include/lib_general.inc.php'; +include_once '../include/init.inc.php'; echo site_header('Contact'); ?> <p> http://cvs.php.net/diff.php/docweb/www/copyright.php?r1=1.4&r2=1.5&ty=u Index: docweb/www/copyright.php diff -u docweb/www/copyright.php:1.4 docweb/www/copyright.php:1.5 --- docweb/www/copyright.php:1.4 Sat Sep 11 08:35:18 2004 +++ docweb/www/copyright.php Fri Sep 24 13:32:19 2004 @@ -1,7 +1,7 @@ <?php -/* $Id: copyright.php,v 1.4 2004/09/11 12:35:18 goba Exp $ */ +/* $Id: copyright.php,v 1.5 2004/09/24 17:32:19 sean Exp $ */ -include_once '../include/lib_general.inc.php'; +include_once '../include/init.inc.php'; echo site_header('Copyright'); ?> <h2>Source Code Copyright</h2> http://cvs.php.net/diff.php/docweb/www/credits.php?r1=1.6&r2=1.7&ty=u Index: docweb/www/credits.php diff -u docweb/www/credits.php:1.6 docweb/www/credits.php:1.7 --- docweb/www/credits.php:1.6 Sat Sep 11 19:17:15 2004 +++ docweb/www/credits.php Fri Sep 24 13:32:19 2004 @@ -1,7 +1,7 @@ <?php -/* $Id: credits.php,v 1.6 2004/09/11 23:17:15 sean Exp $ */ +/* $Id: credits.php,v 1.7 2004/09/24 17:32:19 sean Exp $ */ -include '../include/lib_general.inc.php'; +include '../include/init.inc.php'; echo site_header('Website credits'); ?> <p> http://cvs.php.net/diff.php/docweb/www/error.php?r1=1.6&r2=1.7&ty=u Index: docweb/www/error.php diff -u docweb/www/error.php:1.6 docweb/www/error.php:1.7 --- docweb/www/error.php:1.6 Tue Sep 21 14:51:31 2004 +++ docweb/www/error.php Fri Sep 24 13:32:19 2004 @@ -1,7 +1,7 @@ <?php -/* $Id: error.php,v 1.6 2004/09/21 18:51:31 vincent Exp $ */ +/* $Id: error.php,v 1.7 2004/09/24 17:32:19 sean Exp $ */ -include '../include/lib_general.inc.php'; +include '../include/init.inc.php'; $red_status = isset($_SERVER["REDIRECT_STATUS"]) ? $_SERVER["REDIRECT_STATUS"] : ''; $title = 'Apache :: Error ' . $red_status; http://cvs.php.net/diff.php/docweb/www/index.php?r1=1.2&r2=1.3&ty=u Index: docweb/www/index.php diff -u docweb/www/index.php:1.2 docweb/www/index.php:1.3 --- docweb/www/index.php:1.2 Thu Aug 5 12:19:10 2004 +++ docweb/www/index.php Fri Sep 24 13:32:19 2004 @@ -1,7 +1,7 @@ <?php -/* $Id: index.php,v 1.2 2004/08/05 16:19:10 jacques Exp $ */ +/* $Id: index.php,v 1.3 2004/09/24 17:32:19 sean Exp $ */ -include_once '../include/lib_general.inc.php'; +include_once '../include/init.inc.php'; echo site_header('Welcome!'); ?> <h2>What is this site?</h2> http://cvs.php.net/diff.php/docweb/www/revcheck.php?r1=1.5&r2=1.6&ty=u Index: docweb/www/revcheck.php diff -u docweb/www/revcheck.php:1.5 docweb/www/revcheck.php:1.6 --- docweb/www/revcheck.php:1.5 Mon Sep 20 16:02:58 2004 +++ docweb/www/revcheck.php Fri Sep 24 13:32:19 2004 @@ -1,7 +1,7 @@ <?php -/* $Id: revcheck.php,v 1.5 2004/09/20 20:02:58 vincent Exp $ */ +/* $Id: revcheck.php,v 1.6 2004/09/24 17:32:19 sean Exp $ */ -include '../include/lib_general.inc.php'; +include '../include/init.inc.php'; include '../include/lib_revcheck.inc.php'; $LANG = LANGC; http://cvs.php.net/co.php/docweb/include/init.inc.php?r=1.1&p=1 Index: docweb/include/init.inc.php +++ docweb/include/init.inc.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +----------------------------------------------------------------------+ | PHP Documentation Tools Site Source Code | +----------------------------------------------------------------------+ | Copyright (c) 1997-2004 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_0.txt. | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Yannick Torres <yannick@php.net> | | Mehdi Achour <didou@php.net> | | Gabor Hojtsy <goba@php.net> | | Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ $Id: init.inc.php,v 1.1 2004/09/24 17:32:19 sean Exp $ */ error_reporting(E_ALL); define('PATH_ROOT', realpath(dirname(__FILE__) . '/../')); define('SQLITE_DIR', PATH_ROOT . '/sqlite/'); define('CVS_DIR', PATH_ROOT . '/cvs/'); // project & language config require_once('lib_proj_lang.inc.php'); // get defaults list($defaultProject) = array_keys($PROJECTS); list($defaultLanguage) = array_keys($LANGUAGES); // set up constants (use defaults if necessary) define('SITE', isset($project) ? $project : $defaultProject); define('LANGC', isset($language) ? $language : $defaultLanguage); define('URI', isset($uri) ? $uri : $_SERVER['REQUEST_URI']); define('LANGD', $LANGUAGES[LANGC]); // set up BASE_URL if (substr($_SERVER['REQUEST_URI'], -1, 1) == '/') { // is a directory, use verbatim $baseURL = $_SERVER['REQUEST_URI']; } else { // not a dir, use the dirname $baseURL = dirname($_SERVER['REQUEST_URI']); } // this very dirty fix makes /rfc work $baseURL = str_replace('/rfc', '', $baseURL); // actually define the constant (trim off any trailing slashes): define('BASE_URL', rtrim($baseURL, '/')); require_once('lib_general.inc.php'); ?>
« previous php.doc.web (#335) next »