@@ -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'), |
@@ -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> |
@@ -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 |
@@ -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 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | 'modulepackageshop' => $modulepackageshop, |
37 | 37 | 'modulepackage' => $this->modulepackage, |
38 | 38 | 'kernel' => $this->getKernel()); |
39 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/add-package'); |
|
39 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/add-package'); |
|
40 | 40 | return $tpl->render($this, $data); |
41 | 41 | } |
42 | 42 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | if ($this->getKernel()->intranet->address->get('name') != $this->getKernel()->user->getAddress()->get('name')) { |
87 | 87 | $contact['contactperson'] = $this->getKernel()->user->getAddress()->get('name'); |
88 | 88 | $contact['contactemail'] = $this->getKernel()->user->getAddress()->get('email'); |
89 | - $contact['contactphone'] = $this->getKernel()->user->getAddress()->get('phone'); |
|
89 | + $contact['contactphone'] = $this->getKernel()->user->getAddress()->get('phone'); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | // We add the contact_id. But notice, despite of the bad naming the contact_id is the contact_id in the intranet_maintenance intranet! |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function load() |
58 | 58 | { |
59 | - $result = $this->db->query("SELECT module_package.id, module_package.product_id, module_package_group.group_name AS ".$this->db->quoteIdentifier('group').", module_package_plan.plan, module_package_plan.plan_index, module_package_group.id AS group_id " . |
|
60 | - "FROM module_package " . |
|
61 | - "INNER JOIN module_package_group ON module_package.module_package_group_id = module_package_group.id " . |
|
62 | - "INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id " . |
|
59 | + $result = $this->db->query("SELECT module_package.id, module_package.product_id, module_package_group.group_name AS ".$this->db->quoteIdentifier('group').", module_package_plan.plan, module_package_plan.plan_index, module_package_group.id AS group_id ". |
|
60 | + "FROM module_package ". |
|
61 | + "INNER JOIN module_package_group ON module_package.module_package_group_id = module_package_group.id ". |
|
62 | + "INNER JOIN module_package_plan ON module_package.module_package_plan_id = module_package_plan.id ". |
|
63 | 63 | "WHERE module_package.id = ".$this->db->quote($this->id, 'integer')); |
64 | 64 | |
65 | 65 | if (PEAR::isError($result)) { |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | $id = intval($id); |
94 | 94 | } |
95 | 95 | |
96 | - $result = $this->db->query("SELECT id, module, limiter " . |
|
97 | - "FROM module_package_module " . |
|
96 | + $result = $this->db->query("SELECT id, module, limiter ". |
|
97 | + "FROM module_package_module ". |
|
98 | 98 | "WHERE module_package_module.module_package_id = ".$this->db->quote($id, 'integer')); |
99 | 99 | |
100 | 100 | if (PEAR::isError($result)) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | public function load() |
62 | 62 | { |
63 | 63 | $db = new DB_Sql; |
64 | - $db->query("SELECT id, name, email, phone, mobile, contact_id FROM contact_person WHERE id = " . $this->id . " LIMIT 1"); |
|
64 | + $db->query("SELECT id, name, email, phone, mobile, contact_id FROM contact_person WHERE id = ".$this->id." LIMIT 1"); |
|
65 | 65 | while ($db->nextRecord()) { |
66 | 66 | $this->value['id'] = $db->f('id'); |
67 | 67 | $this->value['name'] = $db->f('name'); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | if ($this->id > 0) { |
101 | 101 | $sql_type = "UPDATE "; |
102 | - $sql_end = " WHERE id = " . $this->id; |
|
102 | + $sql_end = " WHERE id = ".$this->id; |
|
103 | 103 | } else { |
104 | 104 | $sql_type = "INSERT INTO "; |
105 | 105 | $sql_end = ", date_created = NOW()"; |
@@ -108,15 +108,15 @@ discard block |
||
108 | 108 | |
109 | 109 | $db = MDB2::singleton(DB_DSN); |
110 | 110 | |
111 | - $result = $db->exec($sql_type . "contact_person " . |
|
112 | - "SET " . |
|
113 | - "intranet_id = ".$db->quote($this->contact->kernel->intranet->get("id"), 'integer').", " . |
|
114 | - "name = ".$db->quote($input['name'], 'text').", " . |
|
115 | - "email = ".$db->quote($input['email'], 'text').", " . |
|
116 | - "phone = ".$db->quote($input['phone'], 'text').", " . |
|
117 | - "mobile = ".$db->quote($input['mobile']).", " . |
|
118 | - "contact_id = " . $db->quote($this->contact->get('id'), 'integer') . ", " . |
|
119 | - "date_changed = NOW() " . $sql_end); |
|
111 | + $result = $db->exec($sql_type."contact_person ". |
|
112 | + "SET ". |
|
113 | + "intranet_id = ".$db->quote($this->contact->kernel->intranet->get("id"), 'integer').", ". |
|
114 | + "name = ".$db->quote($input['name'], 'text').", ". |
|
115 | + "email = ".$db->quote($input['email'], 'text').", ". |
|
116 | + "phone = ".$db->quote($input['phone'], 'text').", ". |
|
117 | + "mobile = ".$db->quote($input['mobile']).", ". |
|
118 | + "contact_id = ".$db->quote($this->contact->get('id'), 'integer').", ". |
|
119 | + "date_changed = NOW() ".$sql_end); |
|
120 | 120 | |
121 | 121 | if (PEAR::isError($result)) { |
122 | 122 | throw new Exception('Error in query: '.$result->getUserInfo()); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | public function getList() |
144 | 144 | { |
145 | 145 | $db = new DB_Sql; |
146 | - $db->query("SELECT * FROM contact_person WHERE contact_id = " . $this->contact->get('id')); |
|
146 | + $db->query("SELECT * FROM contact_person WHERE contact_id = ".$this->contact->get('id')); |
|
147 | 147 | $persons = array(); |
148 | 148 | $i = 0; |
149 | 149 | while ($db->nextRecord()) { |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | * @package Intraface_Contact |
4 | 4 | */ |
5 | 5 | |
6 | -require_once dirname(__FILE__) . '/ContactReminder.php'; |
|
6 | +require_once dirname(__FILE__).'/ContactReminder.php'; |
|
7 | 7 | $contact_module = $kernel->useModule('contact'); |
8 | 8 | |
9 | 9 | $contact = new Contact($kernel); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | } |
26 | 26 | $_attention_needed[] = array( |
27 | 27 | 'module' => $contact_module->getName(), |
28 | - 'link' => $contact_module->getPath() .$reminder['contact_id'] . '/memo/' . $reminder['id'], |
|
28 | + 'link' => $contact_module->getPath().$reminder['contact_id'].'/memo/'.$reminder['id'], |
|
29 | 29 | 'msg' => $text.' ('.$reminder['dk_reminder_date'].'): '.$reminder['contact_name'].': '.$reminder['subject'].'.', |
30 | 30 | 'no_translation' => true |
31 | 31 | ); |