Remove warning when deleting all entries

When deleting all entries, only "allfiles" is defined but not "file" or
"files", which caused a PHP warning to be logged.
Merge this if+else with the if+else below?