@@ -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 |
@@ -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 |
@@ -192,10 +192,10 @@ |
||
192 | 192 | } |
193 | 193 | |
194 | 194 | /** |
195 | - * Returns the store identifier which is generated on store and restore. |
|
196 | - * |
|
197 | - * @return string action store identifier |
|
198 | - */ |
|
195 | + * Returns the store identifier which is generated on store and restore. |
|
196 | + * |
|
197 | + * @return string action store identifier |
|
198 | + */ |
|
199 | 199 | public function getIdentifier() |
200 | 200 | { |
201 | 201 | return $this->identifier; |
@@ -51,7 +51,7 @@ |
||
51 | 51 | * |
52 | 52 | * @param object action An action object |
53 | 53 | * |
54 | - * @return boolean true or false |
|
54 | + * @return null|string true or false |
|
55 | 55 | */ |
56 | 56 | public function store($action) |
57 | 57 | { |
@@ -65,12 +65,12 @@ discard block |
||
65 | 65 | |
66 | 66 | $identifier = md5($action->getOrderIdentifier().$this->intranet_id.time()); |
67 | 67 | |
68 | - $result = $this->db->exec('INSERT INTO module_package_action SET ' . |
|
69 | - 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').', ' . |
|
70 | - 'identifier = '.$this->db->quote($identifier, 'text').', ' . |
|
71 | - 'order_debtor_identifier = '.$this->db->quote($action->getOrderIdentifier(), 'text').', ' . |
|
72 | - 'date_created = NOW(), ' . |
|
73 | - 'action = '.$this->db->quote($action_serialized, 'text').', ' . |
|
68 | + $result = $this->db->exec('INSERT INTO module_package_action SET '. |
|
69 | + 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').', '. |
|
70 | + 'identifier = '.$this->db->quote($identifier, 'text').', '. |
|
71 | + 'order_debtor_identifier = '.$this->db->quote($action->getOrderIdentifier(), 'text').', '. |
|
72 | + 'date_created = NOW(), '. |
|
73 | + 'action = '.$this->db->quote($action_serialized, 'text').', '. |
|
74 | 74 | 'active = 1'); |
75 | 75 | |
76 | 76 | if (PEAR::isError($result)) { |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | public function restore($identifier) |
98 | 98 | { |
99 | 99 | |
100 | - $result = $this->db->query('SELECT id, action, identifier FROM module_package_action WHERE ' . |
|
101 | - 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' AND ' . |
|
102 | - 'identifier = '.$this->db->quote($identifier, 'text').' AND ' . |
|
100 | + $result = $this->db->query('SELECT id, action, identifier FROM module_package_action WHERE '. |
|
101 | + 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' AND '. |
|
102 | + 'identifier = '.$this->db->quote($identifier, 'text').' AND '. |
|
103 | 103 | 'active = 1 '); |
104 | 104 | |
105 | 105 | if (PEAR::isError($result)) { |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | public static function restoreFromIdentifier($db, $identifier) |
134 | 134 | { |
135 | 135 | |
136 | - $result = $db->query('SELECT id, action, identifier FROM module_package_action WHERE ' . |
|
137 | - 'identifier = '.$db->quote($identifier, 'text').' AND ' . |
|
136 | + $result = $db->query('SELECT id, action, identifier FROM module_package_action WHERE '. |
|
137 | + 'identifier = '.$db->quote($identifier, 'text').' AND '. |
|
138 | 138 | 'active = 1 '); |
139 | 139 | |
140 | 140 | if (PEAR::isError($result)) { |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | return false; |
170 | 170 | } |
171 | 171 | |
172 | - $result = $this->db->exec('UPDATE module_package_action SET active = 0 WHERE ' . |
|
173 | - 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' AND ' . |
|
172 | + $result = $this->db->exec('UPDATE module_package_action SET active = 0 WHERE '. |
|
173 | + 'intranet_id = '.$this->db->quote($this->intranet_id, 'integer').' AND '. |
|
174 | 174 | 'id = '.$this->db->quote($this->id, 'integer')); |
175 | 175 | |
176 | 176 | if (PEAR::isError($result)) { |
@@ -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'), |
@@ -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> |
@@ -9,8 +9,11 @@ |
||
9 | 9 | ?> |
10 | 10 | <h3><?php e(t('success!')); ?></h3> |
11 | 11 | <p><?php e(t('if everything went as it should, you can see your packages below, and you should be able to use them now.')); ?></p> |
12 | - <?php else : ?> |
|
13 | - <p><?php e(t('on this page you have an overview of your intraface account')); ?></p> |
|
12 | + <?php else { |
|
13 | + : ?> |
|
14 | + <p><?php e(t('on this page you have an overview of your intraface account')); |
|
15 | +} |
|
16 | +?></p> |
|
14 | 17 | <?php endif; ?> |
15 | 18 | </div> |
16 | 19 |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | $existing_modulepackages = $modulepackagemanager->getList(); |
73 | 73 | |
74 | 74 | // default start date is today |
75 | -if ($add_type == 'extend' && count($existing_modulepackages) > 0 && isset($existing_modulepackages[count($existing_modulepackages)-1]['dk_start_date'])) { |
|
76 | - $end_date_integer = strtotime($existing_modulepackages[count($existing_modulepackages)-1]['end_date']); |
|
75 | +if ($add_type == 'extend' && count($existing_modulepackages) > 0 && isset($existing_modulepackages[count($existing_modulepackages) - 1]['dk_start_date'])) { |
|
76 | + $end_date_integer = strtotime($existing_modulepackages[count($existing_modulepackages) - 1]['end_date']); |
|
77 | 77 | // the new start day is the day after the last package ends |
78 | 78 | $start_date = date('d-m-Y', strtotime('+1 day', $end_date_integer)); |
79 | 79 | } else { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | <option value="24"><?php e('2 '.t('years')); |
134 | 134 | if (isset($product['price_incl_vat'])) : |
135 | 135 | e(' (DKK '.($product['price_incl_vat']*24).')'); |
136 | - endif; ?></option> |
|
136 | + endif; ?></option> |
|
137 | 137 | </select> |
138 | 138 | </div> |
139 | 139 |
@@ -19,8 +19,10 @@ |
||
19 | 19 | <span id="price"><?php $product = $modulepackageshop->getProduct((int)$modulepackage->get('product_id')); |
20 | 20 | if (isset($product['product']['currency']['DKK']['price_incl_vat'])) : |
21 | 21 | e('DKK '.$product['product']['currency']['DKK']['price_incl_vat'].' '.t('per').' '.t($product['product']['unit']['singular'])); |
22 | - else : |
|
22 | + else { |
|
23 | + : |
|
23 | 24 | echo 'free!'; |
25 | + } |
|
24 | 26 | endif; ?></span> |
25 | 27 | </div> |
26 | 28 |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | $this->body('amount'), |
28 | 28 | $this->body('currency'), |
29 | 29 | $language, |
30 | - NET_SCHEME . NET_HOST. $this->url('../', array('status' => 'success')), |
|
31 | - NET_SCHEME . NET_HOST. $this->url('../payment', array('action_store_identifier' => $this->body('action_store_identifier'), 'payment_error' => 'true')), |
|
32 | - NET_SCHEME . NET_HOST. $this->url('/process', array('action_store_identifier' => $this->body('action_store_identifier'))), |
|
30 | + NET_SCHEME.NET_HOST.$this->url('../', array('status' => 'success')), |
|
31 | + NET_SCHEME.NET_HOST.$this->url('../payment', array('action_store_identifier' => $this->body('action_store_identifier'), 'payment_error' => 'true')), |
|
32 | + NET_SCHEME.NET_HOST.$this->url('/process', array('action_store_identifier' => $this->body('action_store_identifier'))), |
|
33 | 33 | $this->query(), |
34 | 34 | $this->body() |
35 | 35 | ); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | 'form_action' => $form_action, |
48 | 48 | 'language' => $language); |
49 | 49 | |
50 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/postform'); |
|
50 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/postform'); |
|
51 | 51 | return $tpl->render($this, $data); |
52 | 52 | } |
53 | 53 |