本文整理汇总了PHP中task::add_reopen_reminder方法的典型用法代码示例。如果您正苦于以下问题:PHP task::add_reopen_reminder方法的具体用法?PHP task::add_reopen_reminder怎么用?PHP task::add_reopen_reminder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类task
的用法示例。
在下文中一共展示了task::add_reopen_reminder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
// Moved all validation over into task.inc.php save()
$success = $task->save();
count($msg) and $msg = "&message_good=" . urlencode(implode("<br>", $msg));
if ($success) {
interestedParty::make_interested_parties("task", $task->get_id(), $_POST["interestedParty"]);
// A task can only have a pending task or pending reopen date - pending task is fixed up in JS, but check here too
if ($task->get_value("taskStatus") != "pending_tasks") {
$_POST['pendingTaskIDs'] = '';
}
$task->add_pending_tasks($_POST["pendingTasksIDs"]);
$task->add_tags($_POST["tags"]);
// This is only valid on pending_, but not on pending_task (because it has a different field)
if (strpos($task->get_value("taskStatus"), "pending_") !== 0 || $task->get_value("taskStatus") == "pending_tasks") {
$_POST['reopen_task'] = '';
}
$task->add_reopen_reminder($_POST["reopen_task"]);
// Create reminders if necessary
if ($_POST["createTaskReminder"] == true) {
$task->create_task_reminder();
}
if ($_POST["save"] && $_POST["view"] == "brief") {
#$url = $TPL["url_alloc_taskList"];
$url = $TPL["url_alloc_task"] . "taskID=" . $task->get_id();
} else {
if ($_POST["save"] || $_POST["close_task"]) {
$url = $TPL["url_alloc_task"] . "taskID=" . $task->get_id();
} else {
if ($_POST["save_and_back"]) {
$url = $TPL["url_alloc_project"] . "projectID=" . $task->get_value("projectID");
} else {
if ($_POST["save_and_summary"]) {
示例2: unset
function edit_task($commands, $email_receive)
{
$task_fields = $this->get_fields("task");
// Task commands
if ($commands["task"]) {
unset($changes);
$taskPriorities = config::get_config_item("taskPriorities") or $taskPriorities = array();
foreach ($taskPriorities as $k => $v) {
$priorities[strtolower($v["label"])] = $k;
}
$people_by_username = person::get_people_by_username();
// Else edit/create the task ...
$task = new task();
if ($commands["task"] && strtolower($commands["task"]) != "new") {
$task->set_id($commands["task"]);
if (!$task->select()) {
alloc_error("Unable to select task with ID: " . $commands["task"]);
}
}
foreach ($commands as $k => $v) {
// transform from username to personID
if ($k == "assign") {
$changes[$k] = "personID";
$v = $people_by_username[$v]["personID"];
$v or alloc_error("Unrecognized username.");
}
if ($k == "manage") {
$changes[$k] = "managerID";
$v = $people_by_username[$v]["personID"];
$v or alloc_error("Unrecognized username.");
}
if ($k == "estimator") {
$changes[$k] = "estimatorID";
$v = $people_by_username[$v]["personID"];
$v or alloc_error("Unrecognized username.");
}
// transform from priority label to priority ID
if ($k == "priority" && !in_array($v, array(1, 2, 3, 4, 5))) {
$v = $priorities[strtolower($v)];
}
// so that --type parent becomes --type Parent
// mysql's referential integrity is case-insensitive :(
if ($k == "type") {
$v = ucwords($v);
}
// Plug the value in
if ($task_fields[$k][0]) {
$changes[$k] = $task_fields[$k][0];
$task->set_value($task_fields[$k][0], sprintf("%s", $v));
}
}
if (isset($commands["pend"])) {
$changes["pend"] = implode(",", (array) $task->get_pending_tasks());
}
if (isset($commands["reopen"])) {
$reopen_rows = $task->get_reopen_reminders();
unset($rr_bits);
foreach ($reopen_rows as $rr) {
$rr_bits[] = $rr["reminderTime"];
}
$changes["reopen"] = implode(",", (array) $rr_bits);
}
if (isset($commands["tags"])) {
$changes["tags"] = implode(",", $task->get_tags());
}
if (strtolower($commands["task"]) == "new") {
if (!$commands["desc"] && is_object($email_receive)) {
$task->set_value("taskDescription", $email_receive->get_converted_encoding());
}
}
$after_label = "After: ";
if (strtolower($commands["task"]) != "new") {
$str = $this->condense_changes($changes, $task->row());
$str and $status[] = "msg";
$str and $message[] = "Before: " . $str;
} else {
$after_label = "Fields: ";
}
// Save task
$err = $task->validate();
if (!$err && $task->save()) {
$task->select();
if (isset($commands["pend"])) {
$task->add_pending_tasks($commands["pend"]);
$changes["pend"] = implode(",", (array) $task->get_pending_tasks());
}
if (isset($commands["reopen"])) {
$task->add_reopen_reminder($commands["reopen"]);
$reopen_rows = $task->get_reopen_reminders();
unset($rr_bits);
foreach ($reopen_rows as $rr) {
$rr_bits[] = $rr["reminderTime"];
}
$changes["reopen"] = implode(",", (array) $rr_bits);
}
if (isset($commands["tags"])) {
$task->add_tags(array($commands["tags"]));
$changes["tags"] = implode(",", $task->get_tags());
}
$str = $this->condense_changes($changes, $task->row());
//.........这里部分代码省略.........