@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | { |
40 | 40 | $post_id = (int)$post_id; |
41 | 41 | $db = new DB_Sql; |
42 | - $db->query("SELECT voucher_id FROM accounting_post WHERE id = " . $post_id . " AND year_id = " . $year->get('id') . " AND intranet_id=" . $year->kernel->intranet->get('id')); |
|
42 | + $db->query("SELECT voucher_id FROM accounting_post WHERE id = ".$post_id." AND year_id = ".$year->get('id')." AND intranet_id=".$year->kernel->intranet->get('id')); |
|
43 | 43 | if (!$db->nextRecord()) { |
44 | 44 | return new Post(new Voucher($year)); |
45 | 45 | } |
46 | - $post = new Post(new Voucher($year, $db->f('voucher_id')), (int)$post_id); |
|
46 | + $post = new Post(new Voucher($year, $db->f('voucher_id')), (int)$post_id); |
|
47 | 47 | return $post; |
48 | 48 | |
49 | 49 | } |
@@ -51,13 +51,13 @@ discard block |
||
51 | 51 | public function getList($type = 'stated') |
52 | 52 | { |
53 | 53 | $db = new DB_Sql; |
54 | - $sql = "SELECT voucher.reference, post.id, post.text, post.voucher_id, post.date, post.account_id, post.debet, post.credit, post.stated, DATE_FORMAT(post.date, '%d-%m-%Y') AS date_dk FROM accounting_post post INNER JOIN accounting_voucher voucher ON post.voucher_id = voucher.id WHERE post.year_id = " . $this->voucher->year->get('id') . " AND post.intranet_id = " . $this->voucher->year->kernel->intranet->get('id'); |
|
54 | + $sql = "SELECT voucher.reference, post.id, post.text, post.voucher_id, post.date, post.account_id, post.debet, post.credit, post.stated, DATE_FORMAT(post.date, '%d-%m-%Y') AS date_dk FROM accounting_post post INNER JOIN accounting_voucher voucher ON post.voucher_id = voucher.id WHERE post.year_id = ".$this->voucher->year->get('id')." AND post.intranet_id = ".$this->voucher->year->kernel->intranet->get('id'); |
|
55 | 55 | if ($type == 'stated') { |
56 | 56 | $sql .= " AND post.stated = 1"; |
57 | 57 | } elseif ($type == 'draft') { |
58 | 58 | $sql .= " AND post.stated = 0"; |
59 | 59 | } |
60 | - $db->query($sql . " ORDER BY post.voucher_id DESC, post.id DESC"); |
|
60 | + $db->query($sql." ORDER BY post.voucher_id DESC, post.id DESC"); |
|
61 | 61 | |
62 | 62 | $i = 0; |
63 | 63 | $this->value['list_saldo'] = 0; |
@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | if (empty($dbhost) OR empty($dbuser) OR empty($dbpass) OR empty($dbname)) { |
17 | 17 | $this->db = MDB2::singleton(DB_DSN); |
18 | 18 | } else { |
19 | - $this->db = MDB2::singleton('mysql://' . $dbuser . ':' . $dbpass . '@' . $dbhost . '/' . $dbname); |
|
19 | + $this->db = MDB2::singleton('mysql://'.$dbuser.':'.$dbpass.'@'.$dbhost.'/'.$dbname); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | if (PEAR::isError($this->db)) { |
23 | - die($this->db->getMessage() . ' ' . $this->db->getUserInfo()); |
|
23 | + die($this->db->getMessage().' '.$this->db->getUserInfo()); |
|
24 | 24 | } |
25 | 25 | $this->db->query('SET NAMES utf8'); |
26 | 26 | $this->db->setOption('portability', MDB2_PORTABILITY_NONE); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | { |
31 | 31 | $this->result = $this->db->query($SQL); |
32 | 32 | if (PEAR::isError($this->result)) { |
33 | - die($this->result->getMessage() . ' ' . $this->result->getUserInfo()); |
|
33 | + die($this->result->getMessage().' '.$this->result->getUserInfo()); |
|
34 | 34 | } |
35 | 35 | } |
36 | 36 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | { |
39 | 39 | $this->result = $this->db->exec($SQL); |
40 | 40 | if (PEAR::isError($this->result)) { |
41 | - die($this->result->getMessage() . ' ' . $this->result->getUserInfo()); |
|
41 | + die($this->result->getMessage().' '.$this->result->getUserInfo()); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | $this->result->free(); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | // while($db->next_record()) { |
53 | 53 | $this->row = $this->result->fetchRow(MDB2_FETCHMODE_ASSOC); |
54 | 54 | if (PEAR::isError($this->row)) { |
55 | - die($this->row->getMessage() . '' . $this->row->getUserInfo()); |
|
55 | + die($this->row->getMessage().''.$this->row->getUserInfo()); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | return($this->row); |
@@ -373,7 +373,7 @@ |
||
373 | 373 | try { |
374 | 374 | $product->setAttributeGroup($group); |
375 | 375 | $this->assertTrue(false, 'An excpetion is not thrown'); |
376 | - } catch(Exception $e) { |
|
376 | + } catch (Exception $e) { |
|
377 | 377 | $this->assertEquals('You can not set attribute group for a product without variations!', $e->getMessage()); |
378 | 378 | } |
379 | 379 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | |
39 | 39 | try { |
40 | 40 | $object->save(); |
41 | - } catch(Exception $e) { |
|
41 | + } catch (Exception $e) { |
|
42 | 42 | // $this->assertTrue(false, $e->getErrorMessage()); |
43 | 43 | } |
44 | 44 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $object->setType($type->getByIsoCode('EUR')); |
28 | 28 | try { |
29 | 29 | $object->save(); |
30 | - } catch(Exception $e) { |
|
30 | + } catch (Exception $e) { |
|
31 | 31 | $this->assertTrue(false, $e->getMessage()); |
32 | 32 | } |
33 | 33 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | |
11 | 11 | function renderHtml() |
12 | 12 | { |
13 | - return get_class($this) . ' intentionally left blank'; |
|
13 | + return get_class($this).' intentionally left blank'; |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | function getPrivateKey() |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $this->getCredentials(), |
61 | 61 | $shop_id, |
62 | 62 | $debug, |
63 | - INTRAFACE_XMLPRC_SERVER_PATH . "shop/server0100.php", |
|
63 | + INTRAFACE_XMLPRC_SERVER_PATH."shop/server0100.php", |
|
64 | 64 | 'utf-8' |
65 | 65 | ); // 'iso-8859-1', 'xmlrpcext' |
66 | 66 | return new IntrafacePublic_Shop($client, $this->cache); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | new IntrafacePublic_OnlinePayment_Client_XMLRPC( |
75 | 75 | $this->getCredentials(), |
76 | 76 | $debug, |
77 | - INTRAFACE_XMLPRC_SERVER_PATH . "onlinepayment/server0100.php", // , 'iso-8859-1', 'xmlrpcext' |
|
77 | + INTRAFACE_XMLPRC_SERVER_PATH."onlinepayment/server0100.php", // , 'iso-8859-1', 'xmlrpcext' |
|
78 | 78 | 'utf-8' |
79 | 79 | ), |
80 | 80 | $this->cache |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $this->getCredentials(), |
44 | 44 | $list_id, |
45 | 45 | $debug, |
46 | - INTRAFACE_XMLPRC_SERVER_PATH . "newsletter/server0101.php", |
|
46 | + INTRAFACE_XMLPRC_SERVER_PATH."newsletter/server0101.php", |
|
47 | 47 | 'utf-8' |
48 | 48 | ); // , 'iso-8859-1', 'xmlrpcext' |
49 | 49 | return $client; |
@@ -10,7 +10,7 @@ |
||
10 | 10 | |
11 | 11 | function renderHtml() |
12 | 12 | { |
13 | - return get_class($this) . ' intentionally left blank'; |
|
13 | + return get_class($this).' intentionally left blank'; |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | function getPrivateKey() |