Completed
Branch master (6ed6e7)
by Lars
07:57
created
src/Intraface/modules/accounting/Controller/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     {
20 20
         $this->document->setTitle('Accounting settings');
21 21
     
22
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/settings');
22
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/settings');
23 23
         return $smarty->render($this);
24 24
     }
25 25
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             $gateway = new Intraface_modules_accounting_YearGateway($this->getKernel());
24 24
 
25 25
             if ($year = $gateway->findByVoucherId($this->query('voucher_id'))) {
26
-                return new k_SeeOther($this->url('../year/' . $year->get('id') . '/voucher/' . $this->query('voucher_id')));
26
+                return new k_SeeOther($this->url('../year/'.$year->get('id').'/voucher/'.$this->query('voucher_id')));
27 27
             }
28 28
             throw new k_PageNotFound();
29 29
         } elseif ($this->query('search')) {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                         case 'bilag':
51 51
                             // fall through
52 52
                         case 'voucher':
53
-                            $this->db_sql->query("SELECT * FROM accounting_voucher WHERE number >= " . $search_real[0] . " AND number <= " . $search_real[1] . " AND intranet_id = " . $year->kernel->intranet->get('id') . " AND year_id = " . $year->get('id'));
53
+                            $this->db_sql->query("SELECT * FROM accounting_voucher WHERE number >= ".$search_real[0]." AND number <= ".$search_real[1]." AND intranet_id = ".$year->kernel->intranet->get('id')." AND year_id = ".$year->get('id'));
54 54
                             //$i++;
55 55
                             $posts = array();
56 56
                             while ($this->db_sql->nextRecord()) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             }
68 68
         }
69 69
 
70
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/search');
70
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/search');
71 71
         return $tpl->render($this, array('error' => $error, 'posts' => $posts));
72 72
     }
73 73
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Post/Show.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $values['debet'] = $post->get('debet');
34 34
         $values['credit'] = $post->get('credit');
35 35
         $account = new Account($this->getYear());
36
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/post/edit');
36
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/post/edit');
37 37
         return $smarty->render($this, array('post' => $post, 'account' => $account));
38 38
     }
39 39
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Post/Index.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     protected function map($name)
12 12
     {
13 13
         if (is_numeric($name)) {
14
-        	return 'Intraface_modules_accounting_Controller_Post_Show';
14
+            return 'Intraface_modules_accounting_Controller_Post_Show';
15 15
         }
16 16
     }
17 17
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     function renderHtml()
19 19
     {
20
-        return '<h1>Poster</h1><p><a href="'.$this->url(null . '.xls').'">Excel</a></p>';
20
+        return '<h1>Poster</h1><p><a href="'.$this->url(null.'.xls').'">Excel</a></p>';
21 21
     }
22 22
 
23 23
     function renderHtmlCreate()
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $values['date'] = $post->voucher->get('date_dk');
27 27
 
28 28
         $account = new Account($this->getYear());
29
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/post/edit');
29
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/post/edit');
30 30
         return $smarty->render($this, array('post' => $post, 'account' => $account));
31 31
     }
32 32
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         $year->checkYear();
69 69
 
70 70
         $db = new DB_Sql;
71
-        $db->query("SELECT * FROM accounting_voucher WHERE intranet_id = " . $year->kernel->intranet->get('id') . " AND year_id = " . $year->get('id') . " ORDER BY number ASC");
71
+        $db->query("SELECT * FROM accounting_voucher WHERE intranet_id = ".$year->kernel->intranet->get('id')." AND year_id = ".$year->get('id')." ORDER BY number ASC");
72 72
         //$i++;
73 73
         $posts = array();
