文件路径
source/module/home/home_task.php
source/class/class_task.php
将
home_task.php 中的
$result = $tasklib->delete($id);
showmessage('task_deleted', 'home.php?mod=task&item=doing');
替换成
if(!$_G['uid']) {
showmessage('not_loggedin', NULL, array(), array('login' => 1));
}
$task = C::t('common_task')->fetch($id);
if($task['available'] != 2) {
showmessage('task_nonexistence');
} elseif(($task['starttime'] && $task['starttime'] >
TIMESTAMP) || ($task['endtime'] && $task['endtime'] <=
TIMESTAMP)) {
showmessage('task_offline');
}elseif($task['tasklimits'] && $task['achievers'] >= $task['tasklimits']) {
showmessage('task_full');
}
$mytask = DB::fetch_first("SELECT *, dateline AS applytime FROM %t where uid=%d AND taskid=".$id,
array( 'common_mytask', $_G['uid']));
if(!$mytask || $mytask['status']!=0){
showmessage('task_not_underway');
}else{
$task['applytime'] = $mytask['applytime'];
}
require_once libfile('task/'.$task['scriptname'], 'class');
$taskclassname = 'task_'.$task['scriptname'];
$task_class = new $taskclassname;
if(method_exists($task_class, 'csc')) {
$result = $task_class->csc($task);
} else {
showmessage('task_not_found', '', array('taskclassname' => $taskclassname));
}
if($result === TRUE || $result['csc']) {
showmessage('task_doing', 'home.php?mod=task&do=view&id='.$id);
} else {
$result = $tasklib->delete($id);
showmessage('task_deleted', 'home.php?mod=task&item=doing');
}
class_task.php 中
343 行
} elseif($this->task['status'] != 0 ) {
替换成
} elseif($this->task['status'] != 0 || !$this->task['dateline']) {