本文整理汇总了PHP中Backend::edit_task方法的典型用法代码示例。如果您正苦于以下问题:PHP Backend::edit_task方法的具体用法?PHP Backend::edit_task怎么用?PHP Backend::edit_task使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Backend
的用法示例。
在下文中一共展示了Backend::edit_task方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_edit
function action_edit()
{
foreach (Get::val('ids') as $task_id) {
// Edit or close? If we have a resolution_reason, then close! otherwise, edit.
if (Post::val('resolution_reason')) {
Backend::close_task($task_id, Post::val('resolution_reason'), Post::val('closure_comment'), Post::val('mark100'));
} elseif (count(Post::val('changes'))) {
$task = Flyspray::GetTaskDetails($task_id);
$args = $task;
// import previous values
foreach (Post::val('changes') as $change) {
$args[$change] = Post::val($change);
}
if (is_array($args['assigned_to'])) {
$args['assigned_to'] = implode(';', $task['assigned_to_uname']);
}
Backend::edit_task($task, $args);
}
}
return array(SUBMIT_OK, L('masseditsuccessful'));
}
示例2: action_edit_task
function action_edit_task($task)
{
global $user;
if (Post::val('notifyme') == '1') {
// If the user wanted to watch this task for changes
Backend::add_notification($user->id, $task['task_id']);
}
return Backend::edit_task($task, $_POST);
}
示例3: implode
$args['assigned_to'] = implode(';', $task['assigned_to_uname']);
}
$fieldname = Post::val('field');
switch ($fieldname) {
case 'summary':
$args['item_summary'] = Post::val('value');
break;
case 'project':
$args['project_id'] = Post::num('value');
break;
case 'progress':
$args['percent_complete'] = Post::num('value');
break;
case 'assigned_to':
$args['assigned_to'] = Post::val('value');
$fieldname = 'assignedto';
break;
default:
// now all the custom fields
$field = new Field(substr($fieldname, 5));
if ($field->id) {
$args[$fieldname] = Post::val('value');
}
}
// Let our backend function do the rest
Backend::edit_task($task, $args);
// let's get the updated value
$task = Flyspray::GetTaskDetails(Post::val('task_id'));
$task['num_assigned'] = count($task['assigned_to']);
$task['assigned_to_name'] = reset($task['assigned_to_name']);
echo tpl_draw_cell($task, $fieldname, '<span class="%s %s">%s</span>');