Fix to the templating being broken, fixes #787

pull/796/head
iglocska 2015-12-25 00:25:59 +01:00
parent e3b3c1fa82
commit 7e2a935226
1 changed files with 2 additions and 2 deletions

View File

@ -276,7 +276,7 @@ class TemplatesController extends AppController {
if ($this->request->is('post')) {
$errors = array();
$this->set('template', $this->request->data);
$result = $this->Event->Attribute->checkTemplateAttributes($template, $this->request->data, $event_id, $event['Event']['distribution']);
$result = $this->Event->Attribute->checkTemplateAttributes($template, $this->request->data, $event_id);
if (isset($this->request->data['Template']['modify']) || !empty($result['errors'])) {
$fileArray = $this->request->data['Template']['fileArray'];
$this->set('fileArray', $fileArray);
@ -288,7 +288,7 @@ class TemplatesController extends AppController {
$this->set('attributes', $result['attributes']);
$fileArray = $this->request->data['Template']['fileArray'];
$this->set('fileArray', $fileArray);
$this->set('distributionLevels', $this->Event->distributionLevels);
$this->set('distributionLevels', $this->Event->Attribute->distributionLevels);
$this->render('populate_event_from_template_attributes');
}
} else {