@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | $webshop_module = $this->getKernel()->module('cms'); |
16 | 16 | |
17 | - $this->document->setTitle('Navigation for ' . $this->getSite()->get('name')); |
|
17 | + $this->document->setTitle('Navigation for '.$this->getSite()->get('name')); |
|
18 | 18 | |
19 | 19 | $data['categories'] = $this->getNavigationGateway()->findBySite($this->getSite()); |
20 | 20 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $element['extra_style'] = ' style="'.$element['extra_style'].'"'; |
40 | 40 | } |
41 | 41 | |
42 | - $function = 'parse'.$element['type'] . 'Element'; |
|
42 | + $function = 'parse'.$element['type'].'Element'; |
|
43 | 43 | $output = $this->$function($element); |
44 | 44 | |
45 | 45 | $display .= '<div id="element-'.$element['id'].'"'.$element['extra_class'].$element['extra_style'].'>'; |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | } else { |
58 | 58 | $display .= ' <li><a href="'.$_SERVER['PHP_SELF'].'?action=move&element_id='.$element['id'].'&id='.$element['section_id'].'">'.$this->translation->get('move').'</a></li>'; |
59 | 59 | } |
60 | - $display .= ' <li><a class="confirm" href="' . $_SERVER['PHP_SELF'] . '?delete='.$element['id'].'">'.$this->translation->get('delete').'</a></li>'; |
|
60 | + $display .= ' <li><a class="confirm" href="'.$_SERVER['PHP_SELF'].'?delete='.$element['id'].'">'.$this->translation->get('delete').'</a></li>'; |
|
61 | 61 | $display .= ' </ul>'; |
62 | - $display .= '<div>' . $output . '</div>'; |
|
62 | + $display .= '<div>'.$output.'</div>'; |
|
63 | 63 | $display .= '</div>'; |
64 | 64 | } |
65 | 65 | return $display; |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | function getAllUnsubscribersForList($list) |
18 | 18 | { |
19 | - $this->dbquery = new Intraface_DBQuery($list->kernel, "newsletter_subscriber", "newsletter_subscriber.list_id=". $list->get('id') . " AND newsletter_subscriber.intranet_id = " . $list->kernel->intranet->get('id')); |
|
19 | + $this->dbquery = new Intraface_DBQuery($list->kernel, "newsletter_subscriber", "newsletter_subscriber.list_id=".$list->get('id')." AND newsletter_subscriber.intranet_id = ".$list->kernel->intranet->get('id')); |
|
20 | 20 | $this->dbquery->setJoin("LEFT", "contact", "newsletter_subscriber.contact_id = contact.id AND contact.intranet_id = ".$list->kernel->intranet->get("id"), ''); |
21 | 21 | $this->dbquery->setJoin("LEFT", "address", "address.belong_to_id = contact.id AND address.active = 1 AND address.type = 3", ''); |
22 | 22 | $this->dbquery->setFilter('optin', 1); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | function getByContactId($list, $id) |
32 | 32 | { |
33 | - $this->dbquery = new Intraface_DBQuery($list->kernel, "newsletter_subscriber", "newsletter_subscriber.list_id=". $list->get('id') . " AND newsletter_subscriber.intranet_id = " . $list->kernel->intranet->get('id')); |
|
33 | + $this->dbquery = new Intraface_DBQuery($list->kernel, "newsletter_subscriber", "newsletter_subscriber.list_id=".$list->get('id')." AND newsletter_subscriber.intranet_id = ".$list->kernel->intranet->get('id')); |
|
34 | 34 | $this->dbquery->setFilter('contact_id', $id); |
35 | 35 | $this->getDBQuery()->setCondition('newsletter_subscriber.contact_id = '.$this->getDBQuery()->getFilter('contact_id')); |
36 | 36 | |
@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | { |
42 | 42 | // @todo - make sure to delete old ones |
43 | 43 | $db = MDB2::singleton(); |
44 | - $db->query('UPDATE newsletter_subscriber SET contact_id = ' . $new_id . ' WHERE contact_id = ' . $old_id); |
|
44 | + $db->query('UPDATE newsletter_subscriber SET contact_id = '.$new_id.' WHERE contact_id = '.$old_id); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | public function findCountByContactId($contact_id) |
48 | 48 | { |
49 | 49 | $sql = "SELECT id |
50 | 50 | FROM newsletter_subscriber |
51 | - WHERE intranet_id = " . $this->kernel->intranet->get("id") . " |
|
51 | + WHERE intranet_id = " . $this->kernel->intranet->get("id")." |
|
52 | 52 | AND contact_id = ".(int)$contact_id." |
53 | 53 | AND active = 1"; |
54 | 54 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $code = strip_tags($code); |
66 | 66 | |
67 | 67 | $db = new DB_Sql; |
68 | - $db->query("SELECT id, list_id FROM newsletter_subscriber WHERE code = '".$code."' AND intranet_id = " . $this->kernel->intranet->get('id')." and active = 1"); |
|
68 | + $db->query("SELECT id, list_id FROM newsletter_subscriber WHERE code = '".$code."' AND intranet_id = ".$this->kernel->intranet->get('id')." and active = 1"); |
|
69 | 69 | if (!$db->nextRecord()) { |
70 | 70 | return false; |
71 | 71 | } |
@@ -84,8 +84,8 @@ discard block |
||
84 | 84 | LEFT JOIN address |
85 | 85 | ON address.belong_to_id = contact.id |
86 | 86 | WHERE address.email = '".$email."' |
87 | - AND newsletter_subscriber.list_id = " . $list->get('id') . " |
|
88 | - AND newsletter_subscriber.intranet_id = " . $this->kernel->intranet->get('id') . " |
|
87 | + AND newsletter_subscriber.list_id = " . $list->get('id')." |
|
88 | + AND newsletter_subscriber.intranet_id = " . $this->kernel->intranet->get('id')." |
|
89 | 89 | AND newsletter_subscriber.active = 1 |
90 | 90 | AND contact.active = 1"); |
91 | 91 | if (!$db->nextRecord()) { |
@@ -16,7 +16,7 @@ |
||
16 | 16 | function findByContactId($contact_id) |
17 | 17 | { |
18 | 18 | $db = new DB_Sql; |
19 | - $db->query('SELECT * FROM newsletter_subscriber WHERE contact_id = ' . $contact_id); |
|
19 | + $db->query('SELECT * FROM newsletter_subscriber WHERE contact_id = '.$contact_id); |
|
20 | 20 | $lists = array(); |
21 | 21 | while ($db->nextRecord()) { |
22 | 22 | $lists[$db->f('list_id')]['list'] = $this->findById($db->f('list_id')); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $data = array( |
72 | 72 | 'subject' => 'Bekræft tilmelding', |
73 | 73 | 'body' => |
74 | - $this->list->get('subscribe_message') . "\n\n" . |
|
74 | + $this->list->get('subscribe_message')."\n\n". |
|
75 | 75 | "\n\nMed venlig hilsen\n".$this->list->get('sender_name'), |
76 | 76 | 'contact_id' => $subscriber->get('contact_id'), |
77 | 77 | 'from_email' => $this->list->get('reply_email'), |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | if ($email->queue()) { |
88 | 88 | $db = new DB_Sql; |
89 | - $db->query("UPDATE newsletter_subscriber SET date_optin_email_sent = NOW() WHERE id = " . $subscriber->get('id')); |
|
89 | + $db->query("UPDATE newsletter_subscriber SET date_optin_email_sent = NOW() WHERE id = ".$subscriber->get('id')); |
|
90 | 90 | return true; |
91 | 91 | } |
92 | 92 |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | { |
52 | 52 | $db = new DB_Sql; |
53 | 53 | $db2 = new DB_Sql; |
54 | - $db->query("SELECT * FROM newsletter_list WHERE active = 1 AND id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id')); |
|
54 | + $db->query("SELECT * FROM newsletter_list WHERE active = 1 AND id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id')); |
|
55 | 55 | if (!$db->nextRecord()) { |
56 | 56 | return false; |
57 | 57 | } |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | $db2->query("SELECT * |
76 | 76 | FROM newsletter_subscriber |
77 | 77 | INNER JOIN contact ON newsletter_subscriber.contact_id = contact.id |
78 | - WHERE list_id = " . $db->f('id') . " |
|
79 | - AND newsletter_subscriber.intranet_id = " . $this->kernel->intranet->get('id') . " |
|
78 | + WHERE list_id = " . $db->f('id')." |
|
79 | + AND newsletter_subscriber.intranet_id = " . $this->kernel->intranet->get('id')." |
|
80 | 80 | AND optin = 1 |
81 | 81 | AND contact.active = 1 |
82 | 82 | AND newsletter_subscriber.active = 1"); |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | // subscribe_option_key = ".$var['subscribe_option_key'].", |
167 | 167 | |
168 | 168 | if ($this->id > 0) { |
169 | - $db->query("UPDATE newsletter_list SET ".$sql.", date_changed = NOW() WHERE id = " . $this->id); |
|
169 | + $db->query("UPDATE newsletter_list SET ".$sql.", date_changed = NOW() WHERE id = ".$this->id); |
|
170 | 170 | } else { |
171 | - $db->query("INSERT INTO newsletter_list SET ".$sql.", intranet_id = " . $this->kernel->intranet->get('id').", date_created = NOW(), date_changed = NOW()"); |
|
171 | + $db->query("INSERT INTO newsletter_list SET ".$sql.", intranet_id = ".$this->kernel->intranet->get('id').", date_created = NOW(), date_changed = NOW()"); |
|
172 | 172 | $this->id = $db->insertedId(); |
173 | 173 | } |
174 | 174 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | function delete() |
186 | 186 | { |
187 | 187 | $db = new DB_Sql; |
188 | - $db->query("UPDATE newsletter_list SET active = 0 WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id')); |
|
188 | + $db->query("UPDATE newsletter_list SET active = 0 WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id')); |
|
189 | 189 | return true; |
190 | 190 | } |
191 | 191 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | function doesListExist() |
198 | 198 | { |
199 | 199 | $db = new DB_Sql; |
200 | - $db->query("SELECT id FROM newsletter_list WHERE id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id')); |
|
200 | + $db->query("SELECT id FROM newsletter_list WHERE id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id')); |
|
201 | 201 | return ($db->numRows() > 0); |
202 | 202 | } |
203 | 203 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | $db = new DB_Sql; |
213 | 213 | $db2 = new DB_Sql; |
214 | 214 | $i = 0; |
215 | - $db->query("SELECT * FROM newsletter_list WHERE intranet_id = " . $this->kernel->intranet->get('id')." AND active = 1"); |
|
215 | + $db->query("SELECT * FROM newsletter_list WHERE intranet_id = ".$this->kernel->intranet->get('id')." AND active = 1"); |
|
216 | 216 | while ($db->nextRecord()) { |
217 | 217 | $list = new Newsletterlist($this->kernel, $db->f('id')); |
218 | 218 | $lists[$i]['id'] = $db->f('id'); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | { |
22 | 22 | $module = $this->getKernel()->module("newsletter"); |
23 | 23 | |
24 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/letter'); |
|
24 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/letter'); |
|
25 | 25 | return $smarty->render($this); |
26 | 26 | } |
27 | 27 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | $module = $this->getKernel()->module("newsletter"); |
68 | 68 | |
69 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/letter-edit'); |
|
69 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/letter-edit'); |
|
70 | 70 | return $smarty->render($this); |
71 | 71 | } |
72 | 72 |
@@ -19,13 +19,13 @@ |
||
19 | 19 | { |
20 | 20 | $module = $this->getKernel()->module("newsletter"); |
21 | 21 | |
22 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/lists'); |
|
22 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/lists'); |
|
23 | 23 | return $smarty->render($this); |
24 | 24 | } |
25 | 25 | |
26 | 26 | function renderHtmlCreate() |
27 | 27 | { |
28 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/list-edit'); |
|
28 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/list-edit'); |
|
29 | 29 | return $smarty->render($this); |
30 | 30 | } |
31 | 31 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | |
11 | 11 | function renderHtml() |
12 | 12 | { |
13 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/log'); |
|
13 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/log'); |
|
14 | 14 | return $smarty->render($this); |
15 | 15 | } |
16 | 16 |