@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | $intranet = array(); |
| 289 | 289 | $db = $this->dbquery->getRecordset('DISTINCT(intranet.id), intranet.name'); |
| 290 | 290 | while ($db->nextRecord()) { |
| 291 | - $intranet[$i]['id'] = $db->f('id'); |
|
| 291 | + $intranet[$i]['id'] = $db->f('id'); |
|
| 292 | 292 | $intranet[$i]['name'] = $db->f('name'); |
| 293 | 293 | $i++; |
| 294 | 294 | } |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | */ |
| 317 | 317 | function setContact($contact_id) |
| 318 | 318 | { |
| 319 | - $this->db->query("UPDATE intranet SET contact_id = ".intval($contact_id)." WHERE id = " . intval($this->id)); |
|
| 319 | + $this->db->query("UPDATE intranet SET contact_id = ".intval($contact_id)." WHERE id = ".intval($this->id)); |
|
| 320 | 320 | return true; |
| 321 | 321 | } |
| 322 | 322 | |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | |
| 334 | 334 | private function identifierIsUnique($identifier) |
| 335 | 335 | { |
| 336 | - $result = $this->db->query("SELECT identifier FROM intranet WHERE identifier = ".$this->db->quote($identifier, 'text')." AND id <> " . intval($this->id)); |
|
| 336 | + $result = $this->db->query("SELECT identifier FROM intranet WHERE identifier = ".$this->db->quote($identifier, 'text')." AND id <> ".intval($this->id)); |
|
| 337 | 337 | if ($result->numRows() > 1) { |
| 338 | 338 | return false; |
| 339 | 339 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | 'intranet_maintenance' => $this->getIntranetmaintenance() |
| 30 | 30 | ); |
| 31 | 31 | |
| 32 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/intranet/index'); |
|
| 32 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/intranet/index'); |
|
| 33 | 33 | return $smarty->render($this, $data); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $modul = $this->getKernel()->module("intranetmaintenance"); |
| 41 | 41 | $translation = $this->getKernel()->getTranslation('intranetmaintenance'); |
| 42 | 42 | |
| 43 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/intranet/edit'); |
|
| 43 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/intranet/edit'); |
|
| 44 | 44 | return $smarty->render($this); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | $module = $this->getModule(); |
| 17 | 17 | |
| 18 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/modules'); |
|
| 18 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/modules'); |
|
| 19 | 19 | return $smarty->render($this); |
| 20 | 20 | } |
| 21 | 21 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | $module = $this->getKernel()->module("intranetmaintenance"); |
| 16 | 16 | $translation = $this->getKernel()->getTranslation('intranetmaintenance'); |
| 17 | 17 | |
| 18 | - $smarty = $this->template->create(dirname(__FILE__) . '/../templates/user/permission'); |
|
| 18 | + $smarty = $this->template->create(dirname(__FILE__).'/../templates/user/permission'); |
|
| 19 | 19 | return $smarty->render($this); |
| 20 | 20 | } |
| 21 | 21 | |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | function wrapHtml($content) |
| 45 | 45 | { |
| 46 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/content'); |
|
| 46 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/content'); |
|
| 47 | 47 | return $tpl->render($this, array('content' => $content)); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -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 | } |