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 <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
- $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