From 993fcb4958f867cceefb14f3ae4ac41492b1c4fc Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 15 May 2012 16:37:19 +0200 Subject: [PATCH] Deny deletion of a cronjob if it cannot be disabled Fixes #571 --- wcfsetup/install/files/lib/data/cronjob/Cronjob.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/cronjob/Cronjob.class.php b/wcfsetup/install/files/lib/data/cronjob/Cronjob.class.php index d8ed91d168..4a61b5f5e3 100644 --- a/wcfsetup/install/files/lib/data/cronjob/Cronjob.class.php +++ b/wcfsetup/install/files/lib/data/cronjob/Cronjob.class.php @@ -84,7 +84,7 @@ class Cronjob extends DatabaseObject { * @return boolean */ public function isDeletable() { - return (WCF::getSession()->getPermission('admin.system.cronjob.canDeleteCronjob') && $this->canBeEdited); + return (WCF::getSession()->getPermission('admin.system.cronjob.canDeleteCronjob') && $this->canBeEdited && $this->canBeDisabled); } /** -- 2.20.1