<?php
$urlParams = $this->app->params;
$extra = str_replace(array(',', ' '), array('&', ''), zget($urlParams, 'extra'));
parse_str($extra, $output);

if(!empty($output['from']) && $output['from'] == 'codescan' && !empty($output['fromServerID']) && !empty($_COOKIE['issueIdList']))
{
    $this->app->loadLang('codescan');
    $issueIDList = explode('|', $_COOKIE['issueIdList']);
    $gitfoxID    = $output['fromServerID'];

    $result = $this->loadModel('codescan')->changeIssueState($gitfoxID, $issueIDList, 'solving');
    if(!$result) $this->sendError($this->lang->codescan->notice->changeStateFailed);
    return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'callback' => 'history.go(-1);'));
}
