@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | function renderHtml() |
37 | 37 | { |
38 | - $rate = new Intraface_modules_currency_Currency_ExchangeRate; |
|
38 | + $rate = new Intraface_modules_currency_Currency_ExchangeRate; |
|
39 | 39 | $types = $rate->getUsedForTypes(); |
40 | 40 | if (false === ($used_for_key = array_search($this->context->name(), $types))) { |
41 | 41 | throw new Exception('Invalid used for '.$this->context->name()); |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | } else { |
49 | 49 | throw new Exception('Invalid context'); |
50 | 50 | } |
51 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/exchangerate-add'); |
|
52 | - return $this->getError()->view() . $tpl->render($this); |
|
51 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/exchangerate-add'); |
|
52 | + return $this->getError()->view().$tpl->render($this); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | function postForm() |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | $tpl = $this->template->create('Intraface/modules/currency/Controller/tpl/add'); |
24 | 24 | |
25 | - return $this->getError()->view() . $tpl->render($this, $data); |
|
25 | + return $this->getError()->view().$tpl->render($this, $data); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | function postForm() |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | $data = array('languages' => $gateway->getAll(), 'chosen' => $chosen); |
21 | 21 | |
22 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/languages'); |
|
22 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/languages'); |
|
23 | 23 | return $tpl->render($this, $data); |
24 | 24 | } |
25 | 25 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | function wrapHtml($content) |
41 | 41 | { |
42 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/content'); |
|
42 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/content'); |
|
43 | 43 | return $tpl->render($this, array('content' => $content)); |
44 | 44 | } |
45 | 45 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | function findByEmail($value) |
34 | 34 | { |
35 | - $this->db->query("SELECT address.belong_to_id AS id FROM contact INNER JOIN address ON address.belong_to_id = contact.id WHERE address.email = '".$value."' AND contact.intranet_id = " . $this->kernel->intranet->get('id') . " AND address.active = 1 AND contact.active = 1"); |
|
35 | + $this->db->query("SELECT address.belong_to_id AS id FROM contact INNER JOIN address ON address.belong_to_id = contact.id WHERE address.email = '".$value."' AND contact.intranet_id = ".$this->kernel->intranet->get('id')." AND address.active = 1 AND contact.active = 1"); |
|
36 | 36 | if ($this->db->numRows() == 0) { |
37 | 37 | return array(); |
38 | 38 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | function findByCode($value) |
47 | 47 | { |
48 | - $this->db->query("SELECT id FROM contact WHERE code = '".$value."' AND contact.intranet_id = " . $this->kernel->intranet->get('id')); |
|
48 | + $this->db->query("SELECT id FROM contact WHERE code = '".$value."' AND contact.intranet_id = ".$this->kernel->intranet->get('id')); |
|
49 | 49 | if (!$this->db->nextRecord()) { |
50 | 50 | throw new Exception('Contact not found'); |
51 | 51 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | function findByUsername($value) |
56 | 56 | { |
57 | - $this->db->query("SELECT id FROM contact WHERE username = '".$value['username']."' AND password = '".$value['password']."' AND contact.intranet_id = " . $kernel->intranet->get('id')); |
|
57 | + $this->db->query("SELECT id FROM contact WHERE username = '".$value['username']."' AND password = '".$value['password']."' AND contact.intranet_id = ".$kernel->intranet->get('id')); |
|
58 | 58 | if (!$this->db->nextRecord()) { |
59 | 59 | throw new Exception('Contact not found'); |
60 | 60 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | function findByOpenId($value) |
65 | 65 | { |
66 | - $this->db->query("SELECT id FROM contact WHERE openid_url = '".$value."' AND contact.intranet_id = " . $kernel->intranet->get('id')); |
|
66 | + $this->db->query("SELECT id FROM contact WHERE openid_url = '".$value."' AND contact.intranet_id = ".$kernel->intranet->get('id')); |
|
67 | 67 | if (!$this->db->nextRecord()) { |
68 | 68 | throw new Exception('Contact not found'); |
69 | 69 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | public function getMaxNumber() |
127 | 127 | { |
128 | - $this->db->query("SELECT number FROM contact WHERE intranet_id = " . $this->kernel->intranet->get("id") . " ORDER BY number DESC"); |
|
128 | + $this->db->query("SELECT number FROM contact WHERE intranet_id = ".$this->kernel->intranet->get("id")." ORDER BY number DESC"); |
|
129 | 129 | if (!$this->db->nextRecord()) { |
130 | 130 | return 0; |
131 | 131 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | { |
21 | 21 | $module = $this->getKernel()->module("contact"); |
22 | 22 | |
23 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/choosecontact'); |
|
23 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/choosecontact'); |
|
24 | 24 | return $smarty->render($this, array('contacts' => $this->getContacts())); |
25 | 25 | } |
26 | 26 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | $this->document->addScript('contact/contact_edit.js'); |
94 | 94 | |
95 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/edit'); |
|
95 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/edit'); |
|
96 | 96 | return $smarty->render($this); |
97 | 97 | } |
98 | 98 |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | function renderHtml() |
34 | 34 | { |
35 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/show'); |
|
35 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/show'); |
|
36 | 36 | return $smarty->render($this, array('persons' => $this->getContactPersons())); |
37 | 37 | } |
38 | 38 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | { |
41 | 41 | $this->document->addScript('contact/contact_edit.js'); |
42 | 42 | |
43 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/edit'); |
|
43 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/edit'); |
|
44 | 44 | return $smarty->render($this); |
45 | 45 | } |
46 | 46 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | if (!$email->save( |
216 | 216 | array( |
217 | 217 | 'subject' => 'Loginoplysninger', |
218 | - 'body' => $this->getKernel()->setting->get('intranet', 'contact.login_email_text') . "\n\n" . $this->getContact()->getLoginUrl() . "\n\nMed venlig hilsen\nEn venlig e-mail-robot\n" . $this->getKernel()->intranet->get('name'), |
|
218 | + 'body' => $this->getKernel()->setting->get('intranet', 'contact.login_email_text')."\n\n".$this->getContact()->getLoginUrl()."\n\nMed venlig hilsen\nEn venlig e-mail-robot\n".$this->getKernel()->intranet->get('name'), |
|
219 | 219 | 'contact_id' => $this->getContact()->get('id'), |
220 | 220 | 'from_email' => $this->getKernel()->intranet->address->get('email'), |
221 | 221 | 'from_name' => $this->getKernel()->intranet->get('name'), |
@@ -271,14 +271,14 @@ discard block |
||
271 | 271 | // get back the vCard and print it |
272 | 272 | $output = $vcard->fetch(); |
273 | 273 | |
274 | - $filename = $contact->get('name') . '.vcf'; |
|
274 | + $filename = $contact->get('name').'.vcf'; |
|
275 | 275 | |
276 | 276 | header('HTTP/1.1 200 OK'); |
277 | - header('Content-Length: ' . strlen($output)); |
|
277 | + header('Content-Length: '.strlen($output)); |
|
278 | 278 | //header("Content-Type: application/force-download"); |
279 | 279 | header('Content-Type: text/x-vCard; name='.$filename); |
280 | - header('Content-Disposition: attachment; filename='. $filename); |
|
281 | - header('Content-Description: VCard for ' . $contact->get('name')); |
|
280 | + header('Content-Disposition: attachment; filename='.$filename); |
|
281 | + header('Content-Description: VCard for '.$contact->get('name')); |
|
282 | 282 | //header("Content-Transfer-Encoding: binary'); |
283 | 283 | header('Connection: close'); |
284 | 284 |
@@ -11,13 +11,13 @@ |
||
11 | 11 | |
12 | 12 | function renderHtml() |
13 | 13 | { |
14 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/memo'); |
|
14 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/memo'); |
|
15 | 15 | return $smarty->render($this, array('reminder' => $this->getMemo())); |
16 | 16 | } |
17 | 17 | |
18 | 18 | function renderHtmlEdit() |
19 | 19 | { |
20 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/memo-edit'); |
|
20 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/memo-edit'); |
|
21 | 21 | return $smarty->render($this, array('reminder' => $this->getMemo())); |
22 | 22 | } |
23 | 23 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | { |
21 | 21 | $data = array('data' => $this->session()->get('fileimport_data')); |
22 | 22 | |
23 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/import'); |
|
23 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/import'); |
|
24 | 24 | return $smarty->render($this, $data); |
25 | 25 | } |
26 | 26 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $string_appender->addKeywordsByString($_POST['keyword']); |
49 | 49 | $this->success++; |
50 | 50 | } else { |
51 | - $this->errors[$e]['line'] = $line+1; // line starts at 0 |
|
51 | + $this->errors[$e]['line'] = $line + 1; // line starts at 0 |
|
52 | 52 | $this->errors[$e]['name'] = $contact['name']; |
53 | 53 | $this->errors[$e]['email'] = $contact['email']; |
54 | 54 | $this->errors[$e]['error'] = $contact_object->error; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $data = $this->session()->set('fileimport_data', null); |
60 | 60 | |
61 | 61 | if (empty($this->errors)) { |
62 | - return new k_SeeOther($this->url('../', array('flare' => $this->success . ' contacts imported successfully'))); |
|
62 | + return new k_SeeOther($this->url('../', array('flare' => $this->success.' contacts imported successfully'))); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | return $this->render(); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $contact = $this->context->getContact(); |
35 | 35 | $similar_contacts = $contact->getSimilarContacts(); |
36 | 36 | |
37 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/merge'); |
|
37 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/merge'); |
|
38 | 38 | return $smarty->render($this); |
39 | 39 | } |
40 | 40 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | function setNewContactId($old_contact_id, $new_contact_id) |
75 | 75 | { |
76 | - $this->db_sql->query('UPDATE contact_person SET contact_id = ' . $new_contact_id . ' WHERE contact_id = ' . $old_contact_id); |
|
76 | + $this->db_sql->query('UPDATE contact_person SET contact_id = '.$new_contact_id.' WHERE contact_id = '.$old_contact_id); |
|
77 | 77 | return true; |
78 | 78 | } |
79 | 79 |