nlopess         Thu Jan 15 12:15:49 2004 EDT

  Modified files:              
    /phpdoc/scripts     entity-usage.php 
  Log:
  improved performance
  
Index: phpdoc/scripts/entity-usage.php
diff -u phpdoc/scripts/entity-usage.php:1.4 phpdoc/scripts/entity-usage.php:1.5
--- phpdoc/scripts/entity-usage.php:1.4 Sun Jan 11 12:17:54 2004
+++ phpdoc/scripts/entity-usage.php     Thu Jan 15 12:15:49 2004
@@ -115,12 +115,10 @@
     global $usage;
 
     // Read in file contents
-    $contents = preg_replace("/[\r\n]/", "", join("", file($filename)));
+    $contents = file_get_contents($filename);
     
     // Find all entity usage in this file
-    preg_match_all("/$entity;/U", $contents, $entities_found);
-
-    if (count($entities_found[0]) != 0) {
+    if (preg_match("/&$entity;/U", $contents) == 1) {
         echo $filename . "\n";
         $usage++;
     }

Reply via email to