iliaa           Wed Feb  9 12:01:36 2005 EDT

  Modified files:              
    /livedocs   mk_peardoc.php mk_phpdoc.php mk_smarty.php mkindex.php 
  Log:
  Fix for broken FC systems where common readdir() behaviour was changed.
  
  
http://cvs.php.net/diff.php/livedocs/mk_peardoc.php?r1=1.7&r2=1.8&ty=u
Index: livedocs/mk_peardoc.php
diff -u livedocs/mk_peardoc.php:1.7 livedocs/mk_peardoc.php:1.8
--- livedocs/mk_peardoc.php:1.7 Sat May  1 07:34:50 2004
+++ livedocs/mk_peardoc.php     Wed Feb  9 12:01:35 2005
@@ -18,7 +18,7 @@
 // | Configuration file for peardoc build                                 |
 // +----------------------------------------------------------------------+
 //
-// $Id: mk_peardoc.php,v 1.7 2004/05/01 11:34:50 derick Exp $
+// $Id: mk_peardoc.php,v 1.8 2005/02/09 17:01:35 iliaa Exp $
 
 define('MK_VERSION', false);
 define('MANUAL_TITLE', 'PEAR Manual');
@@ -27,17 +27,17 @@
 
 $top_files = array('manual.xml');
 
+$dir_skip_list = array('CVS' => 1, '.cvsignore' => 1, '.' => 1, '..' => 1);
+
 $entities_dir = '.';
 
 function search_parse_dir($path, $section)
 {
-       global $idx, $toca, $tocd;
+       global $idx, $toca, $tocd, $dir_skip_list;
 
        $d = opendir($path);
-       readdir($d); readdir($d);
-
        while (($f = readdir($d))) {
-               if ($f == 'CVS' || $f == '.cvsignore') {
+               if (isset($dir_skip_list[$f])) {
                        continue;
                }
                switch (filetype($path . '/' .  $f)) {
http://cvs.php.net/diff.php/livedocs/mk_phpdoc.php?r1=1.11&r2=1.12&ty=u
Index: livedocs/mk_phpdoc.php
diff -u livedocs/mk_phpdoc.php:1.11 livedocs/mk_phpdoc.php:1.12
--- livedocs/mk_phpdoc.php:1.11 Thu Sep  2 12:28:41 2004
+++ livedocs/mk_phpdoc.php      Wed Feb  9 12:01:35 2005
@@ -18,7 +18,7 @@
 // | Configuration file for phpdoc build                                  |
 // +----------------------------------------------------------------------+
 //
-// $Id: mk_phpdoc.php,v 1.11 2004/09/02 16:28:41 goba Exp $
+// $Id: mk_phpdoc.php,v 1.12 2005/02/09 17:01:35 iliaa Exp $
 
 define('MK_VERSION', true);
 define('MANUAL_TITLE', 'PHP Manual');
@@ -27,16 +27,18 @@
 
 $top_files = array('manual.xml');
 
+$dir_skip_list = array('CVS' => 1, '.cvsignore' => 1, '.' => 1, '..' => 1);
+
 $entities_dir = 'entities';
 
 function search_parse_dir($path, $section) {
-       global $idx, $toca, $tocd;
+       global $idx, $toca, $tocd, $dir_skip_list;
 
        $d = opendir($path);
        readdir($d); readdir($d);
 
        while (($f = readdir($d))) {
-               if (($f == 'functions.xml' && $section != 'language') || $f == 
'CVS' || $f == '.cvsignore' || !strncmp('.#', $f, 2)) {
+               if (isset($dir_skip_list[$f]) || ($f == 'functions.xml' && 
$section != 'language') || !strncmp('.#', $f, 2)) {
                        continue;
                }
                switch (filetype($path . '/' .  $f)) {
http://cvs.php.net/diff.php/livedocs/mk_smarty.php?r1=1.7&r2=1.8&ty=u
Index: livedocs/mk_smarty.php
diff -u livedocs/mk_smarty.php:1.7 livedocs/mk_smarty.php:1.8
--- livedocs/mk_smarty.php:1.7  Sat May  1 07:34:50 2004
+++ livedocs/mk_smarty.php      Wed Feb  9 12:01:35 2005
@@ -18,7 +18,7 @@
 // | Configuration file for peardoc build                                 |
 // +----------------------------------------------------------------------+
 //
-// $Id: mk_smarty.php,v 1.7 2004/05/01 11:34:50 derick Exp $
+// $Id: mk_smarty.php,v 1.8 2005/02/09 17:01:35 iliaa Exp $
 
 define('MK_VERSION', false);
 define('MANUAL_TITLE', 'Smarty Manual');
@@ -27,16 +27,16 @@
 
 $top_files = array('manual.xml');
 
+$dir_skip_list = array('CVS' => 1, '.cvsignore' => 1, '.' => 1, '..' => 1);
+
 $entities_dir = 'entities';
 
 function search_parse_dir($path, $section) {
        global $idx, $toca, $tocd;
 
        $d = opendir($path);
-       readdir($d); readdir($d);
-
        while (($f = readdir($d))) {
-               if ($f == 'CVS' || $f == '.cvsignore') {
+               if (isset($dir_skip_list[$f])) {
                        continue;
                }
                switch (filetype($path . '/' .  $f)) {
http://cvs.php.net/diff.php/livedocs/mkindex.php?r1=1.37&r2=1.38&ty=u
Index: livedocs/mkindex.php
diff -u livedocs/mkindex.php:1.37 livedocs/mkindex.php:1.38
--- livedocs/mkindex.php:1.37   Fri Sep  3 02:48:44 2004
+++ livedocs/mkindex.php        Wed Feb  9 12:01:35 2005
@@ -19,7 +19,7 @@
 // | construct an index                                                   |
 // +----------------------------------------------------------------------+
 //
-// $Id: mkindex.php,v 1.37 2004/09/03 06:48:44 derick Exp $
+// $Id: mkindex.php,v 1.38 2005/02/09 17:01:35 iliaa Exp $
 
 
 /* just to be on the safe side */
@@ -275,10 +275,8 @@
                $dirid = sqlite_last_insert_rowid($idx);
        }
 
-       readdir($d);
-       readdir($d);
        while (($f = readdir($d)) !== false) {
-               if ($f == 'CVS') {
+               if ($f == 'CVS' || $f == '.' || $f == '..') {
                        continue;
                }
                $full = $dirname . DIRECTORY_SEPARATOR . $f;

Reply via email to