Completed
Pull Request — master (#26)
by Lars
10:03
created
src/Intraface/modules/onlinepayment/Controller/templates/index.tpl.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                         case "invoice":
83 83
                             if ($kernel->user->hasModuleAccess('invoice')) {
84 84
                                 $debtor_module = $kernel->useModule('debtor');
85
-                                print("<a href=\"".$debtor_module->getPath().$payment['belong_to'] . '/list/' . $payment['belong_to_id']."\">Faktura</a>");
85
+                                print("<a href=\"".$debtor_module->getPath().$payment['belong_to'].'/list/'.$payment['belong_to_id']."\">Faktura</a>");
86 86
                             } else {
87 87
                                 e("Faktura");
88 88
                             }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                         case "order":
91 91
                             if ($kernel->user->hasModuleAccess('order')) {
92 92
                                 $debtor_module = $kernel->useModule('debtor');
93
-                                print("<a href=\"".$debtor_module->getPath().$payment['belong_to'] . '/list/' . $payment['belong_to_id']."\">Ordre</a>");
93
+                                print("<a href=\"".$debtor_module->getPath().$payment['belong_to'].'/list/'.$payment['belong_to_id']."\">Ordre</a>");
94 94
                             } else {
95 95
                                 e("Ordre");
96 96
                             }
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,11 +11,14 @@
 block discarded – undo
11 11
 
12 12
 <?php elseif (!$onlinepayment->isFilledIn()) : ?>
13 13
     <p>Der er ikke oprettet nogen betalinger.</p>
14
-<?php else : ?>
14
+<?php else {
15
+    : ?>
15 16
 
16 17
 
17 18
 <fieldset class="hide_on_print">
18
-    <legend><?php e(t('Search')); ?></legend>
19
+    <legend><?php e(t('Search'));
20
+}
21
+?></legend>
19 22
     <form method="get" action="<?php e(url(null)); ?>">
20 23
         <label><?php e(t('Text')); ?>
21 24
             <input type="text" name="text" value="<?php e($onlinepayment->getDBQuery()->getFilter("text")); ?>" />
Please login to merge, or discard this patch.
src/Intraface/modules/onlinepayment/Controller/ChooseProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         $onlinepayment_module = $this->context->getKernel()->module('onlinepayment');
19 19
         $onlinepayment = OnlinePayment::factory($this->context->getKernel());
20 20
         $value = $onlinepayment->getProvider();
21
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/chooseprovider');
21
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/chooseprovider');
22 22
         return $smarty->render($this, array('value' => $value));
23 23
     }
24 24
 
Please login to merge, or discard this patch.
modules/intranetmaintenance/Controller/templates/intranet/show.tpl.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 $address_value = $context->getValues();
4 4
 ?>
5 5
 <?php if (!empty($contact_error)) : ?>
6
-<?php echo $contact_error;?>
6
+<?php echo $contact_error; ?>
7 7
 <?php else : ?>
8 8
 <div id="colOne">
9 9
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 </ul>
16 16
 
17 17
 <?php if ($context->query('flare')) : ?>
18
- <p class="message"><?php e(t($context->query('flare')));?></p>
18
+ <p class="message"><?php e(t($context->query('flare'))); ?></p>
19 19
 <?php endif; ?>
20 20
 
21 21
 <?php echo $context->getIntranet()->error->view(); ?>
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             <?php if (!empty($value['contact_id']) and $context->getIntranet()->get('id') > 0 && isset($contact_module)) : ?>
34 34
                 <?php
35 35
                     $contact = new Contact($context->getKernel(), $value['contact_id']);
36
-                    echo '<a href="'.$contact_module->getPath() . $contact->get('id').'">'.$contact->get('name').'</a>';
36
+                    echo '<a href="'.$contact_module->getPath().$contact->get('id').'">'.$contact->get('name').'</a>';
37 37
                     echo ' <a href="'.url(null, array('add_contact'=>1)).'">'.t('change contact').'</a>';
38 38
                 ?>
