11 lines
No EOL
398 B
PHP
11 lines
No EOL
398 B
PHP
<?php
|
|
|
|
// file.update:after
|
|
return function ($newFile, $oldFile) {
|
|
$project = $newFile->parent()->template() == 'project' ? $newFile->parent() : $newFile->parent()->parents()->findBy('template', 'project');
|
|
if ($project) {
|
|
$project->rebuildStepsCache();
|
|
// Invalider aussi le cache des notifications (commentaires sur fichiers, etc.)
|
|
$project->invalidateNotificationsCache();
|
|
}
|
|
}; |