@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | function renderHtml() |
17 | 17 | { |
18 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/payment'); |
|
18 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/payment'); |
|
19 | 19 | return $smarty->render($this); |
20 | 20 | } |
21 | 21 | |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $payment = $this->getPayment(); |
26 | 26 | if ($id = $payment->update($_POST)) { |
27 | 27 | if ($this->getKernel()->user->hasModuleAccess('accounting')) { |
28 | - return new k_SeeOther($this->url($id . '/state')); |
|
28 | + return new k_SeeOther($this->url($id.'/state')); |
|
29 | 29 | } else { |
30 | 30 | return new k_SeeOther($this->url('../')); |
31 | 31 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | return new k_SeeOther($this->url('quotation/list', array('type' => 'quotation'))); |
29 | 29 | } |
30 | 30 | |
31 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
31 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
32 | 32 | return $smarty->render($this); |
33 | 33 | } |
34 | 34 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | 'email_shared' => $email_shared |
63 | 63 | ); |
64 | 64 | |
65 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
65 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
66 | 66 | return $tpl->render($this, $data); |
67 | 67 | } |
68 | 68 |
@@ -153,9 +153,9 @@ discard block |
||
153 | 153 | return false; |
154 | 154 | } |
155 | 155 | |
156 | - $sql = 'name = '.$this->db->quote($input['name'], 'text').', ' . |
|
157 | - 'max_width = '.$this->db->quote($input['max_width'], 'integer').', ' . |
|
158 | - 'max_height = '.$this->db->quote($input['max_height'], 'integer').', ' . |
|
156 | + $sql = 'name = '.$this->db->quote($input['name'], 'text').', '. |
|
157 | + 'max_width = '.$this->db->quote($input['max_width'], 'integer').', '. |
|
158 | + 'max_height = '.$this->db->quote($input['max_height'], 'integer').', '. |
|
159 | 159 | 'resize_type_key = '.$this->db->quote($resize_type_key); |
160 | 160 | |
161 | 161 | if ($this->type_key == 0 || $this->get('origin') == 'standard') { |
@@ -165,9 +165,9 @@ discard block |
||
165 | 165 | $type_key = $this->type_key; |
166 | 166 | } |
167 | 167 | |
168 | - $result = $this->db->exec('INSERT INTO file_handler_instance_type SET ' . |
|
169 | - 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').', ' . |
|
170 | - 'type_key = '.$this->db->quote($type_key, 'integer').', ' . |
|
168 | + $result = $this->db->exec('INSERT INTO file_handler_instance_type SET '. |
|
169 | + 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').', '. |
|
170 | + 'type_key = '.$this->db->quote($type_key, 'integer').', '. |
|
171 | 171 | 'active = 1, '.$sql); |
172 | 172 | if (PEAR::isError($result)) { |
173 | 173 | throw new Exception('Error in exec: '.$result->getUserInfo()); |
@@ -180,8 +180,8 @@ discard block |
||
180 | 180 | $this->type_key = $type_key; |
181 | 181 | return $this->type_key; |
182 | 182 | } else { |
183 | - $result = $this->db->exec('UPDATE file_handler_instance_type SET '.$sql.' ' . |
|
184 | - 'WHERE intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' ' . |
|
183 | + $result = $this->db->exec('UPDATE file_handler_instance_type SET '.$sql.' '. |
|
184 | + 'WHERE intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' '. |
|
185 | 185 | 'AND type_key = '.$this->db->quote($this->type_key, 'integer')); |
186 | 186 | if (PEAR::isError($result)) { |
187 | 187 | throw new Exception('Error in exec: '.$result->getUserInfo()); |
@@ -231,10 +231,10 @@ discard block |
||
231 | 231 | } |
232 | 232 | } |
233 | 233 | |
234 | - $result = $this->db->query('SELECT type_key FROM file_handler_instance_type WHERE ' . |
|
235 | - 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' AND ' . |
|
236 | - 'name = '.$this->db->quote($name, 'text').' AND ' . |
|
237 | - 'type_key != '.$this->db->quote((int)$type_key, 'integer').' AND ' . |
|
234 | + $result = $this->db->query('SELECT type_key FROM file_handler_instance_type WHERE '. |
|
235 | + 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' AND '. |
|
236 | + 'name = '.$this->db->quote($name, 'text').' AND '. |
|
237 | + 'type_key != '.$this->db->quote((int)$type_key, 'integer').' AND '. |
|
238 | 238 | 'active = 1'); |
239 | 239 | if (PEAR::isError($result)) { |
240 | 240 | throw new Exception('Error in query: '.$result->getUserInfo()); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | private function getNextFreeTypeKey() |
258 | 258 | { |
259 | 259 | // We do not active = 1, then it is possible to recreate deleted items without messing everything up. |
260 | - $result = $this->db->query('SELECT MAX(type_key) AS max_key FROM file_handler_instance_type WHERE ' . |
|
260 | + $result = $this->db->query('SELECT MAX(type_key) AS max_key FROM file_handler_instance_type WHERE '. |
|
261 | 261 | 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer')); |
262 | 262 | if (PEAR::isError($result)) { |
263 | 263 | throw new Exception('Error in query: '.$result->getUserInfo()); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * @var string $file_path |
26 | 26 | */ |
27 | - private $file_path ; |
|
27 | + private $file_path; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * @var string $file_dir |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | if (strlen($file_name) > 50) { |
116 | 116 | $extension = strrchr($file_name, '.'); |
117 | 117 | if ($extension !== false && (strlen($extension) == 4 || strlen($extension) == 5)) { |
118 | - $file_name = substr($file_name, 0, 50-strlen($extension)).$extension; |
|
118 | + $file_name = substr($file_name, 0, 50 - strlen($extension)).$extension; |
|
119 | 119 | } else { |
120 | 120 | $file_name = substr($file_name, 0, 50); |
121 | 121 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | |
11 | 11 | function renderHtml() |
12 | 12 | { |
13 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
13 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
14 | 14 | return $smarty->render($this); |
15 | 15 | } |
16 | 16 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | function findById($id, $load_active = true) |
30 | 30 | { |
31 | - require_once dirname(__FILE__) . '/Year.php'; |
|
31 | + require_once dirname(__FILE__).'/Year.php'; |
|
32 | 32 | return new Year($this->kernel, $id, $load_active); |
33 | 33 | } |
34 | 34 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | { |
63 | 63 | $sql = "SELECT id FROM accounting_voucher |
64 | 64 | WHERE intranet_id = ".$this->kernel->intranet->get('id')." |
65 | - AND id = " . (int)$voucher_id . " |
|
65 | + AND id = " . (int)$voucher_id." |
|
66 | 66 | LIMIT 1"; |
67 | 67 | |
68 | 68 | $db = new DB_Sql; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | return new k_SeeOther($this->url('selectyear')); |
26 | 26 | } |
27 | 27 | |
28 | - $this->document->setTitle('State procurement #' . $this->getProcurement()->get('id')); |
|
28 | + $this->document->setTitle('State procurement #'.$this->getProcurement()->get('id')); |
|
29 | 29 | |
30 | 30 | $data = array( |
31 | 31 | 'procurement' => $this->getProcurement(), |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | 'value' => $this->getValues(), |
37 | 37 | 'vat_account' => new Account($this->getYear(), $this->getYear()->getSetting('vat_in_account_id'))); |
38 | 38 | |
39 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/state/procurement'); |
|
39 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/state/procurement'); |
|
40 | 40 | return $smarty->render($this, $data); |
41 | 41 | } |
42 | 42 | |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | function getProposeButton() |
119 | 119 | { |
120 | 120 | if ($this->add_propose_button === true) { |
121 | - return '<input type="submit" name="propose_changes" value="' . $this->t('Propose changes') . '" />'; |
|
121 | + return '<input type="submit" name="propose_changes" value="'.$this->t('Propose changes').'" />'; |
|
122 | 122 | } |
123 | 123 | } |
124 | 124 | } |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | function renderHtml() |
12 | 12 | { |
13 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/year/end'); |
|
13 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/year/end'); |
|
14 | 14 | return $smarty->render($this); |
15 | 15 | } |
16 | 16 | |
@@ -29,21 +29,21 @@ discard block |
||
29 | 29 | $workbook->setVersion(8); |
30 | 30 | |
31 | 31 | // sending HTTP headers |
32 | - $workbook->send($kernel->intranet->get('name') . ' - konti ' . $year->get('label') . '.xls'); |
|
32 | + $workbook->send($kernel->intranet->get('name').' - konti '.$year->get('label').'.xls'); |
|
33 | 33 | |
34 | 34 | // Creating a worksheet |
35 | - $worksheet =& $workbook->addWorksheet('Konti ' . $year->get('label')); |
|
35 | + $worksheet = & $workbook->addWorksheet('Konti '.$year->get('label')); |
|
36 | 36 | $worksheet->setInputEncoding('UTF-8'); |
37 | 37 | |
38 | - $format_bold =& $workbook->addFormat(); |
|
38 | + $format_bold = & $workbook->addFormat(); |
|
39 | 39 | $format_bold->setBold(); |
40 | 40 | $format_bold->setSize(8); |
41 | 41 | |
42 | - $format_italic =& $workbook->addFormat(); |
|
42 | + $format_italic = & $workbook->addFormat(); |
|
43 | 43 | $format_italic->setItalic(); |
44 | 44 | $format_italic->setSize(8); |
45 | 45 | |
46 | - $format =& $workbook->addFormat(); |
|
46 | + $format = & $workbook->addFormat(); |
|
47 | 47 | $format->setSize(8); |
48 | 48 | $i = 0; |
49 | 49 | $worksheet->write($i, 0, $kernel->intranet->get('name'), $format_bold); |