@@ -16,7 +16,7 @@ |
||
16 | 16 | ); |
17 | 17 | } else { |
18 | 18 | $db = new DB_Sql; |
19 | - $db->query("SELECT * FROM debtor WHERE type = 2 AND status = 0 AND active = 1 AND intranet_id = " . $kernel->intranet->get('id')); |
|
19 | + $db->query("SELECT * FROM debtor WHERE type = 2 AND status = 0 AND active = 1 AND intranet_id = ".$kernel->intranet->get('id')); |
|
20 | 20 | $orders = $db->numRows(); |
21 | 21 | if ($orders > 0) { |
22 | 22 | $_attention_needed[] = array( |
@@ -15,14 +15,18 @@ |
||
15 | 15 | <td><?php $rate = $currency->getProductPriceExchangeRate(); |
16 | 16 | if ($rate === false) : |
17 | 17 | e(t('Not given')); |
18 | - else : |
|
18 | + else { |
|
19 | + : |
|
19 | 20 | e($rate->getRate()->getAsLocal('da_dk').' ('.$rate->getDateUpdated()->getAsLocal('da_dk').')'); |
21 | + } |
|
20 | 22 | endif; ?> <a class="edit" href="<?php e(url($currency->getId().'/exchangerate/productprice/update')) ?>"><?php e(t('Update')); ?></a></td> |
21 | 23 | <td><?php $rate = $currency->getPaymentExchangeRate(); |
22 | 24 | if ($rate === false) : |
23 | 25 | e(t('Not given')); |
24 | - else : |
|
26 | + else { |
|
27 | + : |
|
25 | 28 | e($rate->getRate()->getAsLocal('da_dk').' ('.$rate->getDateUpdated()->getAsLocal('da_dk').')'); |
29 | + } |
|
26 | 30 | endif; ?> <a class="edit" href="<?php e(url($currency->getId().'/exchangerate/payment/update')) ?>"><?php e(t('Update')); ?></a></td> |
27 | 31 | </tr> |
28 | 32 | <?php endforeach; ?> |
@@ -8,7 +8,7 @@ |
||
8 | 8 | <?php if (!empty($data['selected_type_iso_code']) and $type->getIsoCode() == $data['selected_type_iso_code']) { |
9 | 9 | echo ' selected="selected"'; |
10 | 10 | } ?> |
11 | - ><?php e($type->getIsoCode() . ' ' . $type->getDescription()); ?></option> |
|
11 | + ><?php e($type->getIsoCode().' '.$type->getDescription()); ?></option> |
|
12 | 12 | <?php endforeach; ?> |
13 | 13 | </select> |
14 | 14 | </div> |
@@ -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 |
@@ -8,11 +8,14 @@ |
||
8 | 8 | |
9 | 9 | <p><?php e(t('No lists available'))?>. <a href="<?php e(url('create'));?>"><?php e(t('Create list')); ?></a>.</p> |
10 | 10 | |
11 | -<?php else : ?> |
|
11 | +<?php else { |
|
12 | + : ?> |
|
12 | 13 | |
13 | 14 | <ul class="todo-list"> |
14 | 15 | <?php foreach ($todo_list as $t) : ?> |
15 | - <li><a href="<?php e(url($t['id'])); ?>"><?php e($t['name']); ?></a> — <?php e($t['left']); ?> <?php e(t('left')); ?></li> |
|
16 | + <li><a href="<?php e(url($t['id'])); |
|
17 | +} |
|
18 | +?>"><?php e($t['name']); ?></a> — <?php e($t['left']); ?> <?php e(t('left')); ?></li> |
|
16 | 19 | <?php endforeach; ?> |
17 | 20 | </ul> |
18 | 21 |
@@ -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)) { |