For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > August 2007 > cvs: phd / build.php









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: phd / build.php
Hannes Magnusson

2007-08-07, 7:01 pm

bjori Tue Aug 7 20:52:10 2007 UTC

Modified files:
/phd build.php
Log:
Don't hardcode these paths
# In the "future" the config.php file should be used


http://cvs.php.net/viewvc.cgi/phd/b...8&diff_format=u
Index: phd/build.php
diff -u phd/build.php:1.7 phd/build.php:1.8
--- phd/build.php:1.7 Tue Aug 7 20:10:09 2007
+++ phd/build.php Tue Aug 7 20:52:09 2007
@@ -1,6 +1,16 @@
-#!/home/bjori/.apps/bin/php
<?php
-/* $Id: build.php,v 1.7 2007/08/07 20:10:09 bjori Exp $ */
+/* $Id: build.php,v 1.8 2007/08/07 20:52:09 bjori Exp $ */
+
+if (isset($argc) && $argc == 3) {
+ $manual = $argv[1];
+ $version = $argv[2];
+} else if (file_exists("./config.php")) {
+ include "./config.php";
+}
+if (!file_exists($manual) || !file_exists($version)) {
+ die ("Missing path/to .manual.xml and/or version.xml");
+}
+

function err($no, $str, $file, $line) {
global $notify;
@@ -40,8 +50,8 @@
->show();
}

-$reader = new PhDReader("/home/bjori/php/doc/.manual.xml");
-$format = new phpweb($reader, $IDs, $IDMap, "/home/bjori/php/doc/phpbook/phpbook-xsl/version.xml");
+$reader = new PhDReader($manual);
+$format = new phpweb($reader, $IDs, $IDMap, $version);

$map = $format->getMap();

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com