2025-06-02 11:02:35 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
// file.update:after
|
|
|
|
|
return function ($newFile, $oldFile) {
|
|
|
|
|
$project = $newFile->parent()->template() == 'project' ? $newFile->parent() : $newFile->parent()->parents()->findBy('template', 'project');
|
2026-01-15 11:42:40 +01:00
|
|
|
if ($project) {
|
|
|
|
|
$project->rebuildStepsCache();
|
|
|
|
|
// Invalider aussi le cache des notifications (commentaires sur fichiers, etc.)
|
|
|
|
|
$project->invalidateNotificationsCache();
|
2025-06-02 11:02:35 +02:00
|
|
|
}
|
|
|
|
|
};
|