php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40982 Livedocs uses old paths for XSL files
Submitted: 2007-04-02 21:22 UTC Modified: 2007-04-18 08:21 UTC
From: edwardzyang at thewritingpot dot com Assigned: bjori (profile)
Status: Closed Package: Livedocs problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: edwardzyang at thewritingpot dot com
New email:
PHP Version: OS:

 

 [2007-04-02 21:22 UTC] edwardzyang at thewritingpot dot com
Description:
------------
Livedocs uses old paths for XSL files: they've been moved to different locations, so the build process fails. The fixes are simple, patches are included:

Index: mkindex.php
===================================================================
RCS file: /repository/livedocs/mkindex.php,v
retrieving revision 1.47
diff -u -r1.47 mkindex.php
--- mkindex.php	18 Sep 2005 14:04:27 -0000	1.47
+++ mkindex.php	2 Apr 2007 19:33:18 -0000
@@ -169,7 +169,7 @@
 function build_func_list() {
 	global $idx;
 
-	$list = file_get_contents($GLOBALS['DOCS'] . DIRECTORY_SEPARATOR . "xsl/version.xml");
+	$list = file_get_contents($GLOBALS['DOCS'] . DIRECTORY_SEPARATOR . "phpbook/phpbook-xsl/version.xml");
 	$x = preg_match_all('@<function name=([\'"])([a-zA-Z0-9_]+)\\1 from=([\'"])(.+)\\3@Usm', $list, $matches);
 	$data = '';
 	for ($i = 0; $i < $x; $i++) {

Index: build.sh
===================================================================
RCS file: /repository/livedocs/build.sh,v
retrieving revision 1.31
diff -u -r1.31 build.sh
--- build.sh	14 Aug 2006 16:37:19 -0000	1.31
+++ build.sh	2 Apr 2007 19:27:12 -0000
@@ -10,7 +10,7 @@
 	echo "Building user notes"
 	TOKEN=$NOTES_TOKEN
 	export TOKEN
-	${PHP} ${LIVEDOCS}/mk_notes.php ${OUTPUTDIR} ${GENDIR} ${NOTES_MIRROR}
+	${PHP} ${LIVEDOCS}/mk_notes.php "${OUTPUTDIR}" ${GENDIR} ${NOTES_MIRROR}
 #fi
 
 # running ./buildconf
@@ -56,15 +56,15 @@
 	echo -n "Making index for $i: "
 	date
 	${PHP} ${LIVEDOCS}/mkindex.php ${PHPDOC} $i ${GENDIR} ${BUILDTYPE}
-	mv ${GENDIR}/livedoc-idx.$i.sqlite ${OUTPUTDIR}
+	mv ${GENDIR}/livedoc-idx.$i.sqlite "${OUTPUTDIR}"
 	# create output dir
-	mkdir -p ${OUTPUTDIR}/$i
-	chmod 0777 ${OUTPUTDIR}/$i
+	mkdir -p "${OUTPUTDIR}/$i"
+	chmod 0777 "${OUTPUTDIR}/$i"
 	# remove cached manual pages
-	rm -f ${OUTPUTDIR}/$i/*.html
+	rm -f "${OUTPUTDIR}/$i/*.html"
 	# make search cache database
-	mv ${GENDIR}/livedoc-cache-idx.$i.sqlite ${OUTPUTDIR}/$i/
-	chmod 0666 ${OUTPUTDIR}/$i/livedoc-cache-idx.$i.sqlite
+	mv ${GENDIR}/livedoc-cache-idx.$i.sqlite "${OUTPUTDIR}/$i/"
+	chmod 0666 "${OUTPUTDIR}/$i/livedoc-cache-idx.$i.sqlite"
 	cd $curpath

Second patch also includes some quotes that prevent the build script from choking when ${OUTPUTDIR} has spaces in it, feel free to remove since that's really a different bug.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-18 08:19 UTC] bjori@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Both fixed
 [2007-04-18 08:21 UTC] bjori@php.net
Heh. obviously this "snapshot" paragraph was wrong.

I'll fix that bug soonish :)

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Sep 22 09:01:23 2020 UTC