This commit is contained in:
jakani24
2024-04-01 11:40:32 +02:00
parent 21d75e4ff9
commit 56b67c4417
2 changed files with 2 additions and 2 deletions

View File

@@ -231,7 +231,7 @@ async function add_item(db,element_id1,field1,element_id2,field2){ //we have two
$current_page = isset($_GET['page']) ? intval($_GET['page']) : 1; $current_page = isset($_GET['page']) ? intval($_GET['page']) : 1;
$offset = ($current_page - 1) * $page_size; $offset = ($current_page - 1) * $page_size;
$yara_files[]=list_yara_files("/var/www/html/database_srv/"); $yara_files=list_yara_files("/var/www/html/database_srv/");
$total_entries=count($yara_files); $total_entries=count($yara_files);
// Calculate total pages // Calculate total pages
$total_pages = ceil($total_entries / $page_size); $total_pages = ceil($total_entries / $page_size);

View File

@@ -71,7 +71,7 @@ function list_yara_files($dir) {
$path = $dir . '/' . $entry; $path = $dir . '/' . $entry;
// If the entry is a directory, call the function recursively // If the entry is a directory, call the function recursively
if (is_dir($path)) { if (is_dir($path)) {
$buf[]=list_yara_files($path); $buf=list_yara_files($path);
foreach($buf as $newpath){ foreach($buf as $newpath){
$yar_files[]=$newpath; $yar_files[]=$newpath;
} }