chg: remove some obsolete code

pull/1492/head
Andreas Ziegler 2016-09-01 05:15:36 +02:00
parent 3c57dfb873
commit cf2f0dc625
4 changed files with 1 additions and 10 deletions

View File

@ -2273,8 +2273,6 @@ class AttributesController extends AppController {
}
$url = Configure::read('Plugin.Enrichment_services_url') ? Configure::read('Plugin.Enrichment_services_url') : $this->Server->serverSettings['Plugin']['Enrichment_services_url']['value'];
$port = Configure::read('Plugin.Enrichment_services_port') ? Configure::read('Plugin.Enrichment_services_port') : $this->Server->serverSettings['Plugin']['Enrichment_services_port']['value'];
App::uses('HttpSocket', 'Network/Http');
$httpSocket = new HttpSocket();
$resultArray = array();
foreach ($validTypes as &$type) {
$options = array();

View File

@ -3646,10 +3646,8 @@ class EventsController extends AppController {
$modules = $this->Module->getEnabledModules();
if (!is_array($modules) || empty($modules)) throw new MethodNotAllowedException('No valid enrichment options found for this attribute.');
$options = array();
$found = false;
foreach ($modules['modules'] as &$temp) {
if ($temp['name'] == $module) {
$found = true;
if (isset($temp['meta']['config'])) {
foreach ($temp['meta']['config'] as $conf) {
$options[$conf] = Configure::read('Plugin.Enrichment_' . $module . '_' . $conf);

View File

@ -1096,7 +1096,6 @@ class Attribute extends AppModel {
));
}
$this->Correlation = ClassRegistry::init('Correlation');
$correlations = array();
$correlatingValues = array($a['value1']);
if (!empty($a['value2'])) $correlatingValues[] = $a['value2'];
foreach ($correlatingValues as $k => $cV) {

View File

@ -365,11 +365,7 @@ class SharingGroup extends AppModel {
$sgids = $existingSG['SharingGroup']['id'];
$editedSG = $existingSG['SharingGroup'];
$attributes = array('name', 'releasability', 'description', 'created', 'modified');
$different = false;
foreach ($attributes as &$a) {
if (!in_array($a, array('created', 'modified')) && $editedSG[$a] !== $sg[$a]) {
$different = true;
}
foreach ($attributes as $a) {
$editedSG[$a] = $sg[$a];
}
$this->save($editedSG);