当前位置: 首页>>代码示例>>PHP>>正文


PHP CTask::notifyOwner方法代码示例

本文整理汇总了PHP中CTask::notifyOwner方法的典型用法代码示例。如果您正苦于以下问题:PHP CTask::notifyOwner方法的具体用法?PHP CTask::notifyOwner怎么用?PHP CTask::notifyOwner使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CTask的用法示例。


在下文中一共展示了CTask::notifyOwner方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CDate

$task_end_date = new CDate($task->task_end_date);
$task->task_percent_complete = dPgetParam($_POST, 'task_percent_complete', null);
if (dPgetParam($_POST, 'task_end_date', '') != '') {
    $new_date = new CDate($_POST['task_end_date']);
    $new_date->setTime($task_end_date->hour, $task_end_date->minute, $task_end_date->second);
    $task->task_end_date = $new_date->format(FMT_DATETIME_MYSQL);
}
if ($task->task_percent_complete >= 100 && (!$task->task_end_date || $task->task_end_date == '0000-00-00 00:00:00')) {
    $task->task_end_date = $obj->task_log_date;
}
if ($msg = $task->store()) {
    $AppUI->setMsg($msg, UI_MSG_ERROR, true);
}
$new_task_end = new CDate($task->task_end_date);
if ($new_task_end->dateDiff($task_end_date)) {
    $task->addReminder();
}
if ($notify_owner && ($msg = $task->notifyOwner())) {
    $AppUI->setMsg($msg, UI_MSG_ERROR);
}
// Check if we need to email the task log to anyone.
$email_assignees = dPgetParam($_POST, 'email_assignees', null);
$email_task_contacts = dPgetParam($_POST, 'email_task_contacts', null);
$email_project_contacts = dPgetParam($_POST, 'email_project_contacts', null);
$email_others = dPgetParam($_POST, 'email_others', '');
$email_extras = dPgetParam($_POST, 'email_extras', null);
if ($task->email_log($obj, $email_assignees, $email_task_contacts, $email_project_contacts, $email_others, $email_extras)) {
    $obj->store();
    // Save the updated message. It is not an error if this fails.
}
$AppUI->redirect('m=tasks&a=view&task_id=' . $obj->task_log_task . '&tab=0#tasklog' . $obj->task_log_id);
开发者ID:illuminate3,项目名称:dotproject,代码行数:31,代码来源:do_updatetask.php

示例2: CTask

    $AppUI->setMsg($obj->getError(), UI_MSG_ERROR);
    $AppUI->redirect('m=tasks&a=view&task_id=' . $obj->task_log_task);
}
$action = $del ? 'deleted' : 'stored';
$result = $del ? $obj->delete() : $obj->store();
if (count($obj->getError())) {
    $AppUI->setMsg($result, UI_MSG_ERROR, true);
    $AppUI->holdObject($obj);
    $AppUI->redirect('m=tasks&a=view&task_id=' . $obj->task_log_task);
}
if ($result) {
    $AppUI->setMsg('Task Log ' . $action, UI_MSG_OK, true);
    $task = new CTask();
    $task->load($obj->task_log_task);
    if ('on' == $notify_owner) {
        if ($msg = $task->notifyOwner()) {
            $AppUI->setMsg($msg, UI_MSG_ERROR);
        }
    }
    // Check if we need to email the task log to anyone.
    $email_assignees = w2PgetParam($_POST, 'email_assignees', null);
    $email_task_contacts = w2PgetParam($_POST, 'email_task_contacts', null);
    $email_project_contacts = w2PgetParam($_POST, 'email_project_contacts', null);
    $email_others = w2PgetParam($_POST, 'email_others', '');
    $email_log_user = w2PgetParam($_POST, 'email_log_user', '');
    $task_log_creator = (int) w2PgetParam($_POST, 'task_log_creator', 0);
    $email_extras = w2PgetParam($_POST, 'email_extras', null);
    // Email the user this task log is being created for, might not be the person
    // creating the logf
    $user_to_email = 0;
    if (isset($email_log_user) && 'on' == $email_log_user && $task_log_creator) {
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:do_updatetask.php


注:本文中的CTask::notifyOwner方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。