本文整理汇总了PHP中Tracker::updateArtifactsMasschange方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker::updateArtifactsMasschange方法的具体用法?PHP Tracker::updateArtifactsMasschange怎么用?PHP Tracker::updateArtifactsMasschange使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker
的用法示例。
在下文中一共展示了Tracker::updateArtifactsMasschange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateArtifacts
public function updateArtifacts(PFUser $user, Codendi_Request $request)
{
if ($this->tracker->userIsAdmin($user)) {
$masschange_aids = $request->get('masschange_aids');
if (empty($masschange_aids)) {
$GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_tracker_masschange_detail', 'no_items_selected'));
$GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?tracker=' . $this->tracker->getId());
}
$unsubscribe = $request->get('masschange-unsubscribe-option');
if ($unsubscribe) {
$this->unsubscribeUserFromEachArtifactNotification($user, $request, $masschange_aids);
}
$send_notifications = $this->getSendNotificationsFromRequest($request);
$masschange_data = $request->get('artifact');
if (!$unsubscribe && empty($masschange_data)) {
$GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_tracker_masschange_detail', 'no_items_selected'));
$GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?tracker=' . $this->tracker->getId());
}
$comment = $request->get('artifact_masschange_followup_comment');
$masschange_values_extractor = new Tracker_MasschangeDataValueExtractor();
$new_fields_data = $masschange_values_extractor->getNewValues($masschange_data);
if (count($new_fields_data) > 0 || $comment !== '') {
$comment_format = $request->get('comment_formatmass_change');
$this->tracker->updateArtifactsMasschange($user, $masschange_aids, $new_fields_data, $comment, $send_notifications, $comment_format);
}
$GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?tracker=' . $this->tracker->getId());
} else {
$GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_tracker_admin', 'access_denied'));
$GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?tracker=' . $this->tracker_report->getId());
}
}