cvs: phpdoc(REF_STRUCT_DEV) /scripts file-entities.php.in
| From: | Hannes Magnusson | Date: | Fri, 28 Sep 2007 12:51:59 +0000 |
| Subject: | cvs: phpdoc(REF_STRUCT_DEV) /scripts file-entities.php.in | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-71@lists.php.net to get a copy of this message | ||
bjori Fri Sep 28 12:51:59 2007 UTC
Modified files: (Branch: REF_STRUCT_DEV)
/phpdoc/scripts file-entities.php.in
Log:
Create <foldername>.entities.xml entity container file for all folders
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/file-entities.php.in?r1=1.48.2.1&r2=1.48.2.2&diff_format=u
Index: phpdoc/scripts/file-entities.php.in
diff -u phpdoc/scripts/file-entities.php.in:1.48.2.1 phpdoc/scripts/file-entities.php.in:1.48.2.2
--- phpdoc/scripts/file-entities.php.in:1.48.2.1 Fri Sep 28 09:56:41 2007
+++ phpdoc/scripts/file-entities.php.in Fri Sep 28 12:51:59 2007
@@ -17,7 +17,7 @@
| Gabor Hojtsy <goba@php.net> |
+----------------------------------------------------------------------+
- $Id: file-entities.php.in,v 1.48.2.1 2007/09/28 09:56:41 bjori Exp $
+ $Id: file-entities.php.in,v 1.48.2.2 2007/09/28 12:51:59 bjori Exp $
*/
/**
@@ -166,6 +166,9 @@
);
// The missing id file is generated after this pass
+// and due to stupid linux realpath() implementation we need to create an empty
+// file for realpath() to work
+touch("$out_dir/entities/missing-ids.xml");
fputs(
$fp,
"<!-- generated file with missing ids -->\n" .
@@ -236,13 +239,14 @@
// If the working directory is a reference functions directory,
// then start to generate a functions.xml file for that folder.
- if (preg_match("!/functions$!", $work_dir) || preg_match("!/macros$!",
$work_dir)) {
+ if (strpos($work_dir, "reference") !== false || preg_match("!/macros$!",
$work_dir)) {
// Start new functions file with empty entity set
$function_entities = array();
$functions_file = "$work_dir.entities.xml";
+ touch("$work_dir.entities.xml");
// Get relative file path to original directory, and form an entity
- $functions_file_entity = str_replace("$orig_dir/", "", $work_dir);
+ $functions_file_entity = str_replace("$orig_dir/", "", $work_dir) .
".entities";
$functions_file_entity = fname2entname($functions_file_entity, $prefix);
$entities[] = entstr($functions_file_entity, $functions_file);
}