@@ -38,7 +38,7 @@ |
||
38 | 38 | 'db' => $this->mdb2 |
39 | 39 | ); |
40 | 40 | |
41 | - $smarty = $this->template->create(dirname(__FILE__) . '/../tpl/show-plain-text'); |
|
41 | + $smarty = $this->template->create(dirname(__FILE__).'/../tpl/show-plain-text'); |
|
42 | 42 | return $smarty->render($this, $data); |
43 | 43 | } |
44 | 44 |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | 'existing_groups' => $existing_groups, |
50 | 50 | 'groups' => $groups); |
51 | 51 | |
52 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/variations'); |
|
52 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/variations'); |
|
53 | 53 | return $tpl->render($this, $data); |
54 | 54 | } |
55 | 55 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | 'existing_groups' => $existing_groups, |
70 | 70 | 'groups' => $groups); |
71 | 71 | |
72 | - $tpl = $this->template->create(dirname(__FILE__) . '/../tpl/variations-edit'); |
|
72 | + $tpl = $this->template->create(dirname(__FILE__).'/../tpl/variations-edit'); |
|
73 | 73 | return $tpl->render($this, $data); |
74 | 74 | } |
75 | 75 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | $product->getDBQuery()->storeResult("use_stored", "products", "toplevel"); |
19 | 19 | $products = $product->getList(); |
20 | 20 | |
21 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/batchedit'); |
|
21 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/batchedit'); |
|
22 | 22 | return $tpl->render($this, array('products' => $products, 'product' => $product)); |
23 | 23 | } |
24 | 24 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | $data = array('products' => $products, 'product' => $product); |
20 | 20 | |
21 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/batchpricechanger'); |
|
21 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/batchpricechanger'); |
|
22 | 22 | return $tpl->render($this, $data); |
23 | 23 | } |
24 | 24 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | foreach ($this->body('product_id') AS $key => $product_id) { |
30 | 30 | $product = new Product($this->context->getKernel(), $product_id); |
31 | 31 | if ($this->body('change_type') == 'percent') { |
32 | - $new_price = $product->get('price') + intval($product->get('price') * ($_POST['price_change'] / 100)); |
|
32 | + $new_price = $product->get('price') + intval($product->get('price')*($_POST['price_change']/100)); |
|
33 | 33 | if ($this->body('round_off') == 'yes') { |
34 | 34 | $new_price = round($new_price, 0); |
35 | 35 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | return new k_SeeOther($this->url()); |
82 | 82 | } |
83 | 83 | |
84 | - $smarty = $this->template->create(dirname(__FILE__) . '/tpl/show'); |
|
84 | + $smarty = $this->template->create(dirname(__FILE__).'/tpl/show'); |
|
85 | 85 | return $smarty->render($this, $data); |
86 | 86 | } |
87 | 87 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | if ($this->body('choose_file') && $this->getKernel()->user->hasModuleAccess('filemanager')) { |
122 | 122 | $redirect = Intraface_Redirect::factory($this->getKernel(), 'go'); |
123 | 123 | $module_filemanager = $this->getKernel()->useModule('filemanager'); |
124 | - $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('filehandler/selectfile', array('images'=>1, 'multiple_choice' => 1)), NET_SCHEME . NET_HOST . $this->url()); |
|
124 | + $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('filehandler/selectfile', array('images'=>1, 'multiple_choice' => 1)), NET_SCHEME.NET_HOST.$this->url()); |
|
125 | 125 | $redirect->setIdentifier('product'); |
126 | 126 | $redirect->askParameter('file_handler_id', 'multiple'); |
127 | 127 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | 'product' => $this->getProductDoctrine(), |
140 | 140 | ); |
141 | 141 | |
142 | - $smarty = $this->template->create(dirname(__FILE__) . '/tpl/edit'); |
|
142 | + $smarty = $this->template->create(dirname(__FILE__).'/tpl/edit'); |
|
143 | 143 | return $smarty->render($this, $data); |
144 | 144 | } |
145 | 145 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | $this->getKernel()->module('product'); |
210 | 210 | if ($id = $this->getProduct()->copy()) { |
211 | - return new k_SeeOther($this->url('../' . $id)); |
|
211 | + return new k_SeeOther($this->url('../'.$id)); |
|
212 | 212 | } |
213 | 213 | return $this->render(); |
214 | 214 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | { |
31 | 31 | $module = $this->getKernel()->module('product'); |
32 | 32 | |
33 | - $smarty = $this->template->create(dirname(__FILE__) . '/tpl/index'); |
|
33 | + $smarty = $this->template->create(dirname(__FILE__).'/tpl/index'); |
|
34 | 34 | return $smarty->render($this); |
35 | 35 | } |
36 | 36 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $data['product'] = $this->product_doctrine; |
77 | 77 | } |
78 | 78 | |
79 | - $smarty = $this->template->create(dirname(__FILE__) . '/tpl/edit'); |
|
79 | + $smarty = $this->template->create(dirname(__FILE__).'/tpl/edit'); |
|
80 | 80 | return $smarty->render($this, $data); |
81 | 81 | } |
82 | 82 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | { |
13 | 13 | $kernel = $this->context->getKernel(); |
14 | 14 | $kernel->module('product'); |
15 | - $smarty = $this->template->create(dirname(__FILE__) . '/tpl/related'); |
|
15 | + $smarty = $this->template->create(dirname(__FILE__).'/tpl/related'); |
|
16 | 16 | return $smarty->render($this); |
17 | 17 | } |
18 | 18 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | $product->getDBQuery()->defineCharacter("character", "detail_translation.name"); |
62 | - $product->getDBQuery()->setCondition("product.id != " . $this->context->name()); |
|
62 | + $product->getDBQuery()->setCondition("product.id != ".$this->context->name()); |
|
63 | 63 | $product->getDBQuery()->setExtraUri("&id=".(int)$this->context->name()); |
64 | 64 | $product->getDBQuery()->usePaging("paging"); |
65 | 65 | $product->getDBQuery()->storeResult("use_stored", "related_products", "sublevel"); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | $product->getDBQuery()->defineCharacter("character", "detail_translation.name"); |
121 | - $product->getDBQuery()->setCondition("product.id != " . $this->context->name()); |
|
121 | + $product->getDBQuery()->setCondition("product.id != ".$this->context->name()); |
|
122 | 122 | $product->getDBQuery()->setExtraUri("&id=".(int)$this->context->name()); |
123 | 123 | $product->getDBQuery()->usePaging("paging"); |
124 | 124 | $product->getDBQuery()->storeResult("use_stored", "related_products", "sublevel"); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | 'kernel' => $this->getKernel() |
54 | 54 | ); |
55 | 55 | |
56 | - $tpl = $this->template->create(dirname(__FILE__) . '/tpl/variation'); |
|
56 | + $tpl = $this->template->create(dirname(__FILE__).'/tpl/variation'); |
|
57 | 57 | return $tpl->render($this, $data); |
58 | 58 | } |
59 | 59 |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | |
64 | 64 | $identifier = md5($action->getOrderIdentifier().$this->intranet_id.time()); |
65 | 65 | |
66 | - $result = $this->db->exec('INSERT INTO module_package_action SET ' . |
|
67 | - 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').', ' . |
|
68 | - 'identifier = '.$this->db->quote($identifier, 'text').', ' . |
|
69 | - 'order_debtor_identifier = '.$this->db->quote($action->getOrderIdentifier(), 'text').', ' . |
|
70 | - 'date_created = NOW(), ' . |
|
71 | - 'action = '.$this->db->quote($action_serialized, 'text').', ' . |
|
66 | + $result = $this->db->exec('INSERT INTO module_package_action SET '. |
|
67 | + 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').', '. |
|
68 | + 'identifier = '.$this->db->quote($identifier, 'text').', '. |
|
69 | + 'order_debtor_identifier = '.$this->db->quote($action->getOrderIdentifier(), 'text').', '. |
|
70 | + 'date_created = NOW(), '. |
|
71 | + 'action = '.$this->db->quote($action_serialized, 'text').', '. |
|
72 | 72 | 'active = 1'); |
73 | 73 | |
74 | 74 | if (PEAR::isError($result)) { |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | public function restore($identifier) |
96 | 96 | { |
97 | 97 | |
98 | - $result = $this->db->query('SELECT id, action, identifier FROM module_package_action WHERE ' . |
|
99 | - 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' AND ' . |
|
100 | - 'identifier = '.$this->db->quote($identifier, 'text').' AND ' . |
|
98 | + $result = $this->db->query('SELECT id, action, identifier FROM module_package_action WHERE '. |
|
99 | + 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' AND '. |
|
100 | + 'identifier = '.$this->db->quote($identifier, 'text').' AND '. |
|
101 | 101 | 'active = 1 '); |
102 | 102 | |
103 | 103 | if (PEAR::isError($result)) { |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | static public function restoreFromIdentifier($db, $identifier) |
132 | 132 | { |
133 | 133 | |
134 | - $result = $db->query('SELECT id, action, identifier FROM module_package_action WHERE ' . |
|
135 | - 'identifier = '.$db->quote($identifier, 'text').' AND ' . |
|
134 | + $result = $db->query('SELECT id, action, identifier FROM module_package_action WHERE '. |
|
135 | + 'identifier = '.$db->quote($identifier, 'text').' AND '. |
|
136 | 136 | 'active = 1 '); |
137 | 137 | |
138 | 138 | if (PEAR::isError($result)) { |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | return false; |
168 | 168 | } |
169 | 169 | |
170 | - $result = $this->db->exec('UPDATE module_package_action SET active = 0 WHERE ' . |
|
171 | - 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' AND ' . |
|
170 | + $result = $this->db->exec('UPDATE module_package_action SET active = 0 WHERE '. |
|
171 | + 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' AND '. |
|
172 | 172 | 'id = '.$this->db->quote($this->id, 'integer')); |
173 | 173 | |
174 | 174 | if (PEAR::isError($result)) { |