didou           Sat Mar 20 13:52:17 2004 EDT

  Modified files:              
    /livedocs   mkindex.php 
  Log:
  what about PEAR ? ;)
  
http://cvs.php.net/diff.php/livedocs/mkindex.php?r1=1.26&r2=1.27&ty=u
Index: livedocs/mkindex.php
diff -u livedocs/mkindex.php:1.26 livedocs/mkindex.php:1.27
--- livedocs/mkindex.php:1.26   Sat Mar 20 13:39:42 2004
+++ livedocs/mkindex.php        Sat Mar 20 13:52:17 2004
@@ -19,20 +19,20 @@
 // | construct an index                                                   |
 // +----------------------------------------------------------------------+
 //
-// $Id: mkindex.php,v 1.26 2004/03/20 18:39:42 didou Exp $
+// $Id: mkindex.php,v 1.27 2004/03/20 18:52:17 didou Exp $
 
 
 /* just to be on the safe side */
 set_time_limit(0);
 set_magic_quotes_runtime(0);
 
-$PHPDOC = $argv[1];
+$DOCS = $argv[1];
 $LANG = $argv[2];
 $TMPDIR = $argv[3];
 $BUILDTYPE = $argv[4];
 
-if (!is_dir($PHPDOC) || !is_dir($PHPDOC . DIRECTORY_SEPARATOR . $LANG)) {
-       echo "Usage: mkindex.php /path/to/phpdoc lang tmp-dir build-type\n";
+if (!is_dir($DOCS) || !is_dir($DOCS . DIRECTORY_SEPARATOR . $LANG)) {
+       echo "Usage: mkindex.php /path/to/docs lang tmp-dir build-type\n";
        exit(1);
 }
 
@@ -125,7 +125,7 @@
 function build_func_list() {
        global $idx;
 
-       $list = file_get_contents($GLOBALS['PHPDOC'] . DIRECTORY_SEPARATOR . 
"xsl/version.xml");
+       $list = file_get_contents($GLOBALS['DOCS'] . DIRECTORY_SEPARATOR . 
"xsl/version.xml");
        $x = preg_match_all('@<function name=([\'"])([a-zA-Z0-9_]+)\\1 
from=([\'"])(.+)[EMAIL PROTECTED]', $list, $matches);
        $data = '';
        for ($i = 0; $i < $x; $i++) {
@@ -176,9 +176,9 @@
 
        $ents = glob($dirname . '/*.ent');
        
-       $language_defs = glob($GLOBALS['PHPDOC'] . DIRECTORY_SEPARATOR . $LANG . 
DIRECTORY_SEPARATOR . '*.ent');
+       $language_defs = glob($GLOBALS['DOCS'] . DIRECTORY_SEPARATOR . $LANG . 
DIRECTORY_SEPARATOR . '*.ent');
        if ($LANG != 'en') {
-               $fallback_language_defs = glob($GLOBALS['PHPDOC'] . 
DIRECTORY_SEPARATOR . 'en' . DIRECTORY_SEPARATOR . '*.ent');
+               $fallback_language_defs = glob($GLOBALS['DOCS'] . DIRECTORY_SEPARATOR 
. 'en' . DIRECTORY_SEPARATOR . '*.ent');
        } else {
                $fallback_language_defs = array();
        }
@@ -339,14 +339,14 @@
 sqlite_query($idx, $create);
 sqlite_query($idx, 'BEGIN TRANSACTION');
 
-$replacements = scan_entities($PHPDOC . DIRECTORY_SEPARATOR . $entities_dir);
+$replacements = scan_entities($DOCS . DIRECTORY_SEPARATOR . $entities_dir);
 
 foreach ($top_files as $top_file) {
-       parse_file($PHPDOC . DIRECTORY_SEPARATOR . $top_file, $top_file, 0);
+       parse_file($DOCS . DIRECTORY_SEPARATOR . $top_file, $top_file, 0);
 }
 
 
-scan_dir($PHPDOC . DIRECTORY_SEPARATOR . $LANG);
+scan_dir($DOCS . DIRECTORY_SEPARATOR . $LANG);
 
 if (MK_VERSION) {
        build_func_list();
@@ -451,7 +451,7 @@
 
 // list of directories to index
 // $parse_dirs is defined in mk_XXX.php
-$path = $PHPDOC . DIRECTORY_SEPARATOR . $LANG . DIRECTORY_SEPARATOR;
+$path = $DOCS . DIRECTORY_SEPARATOR . $LANG . DIRECTORY_SEPARATOR;
 
 sqlite_query($idx, 'BEGIN TRANSACTION');
 $r = sqlite_unbuffered_query("SELECT id, docbook_id FROM toc", $idx);

Reply via email to