From b80a050ae35ebb4641d36defc10d06fd32236020 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 7 Sep 2015 13:20:03 +0800 Subject: [PATCH] * finish task #2275. --- module/cron/view/index.html.php | 2 +- module/report/control.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/module/cron/view/index.html.php b/module/cron/view/index.html.php index d59f1c2282..13360d947a 100644 --- a/module/cron/view/index.html.php +++ b/module/cron/view/index.html.php @@ -52,7 +52,7 @@ command)) echo html::a(inlink('toggle', "id=$cron->id&status=" . ($cron->status == 'stop' ? 'normal' : 'stop')), $cron->status == 'stop' ? $lang->cron->toggleList['start'] : $lang->cron->toggleList['stop'], 'hiddenwin'); - if($cron->buildin == 0 and common::hasPriv('cron', 'edit')) echo html::a(inlink('edit', "id=$cron->id"), $lang->edit); + if(!empty($cron->command) and common::hasPriv('cron', 'edit')) echo html::a(inlink('edit', "id=$cron->id"), $lang->edit); if($cron->buildin == 0 and common::hasPriv('cron', 'delete')) echo html::a(inlink('delete', "id=$cron->id"), $lang->delete, 'hiddenwin'); ?> diff --git a/module/report/control.php b/module/report/control.php index 031ad77632..0b7df920a2 100644 --- a/module/report/control.php +++ b/module/report/control.php @@ -169,7 +169,11 @@ class report extends control $this->loadModel('mail'); /* Check mail turnon.*/ - if(!$this->config->mail->turnon) die("You should turn on the Email feature first.\n"); + if(!$this->config->mail->turnon) + { + echo "You should turn on the Email feature first.\n"; + return false; + } foreach($reminder as $user => $mail) {