the solution to livedocs problem

From: Date: Tue, 01 Jun 2004 14:18:12 +0000
Subject: the solution to livedocs problem
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969361122@lists.php.net to get a copy of this message
Hello, Here is my patch to solve the problem in livedocs that I've told you before (the DB was having absolute paths instead of relative in windows). Nuno

Index: configure.in =================================================================== RCS file: /repository/livedocs/configure.in,v retrieving revision 1.26 diff -u -r1.26 configure.in --- configure.in 25 May 2004 11:33:48 -0000 1.26 +++ configure.in 1 Jun 2004 14:10:22 -0000 @@ -97,10 +97,10 @@ if test `uname|grep CYGWIN` ; then lncmd='cp -rf' - PHPDOCFORPHP=`cygpath -w $PHPDOC` - GENDIRFORPHP=`cygpath -w $GENDIR` - LIVEDOCSFORPHP=`cygpath -w $LIVEDOCS` - OUTPUTDIRFORPHP=`cygpath -w $OUTPUTDIR` + PHPDOCFORPHP=`cygpath -m $PHPDOC` + GENDIRFORPHP=`cygpath -m $GENDIR` + LIVEDOCSFORPHP=`cygpath -m $LIVEDOCS` + OUTPUTDIRFORPHP=`cygpath -m $OUTPUTDIR` else lncmd='ln -sf' PHPDOCFORPHP=$PHPDOC @@ -142,6 +142,7 @@ $lncmd $LIVEDOCS/error.php $OUTPUTDIR/error.php $lncmd $LIVEDOCS/style_mapping.php $OUTPUTDIR/style_mapping.php $lncmd $LIVEDOCS/xml_classes.php $OUTPUTDIR/xml_classes.php + $lncmd $LIVEDOCS/xml_classes5.php $OUTPUTDIR/xml_classes5.php $lncmd $LIVEDOCS/search.php $OUTPUTDIR/search.php $lncmd $LIVEDOCS/handlers.php $OUTPUTDIR/handlers.php rm -rf $OUTPUTDIR/themes Index: mkindex.php =================================================================== RCS file: /repository/livedocs/mkindex.php,v retrieving revision 1.35 diff -u -r1.35 mkindex.php --- mkindex.php 25 May 2004 11:33:48 -0000 1.35 +++ mkindex.php 1 Jun 2004 14:10:22 -0000 @@ -222,11 +222,11 @@ } $x = preg_match_all('/<!ENTITY\s+([a-zA-Z0-9.-]+)\s+SYSTEM\s+\'([^\']+)\'>/Usm', $d, $matches); - $docs = $GLOBALS['DOCS'] . DIRECTORY_SEPARATOR; + $docs = $GLOBALS['DOCS'] . '/'; $docslen = strlen($docs); - $realdocs = realpath($docs) . DIRECTORY_SEPARATOR; + $realdocs = realpath($docs) . '/'; $reallen = strlen($realdocs); - $lang = $GLOBALS['LANG'] . DIRECTORY_SEPARATOR; + $lang = $GLOBALS['LANG'] . '/'; $langlen = strlen($lang); for ($i = 0; $i < $x; $i++) { $id = sqlite_escape_string($matches[1][$i]); Index: scripts/file-entities.php.in =================================================================== RCS file: /repository/phpdoc/scripts/file-entities.php.in,v retrieving revision 1.14 diff -u -r1.14 file-entities.php.in --- scripts/file-entities.php.in 1 Jan 2004 01:08:46 -0000 1.14 +++ scripts/file-entities.php.in 1 Jun 2004 14:10:43 -0000 @@ -370,6 +370,6 @@ * @param string $path Orginal path */ function strip_cygdrive($path){ - return preg_replace("!^/cygdrive/(\\w)/!", "\\1:/", $path); + return preg_replace('/^\/cygdrive\/(\w)\//e', 'strtoupper("\1").":/";', $path); } ?>
« previous php.doc (#969361122) next »