39 39
             <?php elseif (isset($contact_module)) : ?>
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
                 $user_list['name'] = '[not filled in]';
242 242
             }
243 243
             ?>
244
-            <td><a href="<?php e(url('../../user/'. $user_list['id'], array('intranet_id' => $context->getIntranet()->get('id')))); ?>"><?php e($user_list['name']); ?></a></td>
244
+            <td><a href="<?php e(url('../../user/'.$user_list['id'], array('intranet_id' => $context->getIntranet()->get('id')))); ?>"><?php e($user_list['name']); ?></a></td>
245 245
             <td><?php e($user_list['email']); ?></td>
246 246
         </tr>
247 247
     <?php } ?>
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,10 +4,13 @@  discard block
 block discarded – undo
4 4
 ?>
5 5
 <?php if (!empty($contact_error)) : ?>
6 6
 <?php echo $contact_error;?>
7
-<?php else : ?>
7
+<?php else {
8
+    : ?>
8 9
 <div id="colOne">
9 10
 
10
-<h1><?php e(t('Intranet')); ?>: <?php e($context->getIntranet()->get('name')); ?></h1>
11
+<h1><?php e(t('Intranet'));
12
+}
13
+?>: <?php e($context->getIntranet()->get('name')); ?></h1>
11 14
 
12 15
 <ul class="options">
13 16
     <li><a href="<?php e(url(null, array('edit'))); ?>"><?php e(t('edit')); ?></a></li>
@@ -160,10 +163,12 @@  discard block
 block discarded – undo
160 163
     <legend>Tilføj modulpakke</legend>
161 164
     <?php if (!$context->getKernel()->intranet->hasModuleAccess('shop')) : ?>
162 165
         This intranet needs to have access to shop for modulepackage to work!
163
-    <?php else : ?>
166
+    <?php else {
167
+    : ?>
164 168
 
165 169
         <?php
166 170
         $modulepackage = new Intraface_modules_modulepackage_ModulePackage;
171
+}
167 172
         $modulepackage->getDBQuery($context->getKernel());
168 173
         $packages = $modulepackage->getList();
169 174
         ?>
Please login to merge, or discard this patch.
modules/intranetmaintenance/Controller/templates/intranet/index.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 <ul class="options">
4 4
     <li><a href="<?php e(url('../')); ?>"><?php e(t('Close')); ?></a></li>
5
-    <li><a href="<?php e(url(null) . '?new'); ?>"><?php e(t('create')); ?></a></li>
5
+    <li><a href="<?php e(url(null).'?new'); ?>"><?php e(t('create')); ?></a></li>
6 6
     <li><a href="<?php e(url('../user')); ?>"><?php e(t('users')); ?></a></li>
7 7
 </ul>
8 8
 
Please login to merge, or discard this patch.
modules/intranetmaintenance/Controller/templates/user/show.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
     <tbody>
142 142
     <?php foreach ($context->getIntranets() as $intranet_value) { ?>
143 143
         <tr>
144
-            <td><a href="<?php e(url('../../intranet/' . $intranet_value['id'])); ?>"><?php e($intranet_value['name']); ?></a></td>
144
+            <td><a href="<?php e(url('../../intranet/'.$intranet_value['id'])); ?>"><?php e($intranet_value['name']); ?></a></td>
145 145
             <td><a href="<?php e(url(null, array('intranet_id' => $intranet_value['id']))); ?>"><?php e(t('Show contact information')); ?></a></td>
146 146
         </tr>
147 147
         <?php } ?>
Please login to merge, or discard this patch.
modules/intranetmaintenance/Controller/templates/user/index.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
                 $user["name"] = '['.t('not filled in').']';
46 46
             }
47 47
             ?>
48
-            <td><img style="border: none;" src="<?php e('http://www.gravatar.com/avatar/'.md5($user['email']).'?s=20&d=&d='.NET_SCHEME . NET_HOST . url('/images/icons/gravatar.png')); ?>" height="20" width="20" /></td>
48
+            <td><img style="border: none;" src="<?php e('http://www.gravatar.com/avatar/'.md5($user['email']).'?s=20&d=&d='.NET_SCHEME.NET_HOST.url('/images/icons/gravatar.png')); ?>" height="20" width="20" /></td>
49 49
             <td><a href="<?php e(url($user["id"])); ?>"><?php e($user["name"]); ?></a></td>
