// Close bugs.
function svnProjectTools($data, $id_member)
{
global $smcFunc,
$sourcedir,
$context,
$user_profile,
$issue,
$project;
$project = 2;
return;
// First, explode all entires by new line.
$entries =
explode("\n",
$data->
log);
foreach ($entries as $entry)
{
// Pull out the bug/feature index.
preg_match('~\[[Bug|Feature]+\s+([\d,]+)\]~i',
$entry,
$matches);
// Nothing to log?
continue;
// Only list them once.
// Dump this into an array whos key is the bug id.
foreach ($temp as $id)
$bugs[$id][] =
str_replace($matches[0],
'Revision: ' .
$data->
revision,
$entry);
}
// Mash that multi-dimensional array to a single array.
foreach ($bugs as $id => $bug)
// Still nothing?
return;
// Some junk we need.
require_once($sourcedir . '/Subs-Post.php');
require_once($sourcedir . '/Subs-Issue.php');
require_once($sourcedir . '/Subs-Project.php');
require_once($sourcedir . '/IssueReport.php');
require_once($sourcedir . '/IssueComment.php');
// Call a few friends.
loadMemberData($id_member);
loadProjectTools();
// Prep the changes.
'id' => $id_member,
'ip' => $user_profile[$id_member]['member_ip'],
'name' => $data->author,
'email' => $user_profile[$id_member]['email_address'],
);
'mark_read' => true,
'assignee' => $id_member,
'status' => 5, // Resolved.
);
$commentOptions =
array('body' =>
'');
// Lets do some loops.
foreach ($bugs as $bug => $message)
{
$issue = $bug;
loadIssue();
// Update our body message
$commentOptions['body'] = $smcFunc['htmlspecialchars']($message, ENT_QUOTES);
// Update status and assigne.
$event_data = updateIssue($bug, $issueOptions, $posterOptions, true);
// Fix a Project tracker bug...
if ($event_data === true)
// Create a comment.
$id_comment = createComment($project, $bug, $commentOptions, $posterOptions);
$commentOptions['id'] = $id_comment;
// Spam people.
sendIssueNotification
(array('id' =>
$bug,
'project' =>
$project),
$commentOptions,
$event_data,
'new_comment',
$id_member);
}
}