FIX Knowledge management - Button ReOpen show in draft mode (#36008)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Alexandre SPANGARO 2025-11-01 18:55:55 +01:00 committed by GitHub
parent a199a7ded9
commit f4d725bd09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2017-2021 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2017-2021 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -516,8 +517,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if ($permissiontoadd) {
if ($object->status == $object::STATUS_VALIDATED) {
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken().'">'.$langs->trans("SetObsolete").'</a>'."\n";
} else {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("Re-Open").'</a>'."\n";
} elseif ($object->status == $object::STATUS_CANCELED) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().'">'.$langs->trans("ReOpen").'</a>'."\n";
}
}