Merge branch 'master' of ssh://misp.ncirc.nato.int/home/git/cydefsig.git

pull/61/head
noud 2012-09-06 13:45:46 +02:00
commit 07b0498591
1 changed files with 3 additions and 8 deletions

View File

@ -282,12 +282,7 @@ class Event extends AppModel {
$attribute['data'] = $encoded_file;
}
}
// add the 'Imported from' conform ServersController.php:177
// no need to remove lateron cause on pushing server Event is already saved.
$event['Event']['info'] .= "\n Published from ".Configure::read('CyDefSIG.baseurl');
if ($event['Event']['user_id'] != '0') $event['Event']['org'] = Configure::read('CyDefSIG.org'); // TODO
// display the XML to the user
$xmlArray['Event'][] = $event['Event'];
$xmlObject = Xml::fromArray($xmlArray, array('format' => 'tags'));
@ -320,7 +315,7 @@ class Event extends AppModel {
}
}
}
/**
* Deletes the event and the associated Attributes from another Server
* TODO move this to a component
@ -414,7 +409,7 @@ class Event extends AppModel {
$this->Dns = ClassRegistry::init('Dns');
if ($this->Dns->testipaddress(parse_url($uri, PHP_URL_HOST))) {
$response = $HttpSocket->get($uri, $data='', $request);
if ($response->isOk()) {
$xml = Xml::build($response->body);
$eventArray = Xml::toArray($xml);