cvs: phpdoc /scripts checkent.php
| From: | Nuno Lopes | Date: | Sat, 10 Jan 2004 12:50:18 +0000 |
| Subject: | cvs: phpdoc /scripts checkent.php | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969358055@lists.php.net to get a copy of this message | ||
nlopess Sat Jan 10 07:50:18 2004 EDT
Modified files:
/phpdoc/scripts checkent.php
Log:
improved performance
Index: phpdoc/scripts/checkent.php
diff -u phpdoc/scripts/checkent.php:1.7 phpdoc/scripts/checkent.php:1.8
--- phpdoc/scripts/checkent.php:1.7 Wed Dec 31 20:08:46 2003
+++ phpdoc/scripts/checkent.php Sat Jan 10 07:50:18 2004
@@ -18,7 +18,7 @@
| Gabor Hojtsy <goba@php.net> |
+----------------------------------------------------------------------+
- $Id: checkent.php,v 1.7 2004/01/01 01:08:46 goba Exp $
+ $Id: checkent.php,v 1.8 2004/01/10 12:50:18 nlopess Exp $
*/
if ($argc > 1 || in_array($argv[1], array('--help', '-help', '-h',
'-?'))) {
@@ -37,9 +37,6 @@
exit;
}
-// CONFIG SECTION
-$docdir = "../"; // Main directory of the PHP documentation (one dir up in cvs)
-
/*********************************************************************/
/* Nothing to modify below this line */
/*********************************************************************/
@@ -54,11 +51,11 @@
$filename = "../entities/global.ent";
// Read in the file, or die
-$file_array = file ($filename);
-if (!$file_array) { die ("Cannot open entity file ($filename)."); }
+$file_string = file_get_contents($filename);
+if (!$file_string) { die ("Cannot open entity file ($filename)."); }
-// Put the whole file in a string
-$file_string = preg_replace("/[\r\n]/", "", join ("", $file_array));
+$array = explode('<!-- Obsoletes -->', $file_string);
+$file_string = $array[0];
echo "ENTITY CHECK