Update compile_database.php
This commit is contained in:
@@ -11,7 +11,7 @@ function sort_hashes($inputFile, $excluded) {
|
|||||||
$batchedHashes = array();
|
$batchedHashes = array();
|
||||||
|
|
||||||
// Read each line from the input file
|
// Read each line from the input file
|
||||||
while (($line = fgets($handle)) !== false) {
|
while (($line = fgets($handle)) !== false && !feof($handle)) {
|
||||||
// Remove leading/trailing whitespace and split the line into words
|
// Remove leading/trailing whitespace and split the line into words
|
||||||
$hash = trim($line);
|
$hash = trim($line);
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ function sort_hashes($inputFile, $excluded) {
|
|||||||
$filename = "/var/www/html/database_srv/".$prefix . ".jdbf";
|
$filename = "/var/www/html/database_srv/".$prefix . ".jdbf";
|
||||||
|
|
||||||
// Add the hash to the batched array
|
// Add the hash to the batched array
|
||||||
$batchedHashes[$filename][] = $line . PHP_EOL;
|
$batchedHashes[$filename][] = $line;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close the input file handle
|
// Close the input file handle
|
||||||
|
|||||||
Reference in New Issue
Block a user