@@ -47,7 +47,7 @@ |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | // TODO: we need to find a better solution for this |
50 | - $response = new k_TextResponse('Failure: ' . $action->error->view()); |
|
50 | + $response = new k_TextResponse('Failure: '.$action->error->view()); |
|
51 | 51 | $response->setStatus(400); |
52 | 52 | return $response; |
53 | 53 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | function findBySectionAndType($section, $type) |
15 | 15 | { |
16 | - $class = $this->class_prefix . ucfirst($type); |
|
16 | + $class = $this->class_prefix.ucfirst($type); |
|
17 | 17 | |
18 | 18 | if (!class_exists($class)) { |
19 | 19 | throw new Exception('Class does not exist'); |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | $cms_module = $this->kernel->getModule('cms'); |
27 | 27 | $element_types = $cms_module->getSetting('element_types'); |
28 | 28 | |
29 | - $this->db->query("SELECT id, section_id, type_key FROM cms_element WHERE id = " . $id . " AND intranet_id = " . $this->kernel->intranet->get('id')); |
|
29 | + $this->db->query("SELECT id, section_id, type_key FROM cms_element WHERE id = ".$id." AND intranet_id = ".$this->kernel->intranet->get('id')); |
|
30 | 30 | if (!$this->db->nextRecord()) { |
31 | 31 | return false; |
32 | 32 | } |
33 | - $class = $this->class_prefix . ucfirst($element_types[$this->db->f('type_key')]); |
|
33 | + $class = $this->class_prefix.ucfirst($element_types[$this->db->f('type_key')]); |
|
34 | 34 | if (!class_exists($class)) { |
35 | 35 | return false; |
36 | 36 | } |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | $cms_module = $kernel->getModule('cms'); |
43 | 43 | $element_types = $cms_module->getSetting('element_types'); |
44 | 44 | |
45 | - $this->db->query("SELECT id, section_id, type_key FROM cms_element WHERE id = " . $id . " AND intranet_id = " . $kernel->intranet->get('id')); |
|
45 | + $this->db->query("SELECT id, section_id, type_key FROM cms_element WHERE id = ".$id." AND intranet_id = ".$kernel->intranet->get('id')); |
|
46 | 46 | if (!$this->db->nextRecord()) { |
47 | 47 | return false; |
48 | 48 | } |
49 | - $class = $this->class_prefix . ucfirst($element_types[$this->db->f('type_key')]); |
|
49 | + $class = $this->class_prefix.ucfirst($element_types[$this->db->f('type_key')]); |
|
50 | 50 | if (!class_exists($class)) { |
51 | 51 | return false; |
52 | 52 | } |
@@ -61,12 +61,12 @@ discard block |
||
61 | 61 | $cms_module = $section->kernel->getModule('cms'); |
62 | 62 | $element_types = $cms_module->getSetting('element_types'); |
63 | 63 | |
64 | - $this->db->query("SELECT id, section_id, type_key FROM cms_element WHERE id = " . $id . " AND intranet_id = " . $section->kernel->intranet->get('id')); |
|
64 | + $this->db->query("SELECT id, section_id, type_key FROM cms_element WHERE id = ".$id." AND intranet_id = ".$section->kernel->intranet->get('id')); |
|
65 | 65 | if (!$this->db->nextRecord()) { |
66 | 66 | return false; |
67 | 67 | } |
68 | 68 | |
69 | - $class = $this->class_prefix . ucfirst($element_types[$this->db->f('type_key')]); |
|
69 | + $class = $this->class_prefix.ucfirst($element_types[$this->db->f('type_key')]); |
|
70 | 70 | if (!class_exists($class)) { |
71 | 71 | return false; |
72 | 72 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | $this->value['search'] = $this->parameter->get('search'); |
16 | 16 | $this->value['number'] = $this->parameter->get('number'); |
17 | - $twitterSearch = new Zend_Service_Twitter_Search('json'); |
|
17 | + $twitterSearch = new Zend_Service_Twitter_Search('json'); |
|
18 | 18 | $this->value['results'] = serialize($twitterSearch->search($this->parameter->get('search'), array('rpp' => $this->parameter->get('number')))); |
19 | 19 | } |
20 | 20 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | { |
16 | 16 | // validering p� value // kun v�re gyldige elementtyper |
17 | 17 | // object skal vre cmspage |
18 | - $class = $this->class_prefix . ucfirst($type); |
|
18 | + $class = $this->class_prefix.ucfirst($type); |
|
19 | 19 | return new $class($page); |
20 | 20 | } |
21 | 21 | |
@@ -25,12 +25,12 @@ discard block |
||
25 | 25 | $cms_module = $this->kernel->getModule('cms'); |
26 | 26 | $section_types = $cms_module->getSetting('section_types'); |
27 | 27 | |
28 | - $this->db->query("SELECT id, page_id, type_key FROM cms_section WHERE id = " . $id . " AND intranet_id = " . $this->kernel->intranet->get('id')); |
|
28 | + $this->db->query("SELECT id, page_id, type_key FROM cms_section WHERE id = ".$id." AND intranet_id = ".$this->kernel->intranet->get('id')); |
|
29 | 29 | |
30 | 30 | if (!$this->db->nextRecord()) { |
31 | 31 | return false; |
32 | 32 | } |
33 | - $class = $this->class_prefix . ucfirst($section_types[$this->db->f('type_key')]); |
|
33 | + $class = $this->class_prefix.ucfirst($section_types[$this->db->f('type_key')]); |
|
34 | 34 | return new $class(CMS_Page::factory($this->kernel, 'id', $this->db->f('page_id')), $this->db->f('id')); |
35 | 35 | |
36 | 36 | } |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | $cms_module = $this->kernel->getModule('cms'); |
42 | 42 | $section_types = $cms_module->getSetting('section_types'); |
43 | 43 | |
44 | - $this->db->query("SELECT id, page_id, type_key FROM cms_section WHERE id = " . $id . " AND intranet_id = " . $this->kernel->intranet->get('id')); |
|
44 | + $this->db->query("SELECT id, page_id, type_key FROM cms_section WHERE id = ".$id." AND intranet_id = ".$this->kernel->intranet->get('id')); |
|
45 | 45 | if (!$this->db->nextRecord()) { |
46 | 46 | return false; |
47 | 47 | } |
48 | - $class = $this->class_prefix . ucfirst($section_types[$this->db->f('type_key')]); |
|
48 | + $class = $this->class_prefix.ucfirst($section_types[$this->db->f('type_key')]); |
|
49 | 49 | return new $class($page, $this->db->f('id')); |
50 | 50 | } |
51 | 51 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | function findById($id) |
14 | 14 | { |
15 | - $this->db->query("SELECT site_id, id FROM cms_template WHERE id = " . $id . " AND intranet_id = " . $this->kernel->intranet->get('id')); |
|
15 | + $this->db->query("SELECT site_id, id FROM cms_template WHERE id = ".$id." AND intranet_id = ".$this->kernel->intranet->get('id')); |
|
16 | 16 | if (!$this->db->nextRecord()) { |
17 | 17 | return false; |
18 | 18 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | function getAll() |
24 | 24 | { |
25 | - $this->db->query("SELECT id, name FROM cms_site WHERE intranet_id = " . $this->kernel->intranet->get('id'). " AND active = 1"); |
|
25 | + $this->db->query("SELECT id, name FROM cms_site WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND active = 1"); |
|
26 | 26 | $i = 0; |
27 | 27 | $sites = array(); |
28 | 28 | while ($this->db->nextRecord()) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | 'translation' => $this->getKernel()->getTranslation('cms') |
56 | 56 | ); |
57 | 57 | |
58 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/section-html-edit'); |
|
58 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/section-html-edit'); |
|
59 | 59 | return $tpl->render($this, $data); |
60 | 60 | } |
61 | 61 | |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | $redirect = Intraface_Redirect::factory($this->getKernel(), 'go'); |
73 | 73 | $module_filemanager = $this->getKernel()->useModule('filemanager'); |
74 | 74 | if ($element->get('type') == 'picture') { |
75 | - return new k_SeeOther($this->url($element->get('id') . '/filehandler/selectfile', array('images' => 1))); |
|
75 | + return new k_SeeOther($this->url($element->get('id').'/filehandler/selectfile', array('images' => 1))); |
|
76 | 76 | } elseif ($element->get('type') == 'gallery') { |
77 | - return new k_SeeOther($this->url($element->get('id') . '/filehandler/selectfile', array('images' => 1, 'multiple_choice' => 'true'))); |
|
77 | + return new k_SeeOther($this->url($element->get('id').'/filehandler/selectfile', array('images' => 1, 'multiple_choice' => 'true'))); |
|
78 | 78 | } elseif ($element->get('type') == 'filelist') { |
79 | - return new k_SeeOther($this->url($element->get('id') . '/filehandler/selectfile', array('images' => 0, 'multiple_choice' => 'true'))); |
|
79 | + return new k_SeeOther($this->url($element->get('id').'/filehandler/selectfile', array('images' => 0, 'multiple_choice' => 'true'))); |
|
80 | 80 | } else { |
81 | 81 | throw new Exception("Det er ikke en gyldig elementtype til at lave redirect fra"); |
82 | 82 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | 'translation' => $this->getKernel()->getTranslation('cms') |
102 | 102 | ); |
103 | 103 | |
104 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/section-html-edit'); |
|
104 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/section-html-edit'); |
|
105 | 105 | return $tpl->render($this, $data); |
106 | 106 | |
107 | 107 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } elseif (!empty($_POST['close'])) { |
132 | 132 | return new k_SeeOther($this->url('../../')); |
133 | 133 | } else { |
134 | - return new k_SeeOther($this->url('../../element/' . $element->get('id'))); |
|
134 | + return new k_SeeOther($this->url('../../element/'.$element->get('id'))); |
|
135 | 135 | } |
136 | 136 | } else { |
137 | 137 | $value = $_POST; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | 'kernel' => $this->getKernel(), |
53 | 53 | 'error' => $this->error |
54 | 54 | ); |
55 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/page'); |
|
55 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/page'); |
|
56 | 56 | return $tpl->render($this, $data); |
57 | 57 | } |
58 | 58 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | */ |
99 | 99 | if (!$section->save($value)) { |
100 | - $this->error[$section->get('id')] = $this->t('error in section') . ' ' . strtolower(implode($section->error->message, ', ')); |
|
100 | + $this->error[$section->get('id')] = $this->t('error in section').' '.strtolower(implode($section->error->message, ', ')); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | } |
@@ -119,14 +119,14 @@ discard block |
||
119 | 119 | |
120 | 120 | return new k_SeeOther($url); |
121 | 121 | */ |
122 | - return new k_SeeOther($this->url($section_id . '/filehandler/selectfile')); |
|
122 | + return new k_SeeOther($this->url($section_id.'/filehandler/selectfile')); |
|
123 | 123 | } elseif ($this->body('edit_html')) { |
124 | 124 | $keys = array_keys($_POST['edit_html']); |
125 | 125 | return new k_SeeOther($this->url($keys[0])); |
126 | 126 | } elseif ($this->body('close')) { |
127 | 127 | return new k_SeeOther($this->url('../../', array('type' => $this->context->getModel()->get('type'), 'id' => $this->context->getModel()->cmssite->get('id')))); |
128 | 128 | } else { |
129 | - return new k_SeeOther($this->url('../../' . $this->context->getModel()->get('id'))); |
|
129 | + return new k_SeeOther($this->url('../../'.$this->context->getModel()->get('id'))); |
|
130 | 130 | } |
131 | 131 | } else { |
132 | 132 | $cmspage = $section->cmspage; |