cvs: docweb /include lib_general.inc.php

From: Date: Mon, 13 Sep 2004 17:49:09 +0000
Subject: cvs: docweb /include lib_general.inc.php
Groups: php.doc.web 
Request: Send a blank email to doc-web+get-303@lists.php.net to get a copy of this message
vincent Mon Sep 13 13:49:09 2004 EDT Modified files: /docweb/include lib_general.inc.php Log: Very dirty hack to fix the RFC System links # something is better thn nothing http://cvs.php.net/diff.php/docweb/include/lib_general.inc.php?r1=1.23&r2=1.24&ty=u Index: docweb/include/lib_general.inc.php diff -u docweb/include/lib_general.inc.php:1.23 docweb/include/lib_general.inc.php:1.24 --- docweb/include/lib_general.inc.php:1.23 Sun Sep 12 02:26:47 2004 +++ docweb/include/lib_general.inc.php Mon Sep 13 13:49:09 2004 @@ -18,7 +18,7 @@ | Gabor Hojtsy <goba@php.net> | | Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ -$Id: lib_general.inc.php,v 1.23 2004/09/12 06:26:47 sean Exp $ +$Id: lib_general.inc.php,v 1.24 2004/09/13 17:49:09 vincent Exp $ */ error_reporting(E_ALL); @@ -48,6 +48,10 @@ // 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, '/')); @@ -271,14 +275,14 @@ { $links = array('<a href="'. BASE_URL .'/">Subsite homepage</a>'); $links[] = '<a href="'. BASE_URL .'/rfc/rfc-overview.php">Request For Comments</a>'; + if (strpos($_SERVER['REQUEST_URI'], 'rfc') !== false) { + $links[] = '<a href="'. BASE_URL .'/rfc/rfc-proposal-edit.php">Submit RFC</a>'; + } if (in_array(SITE, array('gtk', 'pear', 'php', 'smarty'))) { $links[] = '<a href="'. BASE_URL .'/revcheck.php">Revision check</a>'; } if (SITE == 'php') { $links[] = '<a href="'. BASE_URL .'/dochowto/index.php">Documentation Howto</a>'; - } - if (strpos($_SERVER['PHP_SELF'], 'rfc') !== false) { - $links[] = '<a href="'. BASE_URL .'/rfc/rfc-proposal-edit.php">Submit RFC</a>'; } if (count($links) == 0) { $links[] = 'N/A';

« previous php.doc.web (#303) next »