Fix: scan_belege nutzte undefiniertes $upload_dir [deploy]
All checks were successful
Deploy mahnung / deploy (push) Successful in 13s
All checks were successful
Deploy mahnung / deploy (push) Successful in 13s
$upload_dir wird erst nach den Action-Handlern definiert. scan_belege-Block berechnet den Pfad jetzt selbst. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7157f0d8c3
commit
9e3776fef3
1 changed files with 6 additions and 1 deletions
7
card.php
7
card.php
|
|
@ -180,8 +180,13 @@ if ($action === 'dismiss_tracking' && $user->hasRight('mahnung', 'write')) {
|
|||
// Belege scannen: pdftotext + Pattern-Matching
|
||||
if ($action === 'scan_belege' && $user->hasRight('mahnung', 'write')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/custom/mahnung/class/mahnungtrackingpattern.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$scanDir = $upload_dir;
|
||||
$scanRef = dol_sanitizeFileName($mahnung->ref);
|
||||
$scanDir = (!empty($conf->mahnung->multidir_output[$mahnung->entity])
|
||||
? $conf->mahnung->multidir_output[$mahnung->entity]
|
||||
: $conf->mahnung->dir_output ?? (DOL_DATA_ROOT.'/mahnung'))
|
||||
.'/'.$scanRef;
|
||||
|
||||
$patternService = new MahnungTrackingPattern($db);
|
||||
$suggestions = array();
|
||||
|
|
|
|||
Loading…
Reference in a new issue