Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upd. ScannerTbl. Remove the display of empty files in unknown #467

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions inc/spbc-scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -1066,20 +1066,11 @@ function spbc_get_sql_where_addiction_for_table_of_category($category)
$res = ' WHERE last_sent IS NOT NULL';
break;
case 'unknown':
// uses constant to skip zero-byte files https://doboard.com/1/task/11599
if (
defined('SPBC_SCAN_RESULTS_HIDE_ZERO_BYTES_UNKNOWN_FILES') &&
SPBC_SCAN_RESULTS_HIDE_ZERO_BYTES_UNKNOWN_FILES
) {
$size_chunk = ' size > 0 AND ';
} else {
$size_chunk = '';
}
$res = ' WHERE status NOT IN ("APPROVED_BY_USER","APPROVED_BY_CT","APPROVED_BY_CLOUD","DENIED_BY_CT", "ERROR") AND
$res = ' WHERE status NOT IN ("APPROVED_BY_USER","APPROVED_BY_CT","APPROVED_BY_CLOUD","DENIED_BY_CT","ERROR") AND
detected_at >= ' . (time() - $spbc->settings['scanner__list_unknown__older_than'] * 86400) . ' AND
source IS NULL AND
source_type IS NULL AND
' . $size_chunk . '
size > 0 AND
path NOT LIKE "%wp-content%themes%" AND
path NOT LIKE "%wp-content%plugins%" AND
path NOT LIKE "%wp-content%cache%" AND
Expand Down
Loading