74 74
         while ($db->nextRecord()) {
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
         $workbook->setVersion(8);
82 82
 
83 83
         // sending HTTP headers
84
-        $workbook->send($this->getKernel()->intranet->get('name') . ' - poster ' . $year->get('label'));
84
+        $workbook->send($this->getKernel()->intranet->get('name').' - poster '.$year->get('label'));
85 85
 
86 86
         // Creating a worksheet
87
-        $worksheet = $workbook->addWorksheet('Konti ' . $year->get('label'));
87
+        $worksheet = $workbook->addWorksheet('Konti '.$year->get('label'));
88 88
         $worksheet->setInputEncoding('UTF-8');
89 89
 
90 90
         $format_bold = $workbook->addFormat();
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Voucher/Show.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -89,22 +89,22 @@
 block discarded – undo
89 89
             $this->getVoucher()->stateVoucher();
90 90
             return new k_SeeOther($this->url());
91 91
         } elseif ($this->body('action') == 'counter_entry') {
92
-        	$posts = $this->getVoucher()->getPosts();
92
+            $posts = $this->getVoucher()->getPosts();
93 93
 
94
-        	foreach ($posts as $post) {
95
-        		if (is_array($_POST['selected']) && in_array($post['id'], $_POST['selected'])) {
96
-        			$new_post = new Post($this->getVoucher());
97
-        			$new_post->save($post['date'], $post['account_id'], $post['text'].' - '.$this->t('counter entry'), $post['credit'], $post['debet']);
98
-        		}
99
-        	}
94
+            foreach ($posts as $post) {
95
+                if (is_array($_POST['selected']) && in_array($post['id'], $_POST['selected'])) {
96
+                    $new_post = new Post($this->getVoucher());
97
+                    $new_post->save($post['date'], $post['account_id'], $post['text'].' - '.$this->t('counter entry'), $post['credit'], $post['debet']);
98
+                }
99
+            }
100 100
 
101
-        	return new k_SeeOther($this->url());
101
+            return new k_SeeOther($this->url());
102 102
         }
103 103
 
104
-    	if ($this->getVoucher()->save($_POST)) {
105
-    	    return new k_SeeOther($this->url(null));
106
-    	}
107
-    	return $this->render();
104
+        if ($this->getVoucher()->save($_POST)) {
105
+            return new k_SeeOther($this->url(null));
106
+        }
107
+        return $this->render();
108 108
     }
109 109
 
110 110
     function appendFile($selected_file_id)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,13 +44,13 @@
 block discarded – undo
44 44
         $voucher_file = new VoucherFile($this->getVoucher());
45 45
         $voucher_files = $voucher_file->getList();
46 46
 
47
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/voucher/show');
47
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/voucher/show');
48 48
         return $smarty->render($this);
49 49
     }
50 50
 
51 51
     function renderHtmlEdit()
52 52
     {
53
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/voucher/edit');
53
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/voucher/edit');
54 54
         return $smarty->render($this);
55 55
     }
56 56
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Voucher/Index.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
         if ($name == 'create') {
16 16
             return 'Intraface_modules_accounting_Controller_Voucher_Edit';
17 17
         } elseif (is_numeric($name)) {
18
-        	return 'Intraface_modules_accounting_Controller_Voucher_Show';
18
+            return 'Intraface_modules_accounting_Controller_Voucher_Show';
19 19
         } elseif ($name == 'popup') {
20
-        	return 'Intraface_modules_accounting_Controller_Voucher_Popup';
20
+            return 'Intraface_modules_accounting_Controller_Voucher_Popup';
21 21
         }
22 22
     }
23 23
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 
24 24
     function renderHtml()
25 25
     {
26
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/voucher/index');
26
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/voucher/index');
27 27
         return $smarty->render($this);
28 28
     }
29 29
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $year = $this->getYear();
33 33
 
34
-        $this->db_sql->query("SELECT * FROM accounting_voucher WHERE intranet_id = " . $year->kernel->intranet->get('id') . " AND year_id = " . $year->get('id') . " ORDER BY number ASC");
34
+        $this->db_sql->query("SELECT * FROM accounting_voucher WHERE intranet_id = ".$year->kernel->intranet->get('id')." AND year_id = ".$year->get('id')." ORDER BY number ASC");
35 35
         //$i++;
36 36
         $posts = array();
37 37
         while ($this->db_sql->nextRecord()) {
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
         $workbook->setVersion(8);
45 45
 
46 46
         // sending HTTP headers
47
-        $workbook->send($this->getKernel()->intranet->get('name') . ' - poster ' . $year->get('label'));
47
+        $workbook->send($this->getKernel()->intranet->get('name').' - poster '.$year->get('label'));
48 48
 
49 49
         // Creating a worksheet
50
-        $worksheet = $workbook->addWorksheet('Konti ' . $year->get('label'));
50
+        $worksheet = $workbook->addWorksheet('Konti '.$year->get('label'));
51 51
         $worksheet->setInputEncoding('UTF-8');
52 52
 
53 53
         $format_bold = $workbook->addFormat();
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/Controller/Daybook.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
         if (!$this->getAccount()->anyAccounts()) {
56 56
             $tpl = $this->template->create('Intraface/Controller/templates/message');
57 57
             return $tpl->render($this, array(
58
-            	'type' => 'dependent',
59
-            	'content' => 'Du skal først oprette nogle konti, inden du kan taste poster ind i regnskabet. Du kan oprette en standardkontoplan under <a href="' .  $this->url('../year/' . $this->getYear()->get('id')) . '">regnskabsåret</a>.'));
58
+                'type' => 'dependent',
59
+                'content' => 'Du skal først oprette nogle konti, inden du kan taste poster ind i regnskabet. Du kan oprette en standardkontoplan under <a href="' .  $this->url('../year/' . $this->getYear()->get('id')) . '">regnskabsåret</a>.'));
60 60
         } elseif ($this->getYear()->get('vat') == 1 AND !$this->getYear()->vatAccountIsSet()) {
61 61
             $tpl = $this->template->create('Intraface/Controller/templates/message');
62 62
             return $tpl->render($this, array(
63
-            	'type' => 'dependent',
64
-            	'content' => 'Du har ikke sat momskonti. <a href="' . $this->url('../settings') . '">Gå til indstillingerne</a>.'));
63
+                'type' => 'dependent',
64
+                'content' => 'Du har ikke sat momskonti. <a href="' . $this->url('../settings') . '">Gå til indstillingerne</a>.'));
65 65
         }
