Small errors with the merge corrected

- some errors managed to slip through during the merge, should be fixed
pull/64/merge
Andras Iklody 2013-04-25 15:37:49 +02:00
parent 4396cec8ea
commit b98818ebfb
6 changed files with 14 additions and 25 deletions

View File

@ -85,7 +85,7 @@ class AttributesController extends AppController {
$this->Attribute->recursive = 0;
$this->set('isSearch', 0);
$this->set('attributes', $this->paginate);
$this->set('attributes', $this->paginate());
$this->set('attrDescriptions', $this->Attribute->fieldDescriptions);
$this->set('typeDefinitions', $this->Attribute->typeDefinitions);
@ -708,6 +708,7 @@ class AttributesController extends AppController {
// search on the value field
if (isset($keyword)) {
$keywordArray = explode("\n", $keyword);
$this->set('keywordArray', $keywordArray);
$i = 1;
$temp = array();
foreach ($keywordArray as $keywordArrayElement) {

View File

@ -114,10 +114,7 @@ class EventsController extends AppController {
// list the events
$this->Event->recursive = 0;
$paginated = $this->paginate();
$events = $paginated;
$this->set('events', $events);
$this->set('events', $this->paginate());
if (!$this->Auth->user('gpgkey')) {
$this->Session->setFlash(__('No GPG key set in your profile. To receive emails, submit your public key in your profile.'));
}

View File

@ -22,8 +22,8 @@ class ShadowAttribute extends AppModel {
//'change' => 'full'),
'Trim',
'Containable',
//'Regexp' => array('fields' => array('value', 'value2')),
//'Blacklist' => array('fields' => array('value'))
'Regexp' => array('fields' => array('value', 'value2')),
'Blacklist' => array('fields' => array('value'))
);
/**
@ -256,18 +256,13 @@ class ShadowAttribute extends AppModel {
public function __construct($id = false, $table = null, $ds = null) {
parent::__construct($id, $table, $ds);
if ('true' == Configure::read('CyDefSIG.private')) {
$this->virtualFields = Set::merge($this->virtualFields,array(
//'distribution' => 'IF (Attribute.private=true, "Your organization only", IF (Attribute.cluster=true, "This Community-only", "All communities"))',
//'distribution' => 'IF (ShadowAttribute.private=true AND ShadowAttribute.cluster=false, "Your organization only", IF (ShadowAttribute.private=true AND ShadowAttribute.cluster=true, "This server-only", IF (ShadowAttribute.private=false AND ShadowAttribute.cluster=true, "This Community-only", IF (ShadowAttribute.communitie=true, "Connected communities" , "All communities"))))',
));
$this->fieldDescriptions = Set::merge($this->fieldDescriptions,array(
//'distribution' => array('desc' => 'This fields indicates the intended distribution of the attribute (same as when adding an event, see Add Event)'),
));
}
$this->virtualFields = Set::merge($this->virtualFields,array(
//'distribution' => 'IF (Attribute.private=true, "Your organization only", IF (Attribute.cluster=true, "This Community-only", "All communities"))',
//'distribution' => 'IF (ShadowAttribute.private=true AND ShadowAttribute.cluster=false, "Your organization only", IF (ShadowAttribute.private=true AND ShadowAttribute.cluster=true, "This server-only", IF (ShadowAttribute.private=false AND ShadowAttribute.cluster=true, "This Community-only", IF (ShadowAttribute.communitie=true, "Connected communities" , "All communities"))))',
));
$this->fieldDescriptions = Set::merge($this->fieldDescriptions,array(
//'distribution' => array('desc' => 'This fields indicates the intended distribution of the attribute (same as when adding an event, see Add Event)'),
));
}
//The Associations below have been created with all possible keys, those that are not needed can be removed

View File

@ -57,7 +57,6 @@ foreach ($attributes as $attribute):
<?php echo h($attribute['Attribute']['type']); ?>&nbsp;</td>
<td onclick="document.location ='<?php echo $this->Html->url(array('controller' => 'events', 'action' => 'view', $attribute['Attribute']['event_id']), true);?>';">
<?php
$sigDisplay = nl2br($attribute['Attribute']['value']);
$sigDisplay = nl2br(h($attribute['Attribute']['value']));
if ($isSearch == 1 && !empty($replacePairs)) {
// highlight the keywords if there are any

View File

@ -13,8 +13,8 @@
foreach ($list as $item): ?>
<tr>
<td class="short"><?php echo h($item['Role']['id']); ?>&nbsp;</td>
<td class="short"><?php echo $item['Role']['name']; ?>&nbsp;</td>
<td class="short"><?php echo $options[$item['Role']['permission']]; ?>&nbsp;</td>
<td class="short"><?php echo h($item['Role']['name']); ?>&nbsp;</td>
<td class="short"><?php echo h($options[$item['Role']['permission']]); ?>&nbsp;</td>
<td class="short"><?php echo h($item['Role']['perm_sync']); ?>&nbsp;</td>
<td class="short"><?php echo h($item['Role']['perm_admin']); ?>&nbsp;</td>
<td class="short"><?php echo h($item['Role']['perm_audit']); ?>&nbsp;</td>

View File

@ -1,6 +1,3 @@
<?php
$mayModify = true;
?>
<div class="shadowAttributes form">
<?php echo $this->Form->create('ShadowAttribute');?>
<fieldset>