Deny deletion of a cronjob if it cannot be disabled
authorAlexander Ebert <ebert@woltlab.com>
Tue, 15 May 2012 14:37:19 +0000 (16:37 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 15 May 2012 14:37:19 +0000 (16:37 +0200)
Fixes #571

wcfsetup/install/files/lib/data/cronjob/Cronjob.class.php

index d8ed91d1688d4a55620a451c7e4c1fe010a45339..4a61b5f5e34b65059e423294c45f50dfa45e9506 100644 (file)
@@ -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);
        }
        
        /**