66 66
 
67 67
         // the view to use
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
         // outputting the entire page
103 103
         $tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook');
104 104
         return $tpl->render($this, array(
105
-        	'cheatsheet' => $cheatsheet,
106
-        	'message' => $message,
107
-        	'draft' => $draft,
108
-        	'view' => $view_tpl->render($this)));
105
+            'cheatsheet' => $cheatsheet,
106
+            'message' => $message,
107
+            'draft' => $draft,
108
+            'view' => $view_tpl->render($this)));
109 109
     }
110 110
 
111 111
     function postForm()
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     {
146 146
         $this->getKernel()->useModule('accounting');
147 147
         if (is_object($this->voucher)) {
148
-    	    return $this->voucher;
149
-    	}
148
+            return $this->voucher;
149
+        }
150 150
         return ($this->voucher = Voucher::factory($this->getYear(), $voucher_number));
151 151
     }
152 152
 
@@ -164,20 +164,20 @@  discard block
 block discarded – undo
164 164
         $values['reference'] = '';
165 165
         $values['id'] = '';
166 166
 
167
-    	return $values;
167
+        return $values;
168 168
     }
169 169
 
170 170
     function getAccount()
171 171
     {
172 172
         require_once 'Intraface/modules/accounting/Account.php';
173
-    	return new Account($this->getYear());
173
+        return new Account($this->getYear());
174 174
     }
175 175
 
176 176
     function getPost()
177 177
     {
178
-    	if (is_object($this->post)) {
179
-    	    return $this->post;
180
-    	}
178
+        if (is_object($this->post)) {
179
+            return $this->post;
180
+        }
181 181
         return ($this->post = new Post($this->getVoucher()));
182 182
     }
183 183
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -56,26 +56,26 @@  discard block
 block discarded – undo
56 56
             $tpl = $this->template->create('Intraface/Controller/templates/message');
57 57
             return $tpl->render($this, array(
58 58
             	'type' => 'dependent',
59
-            	'content' => 'Du skal først oprette nogle konti, inden du kan taste poster ind i regnskabet. Du kan oprette en standardkontoplan under <a href="' .  $this->url('../year/' . $this->getYear()->get('id')) . '">regnskabsåret</a>.'));
59
+            	'content' => 'Du skal først oprette nogle konti, inden du kan taste poster ind i regnskabet. Du kan oprette en standardkontoplan under <a href="'.$this->url('../year/'.$this->getYear()->get('id')).'">regnskabsåret</a>.'));
60 60
         } elseif ($this->getYear()->get('vat') == 1 AND !$this->getYear()->vatAccountIsSet()) {
61 61
             $tpl = $this->template->create('Intraface/Controller/templates/message');
62 62
             return $tpl->render($this, array(
63 63
             	'type' => 'dependent',
64
-            	'content' => 'Du har ikke sat momskonti. <a href="' . $this->url('../settings') . '">Gå til indstillingerne</a>.'));
64
+            	'content' => 'Du har ikke sat momskonti. <a href="'.$this->url('../settings').'">Gå til indstillingerne</a>.'));
65 65
         }
66 66
 
67 67
         // the view to use
68 68
         $available_views = array('expenses', 'income', 'debtor');
69 69
 
70 70
         if (in_array($this->query('view'), $available_views)) {
71
-            $view_tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook/' . $this->query('view'));
71
+            $view_tpl = $this->template->create(dirname(__FILE__).'/templates/daybook/'.$this->query('view'));
72 72
         } else {
73
-            $view_tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook/default');
73
+            $view_tpl = $this->template->create(dirname(__FILE__).'/templates/daybook/default');
74 74
         }
