本文整理匯總了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>');