@@ -53,7 +53,7 @@ |
||
53 | 53 | 'product' => $product |
54 | 54 | ); |
55 | 55 | |
56 | - $smarty = $this->template->create(dirname(__FILE__) . '/tpl/selectproductvariation'); |
|
56 | + $smarty = $this->template->create(dirname(__FILE__).'/tpl/selectproductvariation'); |
|
57 | 57 | return $smarty->render($this, $data); |
58 | 58 | } |
59 | 59 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | $data = array('groups' => $groups); |
27 | 27 | |
28 | - $smarty = $this->template->create(dirname(__FILE__) . '/tpl/attributegroups'); |
|
28 | + $smarty = $this->template->create(dirname(__FILE__).'/tpl/attributegroups'); |
|
29 | 29 | return $smarty->render($this, $data); |
30 | 30 | } |
31 | 31 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | function renderHtmlCreate() |
55 | 55 | { |
56 | 56 | $data = array(); |
57 | - $smarty = $this->template->create(dirname(__FILE__) . '/tpl/attributegroup-edit'); |
|
57 | + $smarty = $this->template->create(dirname(__FILE__).'/tpl/attributegroup-edit'); |
|
58 | 58 | return $smarty->render($this, $data); |
59 | 59 | } |
60 | 60 |
@@ -42,9 +42,9 @@ |
||
42 | 42 | { |
43 | 43 | $q = Doctrine_Query::create(); |
44 | 44 | $rows = $q->delete() |
45 | - ->from('Intraface_modules_language_Languages') |
|
46 | - ->where('intranet_id = ?', $GLOBALS['intraface_doctrine_intranet_id']) |
|
47 | - ->execute(); |
|
45 | + ->from('Intraface_modules_language_Languages') |
|
46 | + ->where('intranet_id = ?', $GLOBALS['intraface_doctrine_intranet_id']) |
|
47 | + ->execute(); |
|
48 | 48 | return true; |
49 | 49 | } |
50 | 50 | } |
@@ -77,7 +77,7 @@ |
||
77 | 77 | private function load() |
78 | 78 | { |
79 | 79 | $db = new DB_Sql; |
80 | - $db->query("SELECT id, list_id, subject, text, deadline, sent_to_receivers, status FROM newsletter_archieve WHERE id = " . $this->id . " AND active = 1 LIMIT 1"); |
|
80 | + $db->query("SELECT id, list_id, subject, text, deadline, sent_to_receivers, status FROM newsletter_archieve WHERE id = " . $this->id . " AND active = 1 LIMIT 1"); |
|
81 | 81 | |
82 | 82 | $db2 = new DB_Sql; |
83 | 83 | if ($db->nextRecord()) { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | private function load() |
78 | 78 | { |
79 | 79 | $db = new DB_Sql; |
80 | - $db->query("SELECT id, list_id, subject, text, deadline, sent_to_receivers, status FROM newsletter_archieve WHERE id = " . $this->id . " AND active = 1 LIMIT 1"); |
|
80 | + $db->query("SELECT id, list_id, subject, text, deadline, sent_to_receivers, status FROM newsletter_archieve WHERE id = ".$this->id." AND active = 1 LIMIT 1"); |
|
81 | 81 | |
82 | 82 | $db2 = new DB_Sql; |
83 | 83 | if ($db->nextRecord()) { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | return false; |
119 | 119 | } |
120 | 120 | $db = new DB_Sql; |
121 | - $db->query("UPDATE newsletter_archieve SET active = 0 WHERE id = " . $this->get("id") . " AND intranet_id = " . $this->list->getIntranet()->getId() . " AND locked = 0"); |
|
121 | + $db->query("UPDATE newsletter_archieve SET active = 0 WHERE id = ".$this->get("id")." AND intranet_id = ".$this->list->getIntranet()->getId()." AND locked = 0"); |
|
122 | 122 | |
123 | 123 | return true; |
124 | 124 | } |
@@ -148,10 +148,10 @@ discard block |
||
148 | 148 | $sql_end = ', date_created = NOW()'; |
149 | 149 | } else { |
150 | 150 | $sql_type = "UPDATE"; |
151 | - $sql_end = " WHERE id = " . $this->id; |
|
151 | + $sql_end = " WHERE id = ".$this->id; |
|
152 | 152 | } |
153 | 153 | $db = new DB_Sql; |
154 | - $sql = $sql_type . " newsletter_archieve |
|
154 | + $sql = $sql_type." newsletter_archieve |
|
155 | 155 | SET subject = '".$var['subject']."', |
156 | 156 | text = '".$var['text']."', |
157 | 157 | intranet_id = ".$this->list->getIntranet()->getId().", |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | private function updateSent($receivers) |
182 | 182 | { |
183 | 183 | $db = new DB_Sql; |
184 | - $db->query("UPDATE newsletter_archieve SET status = 1, sent_to_receivers = '".(int)$receivers."' WHERE id = " . $this->id . " AND intranet_id = " . $this->list->getIntranet()->getId()); |
|
184 | + $db->query("UPDATE newsletter_archieve SET status = 1, sent_to_receivers = '".(int)$receivers."' WHERE id = ".$this->id." AND intranet_id = ".$this->list->getIntranet()->getId()); |
|
185 | 185 | return true; |
186 | 186 | } |
187 | 187 | |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | $db = MDB2::singleton(DB_DSN); |
223 | 223 | |
224 | 224 | if (PEAR::isError($db)) { |
225 | - throw new Exception($result->getMessage() . $result->getUserInfo()); |
|
225 | + throw new Exception($result->getMessage().$result->getUserInfo()); |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | $i = 0; |
@@ -259,19 +259,19 @@ discard block |
||
259 | 259 | '".$name."', |
260 | 260 | 8, |
261 | 261 | 2, |
262 | - ".$this->get('id') . ", |
|
263 | - '".$this->get('deadline'). "', |
|
264 | - " .$this->list->getIntranet()->getId(). " , |
|
265 | - " .$subscriber['contact_id']. " , |
|
262 | + ".$this->get('id').", |
|
263 | + '".$this->get('deadline')."', |
|
264 | + " .$this->list->getIntranet()->getId()." , |
|
265 | + " .$subscriber['contact_id']." , |
|
266 | 266 | " .$this->list->kernel->user->get('id').", |
267 | 267 | ".$subject.", |
268 | 268 | ".$body.")"; |
269 | 269 | |
270 | 270 | if ($i == 40) { |
271 | - $result = $db->exec($sql . implode($params, ',')); |
|
271 | + $result = $db->exec($sql.implode($params, ',')); |
|
272 | 272 | |
273 | 273 | if (PEAR::isError($result)) { |
274 | - $error[] = $result->getMessage() . $result->getUserInfo(); |
|
274 | + $error[] = $result->getMessage().$result->getUserInfo(); |
|
275 | 275 | return false; |
276 | 276 | } |
277 | 277 | |
@@ -285,11 +285,11 @@ discard block |
||
285 | 285 | |
286 | 286 | // If the number of contacts can be divided evenly into 40 there will be no more params here. |
287 | 287 | if (count($params) > 0) { |
288 | - $result = $db->exec($sql . implode($params, ',')); |
|
288 | + $result = $db->exec($sql.implode($params, ',')); |
|
289 | 289 | } |
290 | 290 | |
291 | 291 | if (PEAR::isError($result)) { |
292 | - $error[] = $result->getMessage() . $result->getUserInfo(); |
|
292 | + $error[] = $result->getMessage().$result->getUserInfo(); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | if (!empty($error)) { |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | { |
322 | 322 | $list = array(); |
323 | 323 | $db = new DB_Sql; |
324 | - $db->query("SELECT * FROM newsletter_archieve WHERE active = 1 AND list_id = " . $this->list->get('id') . " ORDER BY deadline DESC"); |
|
324 | + $db->query("SELECT * FROM newsletter_archieve WHERE active = 1 AND list_id = ".$this->list->get('id')." ORDER BY deadline DESC"); |
|
325 | 325 | $i = 0; |
326 | 326 | while ($db->nextRecord()) { |
327 | 327 | $list[$i]['subject'] = $db->f('subject'); |
@@ -294,7 +294,7 @@ |
||
294 | 294 | * |
295 | 295 | * @param integer $id Contact id |
296 | 296 | * |
297 | - * @return object |
|
297 | + * @return Contact |
|
298 | 298 | */ |
299 | 299 | function getContact($id) |
300 | 300 | { |
@@ -49,11 +49,11 @@ |
||
49 | 49 | <tbody> |
50 | 50 | <?php foreach ($context->getSubscribers() as $s) : ?> |
51 | 51 | <tr> |
52 | - <td><a href="<?php e(url('../../../../contact/' . $s['contact_id'])); ?>"><?php e($s['contact_name']); ?></a></td> |
|
52 | + <td><a href="<?php e(url('../../../../contact/'.$s['contact_id'])); ?>"><?php e($s['contact_name']); ?></a></td> |
|
53 | 53 | <td><?php e($s['contact_email']); ?></td> |
54 | 54 | <td><?php e($s['dk_date_submitted']); ?></td> |
55 | 55 | <td> |
56 | - <?php if ($s['optin'] == 0 and $s['date_optin_email_sent'] < date('Y-m-d', time() - 60 * 60 * 24 * 3)) : ?> |
|
56 | + <?php if ($s['optin'] == 0 and $s['date_optin_email_sent'] < date('Y-m-d', time() - 60*60*24*3)) : ?> |
|
57 | 57 | <a href="<?php e(url($s['id'], array('remind' => 'true', 'use_stored' => 'true'))); ?>"><?php e(t('Remind')); ?></a> |
58 | 58 | <?php elseif ($s['optin'] == 0) : ?> |
59 | 59 | <?php e(t('Not opted in')); ?> |
@@ -32,9 +32,12 @@ |
||
32 | 32 | |
33 | 33 | <?php if (count($context->getSubscribers()) == 0) : ?> |
34 | 34 | <p><?php e(t('No subscribers added yet.')); ?></p> |
35 | -<?php else : ?> |
|
35 | +<?php else { |
|
36 | + : ?> |
|
36 | 37 | |
37 | - <?php echo $context->getSubscriber()->getDBQuery()->display('character'); ?> |
|
38 | + <?php echo $context->getSubscriber()->getDBQuery()->display('character'); |
|
39 | +} |
|
40 | +?> |
|
38 | 41 | <table class="stripe"> |
39 | 42 | <caption><?php e(t('Letters')); ?></caption> |
40 | 43 | <thead> |
@@ -68,7 +68,7 @@ |
||
68 | 68 | |
69 | 69 | |
70 | 70 | <div style="clear: both;"> |
71 | - <p><?php e(t('Either you are using this link')); ?> <strong><?php e('http://' . $context->getKernel()->setting->get('intranet', 'contact.login_url') . '/' .$context->getKernel()->intranet->get('identifier') . '/login'); ?></strong> <?php e(t('or you can write your own')); ?>:</p> |
|
71 | + <p><?php e(t('Either you are using this link')); ?> <strong><?php e('http://'.$context->getKernel()->setting->get('intranet', 'contact.login_url').'/'.$context->getKernel()->intranet->get('identifier').'/login'); ?></strong> <?php e(t('or you can write your own')); ?>:</p> |
|
72 | 72 | <label for="optin_link"><?php e(t('Link for the optin page')); ?></label><br /> |
73 | 73 | <input type="text" name="optin_link" value="<?php if (!empty($value['optin_link'])) { |
74 | 74 | e($value['optin_link']); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | </td> |
38 | 38 | <td class="buttons"> |
39 | 39 | <?php if ($letter['status'] != 'sent') : ?> |
40 | - <a href="<?php e(url($letter['id'] . '/send')); ?>"><?php e(t('Send')); ?></a> |
|
40 | + <a href="<?php e(url($letter['id'].'/send')); ?>"><?php e(t('Send')); ?></a> |
|
41 | 41 | <a class="edit" href="<?php e(url($letter['id'], array('edit'))); ?>"><?php e(t('Edit')); ?></a> |
42 | 42 | <a class="delete" href="<?php e(url($letter['id'], array('delete'))); ?>"><?php e(t('Delete')); ?></a> |
43 | 43 | <?php endif; ?> |
@@ -10,9 +10,12 @@ discard block |
||
10 | 10 | |
11 | 11 | <?php if (count($context->getLetters()) == 0) : ?> |
12 | 12 | <p><?php e(t('No letters has been created.')); ?></p> |
13 | -<?php else : ?> |
|
13 | +<?php else { |
|
14 | + : ?> |
|
14 | 15 | <table class="stripe"> |
15 | - <caption><?php e(t('Letters')); ?></caption> |
|
16 | + <caption><?php e(t('Letters')); |
|
17 | +} |
|
18 | +?></caption> |
|
16 | 19 | <thead> |
17 | 20 | <tr> |
18 | 21 | <th><?php e(t('Subject')); ?></th> |
@@ -30,8 +33,10 @@ discard block |
||
30 | 33 | <?php |
31 | 34 | if ($letter['status'] == 'sent') : |
32 | 35 | e($letter['sent_to_receivers']); |
33 | - else : |
|
36 | + else { |
|
37 | + : |
|
34 | 38 | e(t('Not sent')); |
39 | + } |
|
35 | 40 | endif; |
36 | 41 | ?> |
37 | 42 | </td> |
@@ -26,7 +26,7 @@ |
||
26 | 26 | </tr> |
27 | 27 | <tr> |
28 | 28 | <th><?php e(t('Email sender name')); ?></th> |
29 | - <td><?php e($value['sender_name']); ?> <?php echo htmlspecialchars('<' . $value['reply_email'] . '>'); ?></td> |
|
29 | + <td><?php e($value['sender_name']); ?> <?php echo htmlspecialchars('<'.$value['reply_email'].'>'); ?></td> |
|
30 | 30 | </tr> |
31 | 31 | <!-- |
32 | 32 | <tr> |
@@ -11,9 +11,9 @@ |
||
11 | 11 | <tbody> |
12 | 12 | <?php foreach ($lists as $list) : ?> |
13 | 13 | <tr> |
14 | - <td><a href="<?php e(url('lists/' . $list['list']->get('id'))); ?>"><?php e($list['list']->get('title')); ?></a></td> |
|
14 | + <td><a href="<?php e(url('lists/'.$list['list']->get('id'))); ?>"><?php e($list['list']->get('title')); ?></a></td> |
|
15 | 15 | <td class="options"> |
16 | - <a class="delete" href="<?php e(url('lists/' . $list['list']->get('id') . '/subscriber/' . $list['subscriber_id'], array('remove'))); ?>"><?php e(t('Remove')); ?></a> |
|
16 | + <a class="delete" href="<?php e(url('lists/'.$list['list']->get('id').'/subscriber/'.$list['subscriber_id'], array('remove'))); ?>"><?php e(t('Remove')); ?></a> |
|
17 | 17 | </td> |
18 | 18 | |
19 | 19 | </tr> |