Cron: Frequenz-Check entfernt, IMAP nur bei Konfiguration

- shouldRunImport() Prüfung entfernt (Dolibarr-Cron steuert Frequenz)
- IMAP-Import nur wenn Host konfiguriert (verhindert Fehlermeldung)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eduard Wisch 2026-02-19 20:30:43 +01:00
parent c412d6c5a3
commit 92287dc4d7

View file

@ -131,12 +131,6 @@ class CronImportZugferd
$langs->load('importzugferd@importzugferd');
// Check if we should run based on frequency
if (!$this->shouldRunImport()) {
$this->output = 'Skipped - not scheduled to run (frequency: '.getDolGlobalString('IMPORTZUGFERD_IMPORT_FREQUENCY', 'manual').')';
return 0;
}
// Reset counters
$this->imported_count = 0;
$this->skipped_count = 0;
@ -144,7 +138,12 @@ class CronImportZugferd
$this->errors = array();
$folderResult = $this->importFromFolder();
$mailboxResult = $this->fetchFromMailbox();
// IMAP nur wenn konfiguriert
$mailboxResult = 0;
if (!empty(getDolGlobalString('IMPORTZUGFERD_IMAP_HOST'))) {
$mailboxResult = $this->fetchFromMailbox();
}
// Update last run time
$this->updateLastRunTime();