50 50
             <td><?php e($user["email"]); ?></td>
51 51
             <td class="buttons">
Please login to merge, or discard this patch.
src/Intraface/modules/intranetmaintenance/Controller/User/Index.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         if (!is_null($this->redirect)) {
82 82
             return $this->redirect;
83 83
         }
84
-         return $this->redirect = Intraface_Redirect::factory($this->getKernel(), 'receive');
84
+            return $this->redirect = Intraface_Redirect::factory($this->getKernel(), 'receive');
85 85
     }
86 86
 
87 87
     function isAddUserTrue()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@
 block discarded – undo
29 29
             return new k_SeeOther($this->getRedirect()->getRedirect($this->url(null)));
30 30
         }
31 31
 
32
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/user/index');
32
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/user/index');
33 33
         return $smarty->render($this);
34 34
     }
35 35
 
36 36
     function renderHtmlCreate()
37 37
     {
38
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/user/edit');
38
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/user/edit');
39 39
         return $smarty->render($this);
40 40
     }
41 41
 
Please login to merge, or discard this patch.
src/Intraface/modules/intranetmaintenance/Controller/Intranet/Key.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
         $modul = $this->getKernel()->module("intranetmaintenance");
15 15
         $translation = $this->getKernel()->getTranslation('intranetmaintenance');
16 16
 
17
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/intranet/edit');
17
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/intranet/edit');
18 18
         return $smarty->render($this);
19 19
     }
20 20
 
Please login to merge, or discard this patch.
src/Intraface/modules/intranetmaintenance/Controller/Intranet/Show.php 2 patches
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 $contact_module = $this->getKernel()->useModule('contact');
49 49
 
50 50
                 $redirect = Intraface_Redirect::factory($kernel, 'go');
51
-                $url = $redirect->setDestination($contact_module->getPath()."select_contact", NET_SCHEME . NET_HOST . $this->url());
51
+                $url = $redirect->setDestination($contact_module->getPath()."select_contact", NET_SCHEME.NET_HOST.$this->url());
52 52
                 $redirect->askParameter('contact_id');
53 53
                 $redirect->setIdentifier('contact');
54 54
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         // add existing user
62 62
         if ($this->query('add_user') == 1) {
63 63
             $redirect = Intraface_Redirect::factory($this->getKernel(), 'go');
64
-            $url = $redirect->setDestination(NET_SCHEME . NET_HOST . $this->url('../../user'), NET_SCHEME . NET_HOST . $this->url(null));
64
+            $url = $redirect->setDestination(NET_SCHEME.NET_HOST.$this->url('../../user'), NET_SCHEME.NET_HOST.$this->url(null));
65 65
             $redirect->askParameter('user_id');
66 66
             $redirect->setIdentifier('add_user');
67 67
             return new k_SeeOther($url);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 $user = new UserMaintenance($redirect->getParameter('user_id'));
78 78
                 $user->setIntranetAccess($intranet->get('id'));
79 79
                 $user_id = $user->get('id');
80
-                return new k_SeeOther($this->url('../../user/' . $user->get('id'), array('intranet_id' => $this->name())));
80
+                return new k_SeeOther($this->url('../../user/'.$user->get('id'), array('intranet_id' => $this->name())));
81 81
             }
82 82
         }
83 83
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $gateway = new Intraface_ModuleGateway($this->mdb2);
93 93
         $modules = $gateway->getList();
94 94
 
95
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/intranet/show');
95
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/intranet/show');
96 96
         return $smarty->render($this, array('modules' => $modules));
97 97
     }
98 98
 
@@ -103,13 +103,13 @@  discard block
 block discarded – undo
103 103
         $modul = $this->getKernel()->module("intranetmaintenance");
104 104
         $translation = $this->getKernel()->getTranslation('intranetmaintenance');
105 105
 
106
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/intranet/edit');
106
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/intranet/edit');
107 107
         return $smarty->render($this);
108 108
     }
109 109
 
110 110
     function renderHtmlDelete()
111 111
     {
112
-        $smarty = $this->template->create(dirname(__FILE__) . '/../templates/intranet/delete');
112
+        $smarty = $this->template->create(dirname(__FILE__).'/../templates/intranet/delete');
113 113
         return $smarty->render($this);
114 114
     }
115 115
 
@@ -141,70 +141,70 @@  discard block
 block discarded – undo
141 141
             throw new Exception('Du kan kun slette bambus beta og bambus - sune og lars');
142 142
         }
143 143
 
144
-        $db->query("DELETE FROM accounting_account WHERE intranet_id = " . $intranet_id);
145
-        $db->query("DELETE FROM accounting_post WHERE intranet_id = " . $intranet_id);
146
-        $db->query("DELETE FROM accounting_vat_period WHERE intranet_id = " . $intranet_id);
147
-        $db->query("DELETE FROM accounting_voucher WHERE intranet_id = " . $intranet_id);
148
-        $db->query("DELETE FROM accounting_voucher_file WHERE intranet_id = " . $intranet_id);
149
-        $db->query("DELETE FROM accounting_year WHERE intranet_id = " . $intranet_id);
150
-        $db->query("DELETE FROM accounting_year_end WHERE intranet_id = " . $intranet_id);
151
-        $db->query("DELETE FROM accounting_year_end_action WHERE intranet_id = " . $intranet_id);
144
+        $db->query("DELETE FROM accounting_account WHERE intranet_id = ".$intranet_id);
145
+        $db->query("DELETE FROM accounting_post WHERE intranet_id = ".$intranet_id);
146
+        $db->query("DELETE FROM accounting_vat_period WHERE intranet_id = ".$intranet_id);
147
+        $db->query("DELETE FROM accounting_voucher WHERE intranet_id = ".$intranet_id);
148
+        $db->query("DELETE FROM accounting_voucher_file WHERE intranet_id = ".$intranet_id);
149
+        $db->query("DELETE FROM accounting_year WHERE intranet_id = ".$intranet_id);
150
+        $db->query("DELETE FROM accounting_year_end WHERE intranet_id = ".$intranet_id);
151
+        $db->query("DELETE FROM accounting_year_end_action WHERE intranet_id = ".$intranet_id);
152 152
 
153 153
         // her skulle vi slette noget address
154 154
 
155
-        $db->query("DELETE FROM contact WHERE intranet_id = " . $intranet_id);
156
-        $db->query("DELETE FROM contact_person WHERE intranet_id = " . $intranet_id);
157
-        $db->query("DELETE FROM contact_message WHERE intranet_id  = " . $intranet_id);
155
+        $db->query("DELETE FROM contact WHERE intranet_id = ".$intranet_id);
156
+        $db->query("DELETE FROM contact_person WHERE intranet_id = ".$intranet_id);
157
+        $db->query("DELETE FROM contact_message WHERE intranet_id  = ".$intranet_id);
158 158
 
159
-        $db->query("DELETE FROM cms_element WHERE intranet_id = " . $intranet_id);
160
-        $db->query("DELETE FROM cms_page WHERE intranet_id = " . $intranet_id);
161
-        $db->query("DELETE FROM cms_parameter WHERE intranet_id = " . $intranet_id);
162
-        $db->query("DELETE FROM cms_section WHERE intranet_id = " . $intranet_id);
163
-        $db->query("DELETE FROM cms_site WHERE intranet_id = " . $intranet_id);
164
-        $db->query("DELETE FROM cms_template WHERE intranet_id = " . $intranet_id);
165
-        $db->query("DELETE FROM cms_template_section WHERE intranet_id = " . $intranet_id);
159
+        $db->query("DELETE FROM cms_element WHERE intranet_id = ".$intranet_id);
160
+        $db->query("DELETE FROM cms_page WHERE intranet_id = ".$intranet_id);
161
+        $db->query("DELETE FROM cms_parameter WHERE intranet_id = ".$intranet_id);
162
+        $db->query("DELETE FROM cms_section WHERE intranet_id = ".$intranet_id);
163
+        $db->query("DELETE FROM cms_site WHERE intranet_id = ".$intranet_id);
164
+        $db->query("DELETE FROM cms_template WHERE intranet_id = ".$intranet_id);
165
+        $db->query("DELETE FROM cms_template_section WHERE intranet_id = ".$intranet_id);
166 166
 
167
-        $db->query("DELETE FROM comment WHERE intranet_id = " . $intranet_id);
167
+        $db->query("DELETE FROM comment WHERE intranet_id = ".$intranet_id);
168 168
 
169
-        $db->query("DELETE FROM debtor WHERE intranet_id = " . $intranet_id);
170
-        $db->query("DELETE FROM debtor_item WHERE intranet_id = " . $intranet_id);
169
+        $db->query("DELETE FROM debtor WHERE intranet_id = ".$intranet_id);
170
+        $db->query("DELETE FROM debtor_item WHERE intranet_id = ".$intranet_id);
171 171
 
172
-        $db->query("DELETE FROM email WHERE intranet_id = " . $intranet_id);
173
-        $db->query("DELETE FROM email_attachment WHERE intranet_id = " . $intranet_id);
172
+        $db->query("DELETE FROM email WHERE intranet_id = ".$intranet_id);
173
+        $db->query("DELETE FROM email_attachment WHERE intranet_id = ".$intranet_id);
174 174
 
175
-        $db->query("DELETE FROM file_handler WHERE intranet_id = " . $intranet_id);
176
-        $db->query("DELETE FROM file_handler_instance WHERE intranet_id = " . $intranet_id);
177
-        $db->query("DELETE FROM filehandler_append_file WHERE intranet_id = " . $intranet_id);
175
+        $db->query("DELETE FROM file_handler WHERE intranet_id = ".$intranet_id);
176
+        $db->query("DELETE FROM file_handler_instance WHERE intranet_id = ".$intranet_id);
177
+        $db->query("DELETE FROM filehandler_append_file WHERE intranet_id = ".$intranet_id);
178 178
 
179
-        $db->query("DELETE FROM invoice_payment WHERE intranet_id = " . $intranet_id);
180
-        $db->query("DELETE FROM invoice_reminder WHERE intranet_id = " . $intranet_id);
181
-        $db->query("DELETE FROM invoice_reminder_item WHERE intranet_id = " . $intranet_id);
182
-        $db->query("DELETE FROM invoice_reminder_unpaid_reminder WHERE intranet_id = " . $intranet_id);
179
+        $db->query("DELETE FROM invoice_payment WHERE intranet_id = ".$intranet_id);
180
+        $db->query("DELETE FROM invoice_reminder WHERE intranet_id = ".$intranet_id);
181
+        $db->query("DELETE FROM invoice_reminder_item WHERE intranet_id = ".$intranet_id);
182
+        $db->query("DELETE FROM invoice_reminder_unpaid_reminder WHERE intranet_id = ".$intranet_id);
183 183
 
184
-        $db->query("DELETE FROM keyword WHERE intranet_id = " . $intranet_id);
185
-        $db->query("DELETE FROM keyword_x_object WHERE intranet_id = " . $intranet_id);
184
+        $db->query("DELETE FROM keyword WHERE intranet_id = ".$intranet_id);
185
+        $db->query("DELETE FROM keyword_x_object WHERE intranet_id = ".$intranet_id);
186 186
 
187
-        $db->query("DELETE FROM newsletter_archieve WHERE intranet_id = " . $intranet_id);
188
-        $db->query("DELETE FROM newsletter_list WHERE intranet_id = " . $intranet_id);
189
-        $db->query("DELETE FROM newsletter_subscriber WHERE intranet_id = " . $intranet_id);
187
+        $db->query("DELETE FROM newsletter_archieve WHERE intranet_id = ".$intranet_id);
188
+        $db->query("DELETE FROM newsletter_list WHERE intranet_id = ".$intranet_id);
189
+        $db->query("DELETE FROM newsletter_subscriber WHERE intranet_id = ".$intranet_id);
190 190
 
191
-        $db->query("DELETE FROM onlinepayment WHERE intranet_id = " . $intranet_id);
191
+        $db->query("DELETE FROM onlinepayment WHERE intranet_id = ".$intranet_id);
192 192
 
193
-        $db->query("DELETE FROM procurement WHERE intranet_id = " . $intranet_id);
194
-        $db->query("DELETE FROM procurement_item WHERE intranet_id = " . $intranet_id);
193
+        $db->query("DELETE FROM procurement WHERE intranet_id = ".$intranet_id);
194
+        $db->query("DELETE FROM procurement_item WHERE intranet_id = ".$intranet_id);
195 195
 
196
-        $db->query("DELETE FROM product WHERE intranet_id = " . $intranet_id);
197
-        $db->query("DELETE FROM product_detail WHERE intranet_id = " . $intranet_id);
198
-        $db->query("DELETE FROM product_related WHERE intranet_id = " . $intranet_id);
196
+        $db->query("DELETE FROM product WHERE intranet_id = ".$intranet_id);
197
+        $db->query("DELETE FROM product_detail WHERE intranet_id = ".$intranet_id);
198
+        $db->query("DELETE FROM product_related WHERE intranet_id = ".$intranet_id);
199 199
 
200
-        $db->query("DELETE FROM stock_adaptation WHERE intranet_id = " . $intranet_id);
201
-        $db->query("DELETE FROM stock_regulation WHERE intranet_id = " . $intranet_id);
200
+        $db->query("DELETE FROM stock_adaptation WHERE intranet_id = ".$intranet_id);
201
+        $db->query("DELETE FROM stock_regulation WHERE intranet_id = ".$intranet_id);
202 202
 
203
-        $db->query("DELETE FROM todo_list WHERE intranet_id = " . $intranet_id);
204
-        $db->query("DELETE FROM todo_item WHERE intranet_id = " . $intranet_id);
205
-        $db->query("DELETE FROM todo_contact WHERE intranet_id = " . $intranet_id);
203
+        $db->query("DELETE FROM todo_list WHERE intranet_id = ".$intranet_id);
204
+        $db->query("DELETE FROM todo_item WHERE intranet_id = ".$intranet_id);
205
+        $db->query("DELETE FROM todo_contact WHERE intranet_id = ".$intranet_id);
206 206
 
207
-        $this->removeDir('/home/intraface/upload/' . $intranet_id . '/');
207
+        $this->removeDir('/home/intraface/upload/'.$intranet_id.'/');
208 208
     }
209 209
 
210 210
     protected function removeDir($path)
@@ -214,8 +214,8 @@  discard block
 block discarded – undo
214 214
             $path .= "/";
215 215
         }
216 216
 
217
-        $normal_files = glob($path . "*");
218
-        $hidden_files = glob($path . "\.?*");
217
+        $normal_files = glob($path."*");
218
+        $hidden_files = glob($path."\.?*");
219 219
         $all_files = array_merge($normal_files, $hidden_files);
220 220
 
221 221
         foreach ($all_files as $file) {
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             if (is_file($file) === true) {
228 228
                 // Remove each file in this Directory
229 229
                 unlink($file);
230
-                echo "Removed File: " . $file . "<br>";
230
+                echo "Removed File: ".$file."<br>";
231 231
             } elseif (is_dir($file) === true) {
232 232
                 // If this Directory contains a Subdirectory, run this Function on it
233 233
                 removeDir($file);
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -207,6 +207,9 @@
 block discarded – undo
207 207
         $this->removeDir('/home/intraface/upload/' . $intranet_id . '/');
208 208
     }
209 209
 
210
+    /**
211
+     * @param string $path
212
+     */
210 213
     protected function removeDir($path)
211 214
     {
212 215
         // Add trailing slash to $path if one is not there
Please login to merge, or discard this patch.