@@ -1,12 +1,12 @@ |
||
1 | 1 | <h1><?php e(t('Todo')); ?></h1> |
2 | 2 | |
3 | 3 | <ul class="options"> |
4 | - <li><a href="<?php e(url('create'));?>"><?php e(t('Create list')); ?></a></li> |
|
4 | + <li><a href="<?php e(url('create')); ?>"><?php e(t('Create list')); ?></a></li> |
|
5 | 5 | </ul> |
6 | 6 | |
7 | 7 | <?php if (count($todo_list) == 0) : ?> |
8 | 8 | |
9 | - <p><?php e(t('No lists available'))?>. <a href="<?php e(url('create'));?>"><?php e(t('Create list')); ?></a>.</p> |
|
9 | + <p><?php e(t('No lists available'))?>. <a href="<?php e(url('create')); ?>"><?php e(t('Create list')); ?></a>.</p> |
|
10 | 10 | |
11 | 11 | <?php else : ?> |
12 | 12 |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $todo = new TodoList($this->getKernel(), $this->context->name()); |
19 | 19 | $value['id'] = $todo->get('id'); |
20 | 20 | $value['subject'] = 'Todoliste'; |
21 | - $value['body'] = $this->getKernel()->setting->get('user', 'todo.email.standardtext') . "\n\nMed venlig hilsen\n".$this->getKernel()->user->getAddress()->get('name') . "\n" . $this->getKernel()->intranet->get('name'); |
|
21 | + $value['body'] = $this->getKernel()->setting->get('user', 'todo.email.standardtext')."\n\nMed venlig hilsen\n".$this->getKernel()->user->getAddress()->get('name')."\n".$this->getKernel()->intranet->get('name'); |
|
22 | 22 | |
23 | 23 | $contacts = $todo->getContacts(); |
24 | 24 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | 'value' => $value |
32 | 32 | ); |
33 | 33 | |
34 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/email'); |
|
34 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/email'); |
|
35 | 35 | return $tpl->render($this, $data); |
36 | 36 | } |
37 | 37 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $email = new Email($this->getKernel()); |
56 | 56 | $var = array( |
57 | - 'body' => $_POST['body'] . "\n\n" . $contact->getLoginUrl(), |
|
57 | + 'body' => $_POST['body']."\n\n".$contact->getLoginUrl(), |
|
58 | 58 | 'subject' => $_POST['subject'], |
59 | 59 | 'contact_id' => $contact->get('id'), |
60 | 60 | 'type_id' => 6, // type_id 6 er todo |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | 'kernel' => $this->getKernel() |
28 | 28 | ); |
29 | 29 | |
30 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/edit'); |
|
30 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/edit'); |
|
31 | 31 | return $tpl->render($this, $data); |
32 | 32 | } |
33 | 33 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $item_id = 0; |
52 | 52 | } |
53 | 53 | } |
54 | - return new k_SeeOther($this->url('../' . $todo->get('id'))); |
|
54 | + return new k_SeeOther($this->url('../'.$todo->get('id'))); |
|
55 | 55 | } |
56 | 56 | return $this->render(); |
57 | 57 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | |
49 | 49 | $this->document()->addScript('todo/todo.js'); |
50 | 50 | |
51 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/todo'); |
|
51 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/todo'); |
|
52 | 52 | return $tpl->render($this, $data); |
53 | 53 | } |
54 | 54 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | 'email_shared' => $email_shared |
63 | 63 | ); |
64 | 64 | |
65 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/index'); |
|
65 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/index'); |
|
66 | 66 | return $tpl->render($this, $data); |
67 | 67 | } |
68 | 68 |
@@ -13,14 +13,14 @@ |
||
13 | 13 | $module = $this->getKernel()->module('todo'); |
14 | 14 | $translation = $this->getKernel()->getTranslation('todo'); |
15 | 15 | |
16 | - $value['publiclist'] = $kernel->setting->get('intranet', 'todo.publiclist'); |
|
17 | - $value['emailstandardtext'] = $kernel->setting->get('user', 'todo.email.standardtext'); |
|
16 | + $value['publiclist'] = $kernel->setting->get('intranet', 'todo.publiclist'); |
|
17 | + $value['emailstandardtext'] = $kernel->setting->get('user', 'todo.email.standardtext'); |
|
18 | 18 | |
19 | 19 | $data = array( |
20 | 20 | 'value' => $value |
21 | 21 | ); |
22 | 22 | |
23 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/setting'); |
|
23 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/setting'); |
|
24 | 24 | return $tpl->render($this, $data); |
25 | 25 | } |
26 | 26 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | } else { |
20 | 20 | foreach ($list as $key => $module) { |
21 | 21 | // check whether there is any expering within a month and if there is no other packages comming up in the same group. |
22 | - if (strtotime($module['end_date']) < strtotime('+1 month') && (!isset($list[$key+1]) || $module['group'] != $list[$key+1]['group'])) { |
|
22 | + if (strtotime($module['end_date']) < strtotime('+1 month') && (!isset($list[$key + 1]) || $module['group'] != $list[$key + 1]['group'])) { |
|
23 | 23 | $_advice[] = array( |
24 | 24 | 'msg' => 'You have modules that expire within a month! Click here to extend the modules now to keep the functionality of your intranet', |
25 | 25 | 'link' => $this->url('module/modulepackage'), |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | // Should we rather just take intranet_id as parameter? |
49 | 49 | $this->intranet = &$intranet; |
50 | 50 | $this->db = MDB2::singleton(DB_DSN); |
51 | - $this->error = new Intraface_Error; |
|
51 | + $this->error = new Intraface_Error; |
|
52 | 52 | $this->id = (int)$id; |
53 | 53 | |
54 | 54 | if ($this->id > 0) { |
@@ -69,20 +69,20 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | // TODO: This could actually easily use dbquery |
72 | - $result = $this->db->query('SELECT intranet_module_package.id, ' . |
|
73 | - 'intranet_module_package.module_package_id, ' . |
|
74 | - 'intranet_module_package.start_date, ' . |
|
75 | - 'intranet_module_package.end_date, ' . |
|
76 | - 'intranet_module_package.order_debtor_id, ' . |
|
77 | - 'intranet_module_package.status_key, ' . |
|
78 | - 'module_package_plan.plan, ' . |
|
79 | - 'module_package_group.group_name, ' . |
|
80 | - 'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, ' . |
|
81 | - 'DATE_FORMAT(intranet_module_package.end_date, "%d-%m-%Y") AS dk_end_date ' . |
|
82 | - 'FROM intranet_module_package ' . |
|
83 | - 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' . |
|
84 | - 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' . |
|
85 | - 'INNER JOIN module_package_group ON module_package.module_package_group_id = module_package_group.id ' . |
|
72 | + $result = $this->db->query('SELECT intranet_module_package.id, '. |
|
73 | + 'intranet_module_package.module_package_id, '. |
|
74 | + 'intranet_module_package.start_date, '. |
|
75 | + 'intranet_module_package.end_date, '. |
|
76 | + 'intranet_module_package.order_debtor_id, '. |
|
77 | + 'intranet_module_package.status_key, '. |
|
78 | + 'module_package_plan.plan, '. |
|
79 | + 'module_package_group.group_name, '. |
|
80 | + 'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, '. |
|
81 | + 'DATE_FORMAT(intranet_module_package.end_date, "%d-%m-%Y") AS dk_end_date '. |
|
82 | + 'FROM intranet_module_package '. |
|
83 | + 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '. |
|
84 | + 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '. |
|
85 | + 'INNER JOIN module_package_group ON module_package.module_package_group_id = module_package_group.id '. |
|
86 | 86 | 'WHERE intranet_id = '.$this->db->quote($this->intranet->get('id'), 'integer').' AND intranet_module_package.id = '.$this->db->quote($this->id, 'integer')); |
87 | 87 | |
88 | 88 | if (PEAR::isError($result)) { |
@@ -162,8 +162,8 @@ discard block |
||
162 | 162 | return false; |
163 | 163 | } |
164 | 164 | |
165 | - $sql = "module_package_id = ".$this->db->quote($modulepackage->get('id'), 'integer').", " . |
|
166 | - "start_date = ".$this->db->quote($start_date, 'date').", " . |
|
165 | + $sql = "module_package_id = ".$this->db->quote($modulepackage->get('id'), 'integer').", ". |
|
166 | + "start_date = ".$this->db->quote($start_date, 'date').", ". |
|
167 | 167 | "end_date = ".$this->db->quote($end_date, 'date'); |
168 | 168 | |
169 | 169 | $result = $this->db->exec("INSERT INTO intranet_module_package SET ".$sql.", status_key = 1, active = 1, intranet_id = ".$this->intranet->get('id')); |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | return false; |
201 | 201 | } |
202 | 202 | |
203 | - $result = $this->db->exec('UPDATE intranet_module_package ' . |
|
204 | - 'SET order_debtor_identifier = '.$this->db->quote($order_identifier, 'text').' ' . |
|
203 | + $result = $this->db->exec('UPDATE intranet_module_package '. |
|
204 | + 'SET order_debtor_identifier = '.$this->db->quote($order_identifier, 'text').' '. |
|
205 | 205 | 'WHERE intranet_id = '.$this->db->quote($this->intranet->get('id'), 'integer').' AND id = '.$this->db->quote($this->id, 'integer')); |
206 | 206 | |
207 | 207 | if (PEAR::isError($result)) { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | |
226 | 226 | $result = $this->db->exec("UPDATE intranet_module_package SET status_key = 3 WHERE intranet_id = ".$this->intranet->get('id')." AND id = ".intval($this->id)); |
227 | 227 | if (PEAR::isError($result)) { |
228 | - throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->terminate :". $result->getUserInfo()); |
|
228 | + throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->terminate :".$result->getUserInfo()); |
|
229 | 229 | exit; |
230 | 230 | } |
231 | 231 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | } |
245 | 245 | $result = $this->db->exec("UPDATE intranet_module_package SET active = 0 WHERE intranet_id = ".$this->intranet->get('id')." AND id = ".intval($this->id)); |
246 | 246 | if (PEAR::isError($result)) { |
247 | - throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->delete :". $result->getUserInfo()); |
|
247 | + throw new Exception("Error in query in Intraface_modules_modulepackage_Manager->delete :".$result->getUserInfo()); |
|
248 | 248 | exit; |
249 | 249 | } |
250 | 250 | |
@@ -271,10 +271,10 @@ discard block |
||
271 | 271 | } |
272 | 272 | |
273 | 273 | // TODO: If DBQuery had not needed kernel we could have used it here! |
274 | - $result = $this->db->query('SELECT module_package_plan.plan_index FROM intranet_module_package ' . |
|
275 | - 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' . |
|
276 | - 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' . |
|
277 | - 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' ' . |
|
274 | + $result = $this->db->query('SELECT module_package_plan.plan_index FROM intranet_module_package '. |
|
275 | + 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '. |
|
276 | + 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '. |
|
277 | + 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' '. |
|
278 | 278 | 'ORDER BY end_date DESC'); |
279 | 279 | |
280 | 280 | if (PEAR::isError($result)) { |
@@ -312,10 +312,10 @@ discard block |
||
312 | 312 | } |
313 | 313 | |
314 | 314 | // TODO: If DBQuery had not needed kernel we could have used it here! |
315 | - $result = $this->db->query('SELECT intranet_module_package.end_date FROM intranet_module_package ' . |
|
316 | - 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' . |
|
317 | - 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' . |
|
318 | - 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' ' . |
|
315 | + $result = $this->db->query('SELECT intranet_module_package.end_date FROM intranet_module_package '. |
|
316 | + 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '. |
|
317 | + 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '. |
|
318 | + 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' '. |
|
319 | 319 | 'ORDER BY end_date DESC'); |
320 | 320 | |
321 | 321 | if (PEAR::isError($result)) { |
@@ -498,11 +498,11 @@ discard block |
||
498 | 498 | $shop = new Intraface_modules_modulepackage_ShopExtension; |
499 | 499 | |
500 | 500 | // TODO: If DBQuery had not needed kernel we could have used it here! |
501 | - $result = $this->db->query('SELECT intranet_module_package.id, intranet_module_package.status_key, intranet_module_package.start_date, intranet_module_package.end_date, intranet_module_package.order_debtor_id, intranet_module_package.module_package_id, module_package.product_id ' . |
|
502 | - 'FROM intranet_module_package ' . |
|
503 | - 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id ' . |
|
504 | - 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ' . |
|
505 | - 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' ' . |
|
501 | + $result = $this->db->query('SELECT intranet_module_package.id, intranet_module_package.status_key, intranet_module_package.start_date, intranet_module_package.end_date, intranet_module_package.order_debtor_id, intranet_module_package.module_package_id, module_package.product_id '. |
|
502 | + 'FROM intranet_module_package '. |
|
503 | + 'INNER JOIN module_package ON intranet_module_package.module_package_id = module_package.id '. |
|
504 | + 'INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id '. |
|
505 | + 'WHERE intranet_module_package.intranet_id = '.$this->intranet->get('id').' AND intranet_module_package.active = 1 AND (intranet_module_package.status_key = 1 OR intranet_module_package.status_key = 2) AND module_package.module_package_group_id = '.$modulepackage->get('group_id').' '. |
|
506 | 506 | 'ORDER BY end_date DESC'); |
507 | 507 | |
508 | 508 | if (PEAR::isError($result)) { |
@@ -587,15 +587,15 @@ discard block |
||
587 | 587 | $this->dbquery->setSorting('module_package_group.sorting_index, module_package_plan.plan_index, intranet_module_package.start_date'); |
588 | 588 | } |
589 | 589 | |
590 | - $db = $this->dbquery->getRecordset('intranet_module_package.id, ' . |
|
591 | - 'intranet_module_package.module_package_id, ' . |
|
592 | - 'intranet_module_package.start_date, ' . |
|
593 | - 'intranet_module_package.end_date, ' . |
|
594 | - 'intranet_module_package.order_debtor_id, ' . |
|
595 | - 'intranet_module_package.status_key, ' . |
|
596 | - 'module_package_plan.plan, ' . |
|
597 | - 'module_package_group.group_name, ' . |
|
598 | - 'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, ' . |
|
590 | + $db = $this->dbquery->getRecordset('intranet_module_package.id, '. |
|
591 | + 'intranet_module_package.module_package_id, '. |
|
592 | + 'intranet_module_package.start_date, '. |
|
593 | + 'intranet_module_package.end_date, '. |
|
594 | + 'intranet_module_package.order_debtor_id, '. |
|
595 | + 'intranet_module_package.status_key, '. |
|
596 | + 'module_package_plan.plan, '. |
|
597 | + 'module_package_group.group_name, '. |
|
598 | + 'DATE_FORMAT(intranet_module_package.start_date, "%d-%m-%Y") AS dk_start_date, '. |
|
599 | 599 | 'DATE_FORMAT(intranet_module_package.end_date, "%d-%m-%Y") AS dk_end_date', '', false); |
600 | 600 | |
601 | 601 | $modulepackages = array(); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | <tbody> |
33 | 33 | <?php foreach ($packages as $package) : ?> |
34 | 34 | <tr> |
35 | - <td><?php e($package['plan'] . ' '. $package['group']); ?></td> |
|
35 | + <td><?php e($package['plan'].' '.$package['group']); ?></td> |
|
36 | 36 | <td><?php e($package['dk_start_date']); ?></td> |
37 | 37 | <td><?php e($package['dk_end_date']); ?></td> |
38 | 38 | <td><?php e(t($package['status'])); ?></td> |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | <p> DKK <?php e($packages[$group['id']][$plan['id']]['product']['price_incl_vat'].' '.t('per').' '.t($packages[$group['id']][$plan['id']]['product']['unit']['singular'])); ?></p> |
138 | 138 | <?php } ?> |
139 | 139 | |
140 | - <a href="<?php e(url('package/' . $packages[$group['id']][$plan['id']]['id'])); ?>"><?php e(t('choose')); ?></a> |
|
140 | + <a href="<?php e(url('package/'.$packages[$group['id']][$plan['id']]['id'])); ?>"><?php e(t('choose')); ?></a> |
|
141 | 141 | |
142 | 142 | <?php } ?> |
143 | 143 | </td> |