75 75
 
76 76
         // posts in draft
77 77
         if (count($this->getPostsInDraft()) > 0) {
78
-            $draft_tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook/posts');
78
+            $draft_tpl = $this->template->create(dirname(__FILE__).'/templates/daybook/posts');
79 79
             $draft = $draft_tpl->render($this);
80 80
         } else {
81 81
             $draft = '<p>Der er ikke nogen poster i kassekladden.</p>';
@@ -83,24 +83,24 @@  discard block
 block discarded – undo
83 83
 
84 84
         // initial message
85 85
         if ($this->getKernel()->getSetting()->get('user', 'accounting.daybook.message') == 'view') {
86
-            $msg_tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook/message');
86
+            $msg_tpl = $this->template->create(dirname(__FILE__).'/templates/daybook/message');
87 87
             $message = $msg_tpl->render($this);
88 88
         } else {
89 89
             $message = '';
90 90
         }
91 91
 
92 92
         // cheatsheet
93
-        if ($this->getKernel()->getSetting()->get('user', 'accounting.daybook_cheatsheet')== 'true') {
94
-            $cheat_tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook/cheatsheet');
93
+        if ($this->getKernel()->getSetting()->get('user', 'accounting.daybook_cheatsheet') == 'true') {
94
+            $cheat_tpl = $this->template->create(dirname(__FILE__).'/templates/daybook/cheatsheet');
95 95
             $cheatsheet = $cheat_tpl->render($this);
96 96
         } else {
97 97
             $cheatsheet = '<ul class="options">
98
-    			<li><a href="' . $this->url(null, array('quickhelp' => 'true')) . '">Slå hurtighjælp til</a></li>
98
+    			<li><a href="' . $this->url(null, array('quickhelp' => 'true')).'">Slå hurtighjælp til</a></li>
99 99
     			</ul>';
100 100
         }
101 101
 
102 102
         // outputting the entire page
103
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/daybook');
103
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/daybook');
104 104
         return $tpl->render($this, array(
105 105
         	'cheatsheet' => $cheatsheet,
106 106
         	'message' => $message,
Please login to merge, or discard this patch.
src/Intraface/modules/webshop/BasketEvaluation.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
  */
24 24
 class BasketEvaluation extends Intraface_Standard
25 25
 {
26
-     public $kernel;
27
-     public $error;
28
-     private $db;
29
-     private $id;
30
-     private $values;
31
-     private $settings;
26
+        public $kernel;
27
+        public $error;
28
+        private $db;
29
+        private $id;
30
+        private $values;
31
+        private $settings;
32 32
 
33 33
     /**
34 34
      * Constructor
@@ -153,15 +153,15 @@  discard block
 block discarded – undo
153 153
         }
154 154
 
155 155
         $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", " .
156
-                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
157
-                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
158
-                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
159
-                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
160
-                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
161
-                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
162
-                 "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
163
-                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
164
-                 "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
156
+                    "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
157
+                    "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
158
+                    "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
159
+                    "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
160
+                    "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
161
+                    "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
162
+                    "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
163
+                    "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
164
+                    "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
165 165
 
166 166
         if ($this->id != 0) {
167 167
             $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND id = ".$this->id);
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             die($this->db->getMessage());
56 56
         }
57 57
 
58
-        $this->value['settings'] = array (
58
+        $this->value['settings'] = array(
59 59
             'evaluate_target' => array(
60 60
                 0 => 'price',
61 61
                 1 => 'weight',
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->db->quote($this->kernel->intranet->get('id'), 'integer')." AND id = ".$this->db->quote($this->id, 'integer'));
95 95
 
96 96
         if (PEAR::isError($result)) {
97
-            throw new Exception($result->getMessage() . $result->getUserInfo());
97
+            throw new Exception($result->getMessage().$result->getUserInfo());
98 98
         }
99 99
 
100 100
         if ($result->numRows() == 0) {
@@ -152,22 +152,22 @@  discard block
 block discarded – undo
152 152
             return false;
153 153
         }
154 154
 
155
-        $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", " .
156
-                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", " .
157
-                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", " .
158
-                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", " .
159
-                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", " .
160
-                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", " .
161
-                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", " .
162
-                 "action_value = ".$this->db->quote($input['action_value'], 'text').", " .
163
-                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", " .
155
+        $sql = "running_index = ".$this->db->quote($input['running_index'], 'integer').", ".
156
+                 "evaluate_target_key = ".$this->db->quote($input['evaluate_target_key'], 'integer').", ".
157
+                 "evaluate_method_key = ".$this->db->quote($input['evaluate_method_key'], 'integer').", ".
158
+                 "evaluate_value = ".$this->db->quote($input['evaluate_value'], 'text').", ".
159
+                 "evaluate_value_case_sensitive = ".$this->db->quote($input['evaluate_value_case_sensitive'], 'integer').", ".
160
+                 "go_to_index_after = ".$this->db->quote($input['go_to_index_after'], 'integer').", ".
161
+                 "action_action_key = ".$this->db->quote($input['action_action_key'], 'integer').", ".
162
+                 "action_value = ".$this->db->quote($input['action_value'], 'text').", ".
163
+                 "action_quantity = ".$this->db->quote($input['action_quantity'], 'integer').", ".
164 164
                  "action_unit_key = ".$this->db->quote($input['action_unit_key'], 'integer');
165 165
 
166 166
         if ($this->id != 0) {
167 167
             $result = $this->db->exec("UPDATE webshop_basket_evaluation SET ".$sql." WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND id = ".$this->id);
168 168
 
169 169
             if (PEAR::isError($result)) {
170
-                throw new Exception($result->getMessage() . $result->getUserInfo());
170
+                throw new Exception($result->getMessage().$result->getUserInfo());
171 171
                 return false;
172 172
             }
173 173
 
@@ -175,13 +175,13 @@  discard block
 block discarded – undo
175 175
             $result = $this->db->query("INSERT INTO webshop_basket_evaluation SET ".$sql.", intranet_id = ".$this->kernel->intranet->get('id').", id = ".$this->id);
176 176
 
177 177
             if (PEAR::isError($result)) {
178
-                throw new Exception($result->getMessage() . $result->getUserInfo());
178
+                throw new Exception($result->getMessage().$result->getUserInfo());
179 179
                 return false;
180 180
             }
181 181
 
182 182
             $this->id = $this->db->lastInsertID();
183 183
             if (PEAR::isError($this->id)) {
184
-                throw new Exception($result->getMessage() . $result->getUserInfo());
184
+                throw new Exception($result->getMessage().$result->getUserInfo());
185 185
             }
186 186
         }
187 187
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     {
198 198
         $result = $this->db->exec("UPDATE webshop_basket_evaluation SET active = 0 WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND id = ".$this->id);
199 199
         if (PEAR::isError($result)) {
200
-            throw new Exception($result->getMessage() . $result->getUserInfo());
200
+            throw new Exception($result->getMessage().$result->getUserInfo());
201 201
             return false;
202 202
         }
203 203
         return true;
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         $result = $this->db->query("SELECT * FROM webshop_basket_evaluation WHERE active = 1 AND intranet_id = ".$this->kernel->intranet->get('id').' ORDER BY running_index');
214 214
 
215 215
         if (PEAR::isError($this->id)) {
216
-            throw new Exception($result->getMessage() . $result->getUserInfo());
216
+            throw new Exception($result->getMessage().$result->getUserInfo());
217 217
         }
218 218
 
219 219
         $i = 0;
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
             $evaluation_result = false;
257 257
 
258
-            switch($evaluation['evaluate_target']) {
258
+            switch ($evaluation['evaluate_target']) {
259 259
                 case 'price':
260 260
                     $evaluate = (double)$basket->getTotalPrice();
261 261
                     settype($evaluation['evaluate_value'], 'double');
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
                     return false;
296 296
             }
297 297
 
298
-            switch($evaluation['evaluate_method']) {
298
+            switch ($evaluation['evaluate_method']) {
299 299
                 case 'equals':
300 300
                     if ($evaluate == $evaluation['evaluate_value']) {
301 301
                         $evaluation_result = true;
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
             if ($evaluation_result) {
325 325
                 $go_to_index = $evaluation['go_to_index_after'];
326 326
 
327
-                switch($evaluation['action_unit']) {
327
+                switch ($evaluation['action_unit']) {
328 328
                     case 'pieces':
329 329
                         $quantity = $evaluation['action_quantity'];
330 330
                         break;
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
                         return false;
340 340
                 }
341 341
 
342
-                switch($evaluation['action_action']) {
342
+                switch ($evaluation['action_action']) {
343 343
                     case 'no_action':
344 344
                         // fine nothing is done
345 345
                         break;
Please login to merge, or discard this patch.
src/Intraface/modules/backup/Controller/Index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
     function renderHtml()
12 12
     {
13
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/index');
13
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/index');
14 14
         return $tpl->render($this);
15 15
     }
16 16
 
Please login to merge, or discard this patch.