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:
parent
c412d6c5a3
commit
92287dc4d7
1 changed files with 6 additions and 7 deletions
|
|
@ -131,12 +131,6 @@ class CronImportZugferd
|
||||||
|
|
||||||
$langs->load('importzugferd@importzugferd');
|
$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
|
// Reset counters
|
||||||
$this->imported_count = 0;
|
$this->imported_count = 0;
|
||||||
$this->skipped_count = 0;
|
$this->skipped_count = 0;
|
||||||
|
|
@ -144,7 +138,12 @@ class CronImportZugferd
|
||||||
$this->errors = array();
|
$this->errors = array();
|
||||||
|
|
||||||
$folderResult = $this->importFromFolder();
|
$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
|
// Update last run time
|
||||||
$this->updateLastRunTime();
|
$this->updateLastRunTime();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue