Index: build-ops.in =================================================================== RCS file: /repository/docweb/build-ops.in,v retrieving revision 1.5 diff -u -r1.5 build-ops.in --- build-ops.in 5 Mar 2006 18:06:43 -0000 1.5 +++ build-ops.in 18 Jan 2007 20:43:37 -0000 @@ -12,4 +12,4 @@ WWWUSER=@WWWUSER@ WWWGROUP=@WWWGROUP@ LIVEDOCS=@LIVEDOCS@ - +URL_PREFIX=@URL_PREFIX@ Index: build-ops.php.in =================================================================== RCS file: /repository/docweb/build-ops.php.in,v retrieving revision 1.5 diff -u -r1.5 build-ops.php.in --- build-ops.php.in 5 Mar 2006 18:06:43 -0000 1.5 +++ build-ops.php.in 18 Jan 2007 20:43:37 -0000 @@ -14,5 +14,6 @@ define('WWW_USER', '@WWWUSER@'); define('WWW_GROUP', '@WWWGROUP@'); define('LIVEDOCS', '@LIVEDOCS@'); +define('URL_PREFIX', '@URL_PREFIX@'); ?> Index: configure.in =================================================================== RCS file: /repository/docweb/configure.in,v retrieving revision 1.8 diff -u -r1.8 configure.in --- configure.in 5 Mar 2006 18:06:43 -0000 1.8 +++ configure.in 18 Jan 2007 20:43:37 -0000 @@ -90,6 +90,10 @@ [LIVEDOCS="$withval"], [LIVEDOCS="http://docs.php.net/"]) +AC_ARG_WITH(url-prefix,[ --with-url-prefix[=URL] URL to docweb used in redirections [default=http://doc.php.net/]], + [URL_PREFIX="$withval"], + [URL_PREFIX="http://doc.php.net/"]) + DOCWEB=`pwd` if test `uname|grep CYGWIN` ; then @@ -102,6 +106,7 @@ SQLITEDIR=`cygpath -m $SQLITEDIR` FILESDIR=`cygpath -m $FILESDIR` SRCDIR=`cygpath -m $SRCDIR` + URL_PREFIX=`cygpath -m $URL_PREFIX` fi @@ -117,6 +122,7 @@ AC_SUBST(WWWUSER) AC_SUBST(WWWGROUP) AC_SUBST(LIVEDOCS) +AC_SUBST(URL_PREFIX) AC_OUTPUT(build-ops.php build-ops) Index: include/lib_auth.inc.php =================================================================== RCS file: /repository/docweb/include/lib_auth.inc.php,v retrieving revision 1.16 diff -u -r1.16 lib_auth.inc.php --- include/lib_auth.inc.php 5 Dec 2006 17:53:15 -0000 1.16 +++ include/lib_auth.inc.php 18 Jan 2007 20:43:38 -0000 @@ -43,9 +43,10 @@ // make the username & password global if (isset($_COOKIE['MAGIC_COOKIE'])) { - list($user, $password) = explode(':', base64_decode(@$_COOKIE['MAGIC_COOKIE']), 2); + list($user, $password) = explode(':', base64_decode($_COOKIE['MAGIC_COOKIE']), 2); } + /** * Credential checking of the $_COOKIE['MAGIC_COOKIE'] */ @@ -55,14 +56,13 @@ $return = urlencode($_SERVER['REQUEST_URI']); if (isset($_COOKIE['MAGIC_COOKIE'])) { - if (!verify_password($user, $password)) { - header ('Location: http://doc.php.net/login.php?return='.$return); + header ('Location: '.URL_PREFIX.'login.php?return='.$return); exit; } } elseif (isset($_POST['username']) && isset($_POST['passwd'])) { if (!verify_password($_POST['username'], $_POST['passwd'])) { - header ('Location: http://doc.php.net/login.php?return='.$return); + header ('Location: '.URL_PREFIX.'login.php?return='.$return); exit; } @@ -73,8 +73,10 @@ '/', '.php.net' ); + $GLOBALS['user'] = $_POST['username']; + $GLOBALS['password'] = $_POST['passwd']; } else { - header ('Location: http://doc.php.net/login.php?return='.$return); + header ('Location: '.URL_PREFIX.'login.php?return='.$return); exit; } } Index: include/rfc/rfc.php =================================================================== RCS file: /repository/docweb/include/rfc/rfc.php,v retrieving revision 1.23 diff -u -r1.23 rfc.php --- include/rfc/rfc.php 4 Dec 2006 23:18:04 -0000 1.23 +++ include/rfc/rfc.php 18 Jan 2007 20:43:39 -0000 @@ -751,7 +751,7 @@ { // !!! global $dbh; - $master_url = 'http://doc.php.net/'; + $master_url = URL_PREFIX; require dirname(__FILE__) . '/rfc-emails.php'; $email = $proposalEmailTexts[$event]; if (empty($email)) {