@@ -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()) { |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | |
| 287 | 287 | // If the number of contacts can be divided evenly into 40 there will be no more params here. |
| 288 | 288 | if (count($params) > 0) { |
| 289 | - $result = $db->exec($sql . implode($params, ',')); |
|
| 289 | + $result = $db->exec($sql . implode($params, ',')); |
|
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | if (PEAR::isError($result)) { |
@@ -72,14 +72,14 @@ |
||
| 72 | 72 | |
| 73 | 73 | function postForm() |
| 74 | 74 | { |
| 75 | - $module = $this->getKernel()->module("newsletter"); |
|
| 75 | + $module = $this->getKernel()->module("newsletter"); |
|
| 76 | 76 | $letter = new Newsletter($this->getList(), $this->name()); |
| 77 | 77 | |
| 78 | - if ($id = $letter->save($_POST)) { |
|
| 79 | - return new k_SeeOther($this->url(null)); |
|
| 80 | - } else { |
|
| 81 | - $value = $_POST; |
|
| 82 | - } |
|
| 83 | - return $this->render(); |
|
| 78 | + if ($id = $letter->save($_POST)) { |
|
| 79 | + return new k_SeeOther($this->url(null)); |
|
| 80 | + } else { |
|
| 81 | + $value = $_POST; |
|
| 82 | + } |
|
| 83 | + return $this->render(); |
|
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | \ No newline at end of file |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | if ($name == 'subscribers') { |
| 9 | 9 | return 'Intraface_modules_newsletter_Controller_Subscribers'; |
| 10 | 10 | } elseif ($name == 'letters') { |
| 11 | - return 'Intraface_modules_newsletter_Controller_Letters'; |
|
| 11 | + return 'Intraface_modules_newsletter_Controller_Letters'; |
|
| 12 | 12 | } elseif ($name == 'log') { |
| 13 | 13 | return 'Intraface_modules_newsletter_Controller_Log'; |
| 14 | 14 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | function DELETE() |
| 45 | 45 | { |
| 46 | - return $this->getList()->delete(); |
|
| 46 | + return $this->getList()->delete(); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | function renderHtmlEdit() |
@@ -38,15 +38,15 @@ |
||
| 38 | 38 | |
| 39 | 39 | function postForm() |
| 40 | 40 | { |
| 41 | - $module = $this->getKernel()->module("newsletter"); |
|
| 41 | + $module = $this->getKernel()->module("newsletter"); |
|
| 42 | 42 | $letter = new Newsletter($this->getList()); |
| 43 | 43 | |
| 44 | - if ($id = $letter->save($_POST)) { |
|
| 45 | - return new k_SeeOther($this->url($id)); |
|
| 46 | - } else { |
|
| 47 | - $value = $_POST; |
|
| 48 | - } |
|
| 49 | - return $this->render(); |
|
| 44 | + if ($id = $letter->save($_POST)) { |
|
| 45 | + return new k_SeeOther($this->url($id)); |
|
| 46 | + } else { |
|
| 47 | + $value = $_POST; |
|
| 48 | + } |
|
| 49 | + return $this->render(); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | function getKernel() |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | if ($this->query('remind') == 'true') { |
| 7 | 7 | $subscriber = new NewsletterSubscriber($this->context->getList(), intval($this->name())); |
| 8 | 8 | if (!$subscriber->sendOptInEmail()) { |
| 9 | - throw new Exception('Could not send the optin e-mail'); |
|
| 9 | + throw new Exception('Could not send the optin e-mail'); |
|
| 10 | 10 | } |
| 11 | 11 | return new k_SeeOther($this->url(null, array('flare' => 'Reminder e-mail sent'))); |
| 12 | 12 | } |
@@ -194,6 +194,6 @@ |
||
| 194 | 194 | |
| 195 | 195 | function getId() |
| 196 | 196 | {
|
| 197 | - return $this->id; |
|
| 197 | + return $this->id; |
|
| 198 | 198 | } |
| 199 | 199 | } |
@@ -271,11 +271,11 @@ |
||
| 271 | 271 | * @return array |
| 272 | 272 | */ |
| 273 | 273 | |
| 274 | - function getList($filter = '') |
|
| 275 | - {
|
|
| 274 | + function getList($filter = '') |
|
| 275 | + {
|
|
| 276 | 276 | $gateway = new Intraface_modules_accounting_VoucherGateway($this->year); |
| 277 | 277 | return $gateway->getList($filter); |
| 278 | - } |
|
| 278 | + } |
|
| 279 | 279 | |
| 280 | 280 | /** |
| 281 | 281 | * States voucher |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | public function findFromId($id) |
| 27 | 27 | { |
| 28 | 28 | require_once dirname (__FILE__) . '/Voucher.php'; |
| 29 | - return new Voucher($this->year, $id); |
|
| 29 | + return new Voucher($this->year, $id); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | /** |
| 52 | 52 | * @return (array) |
| 53 | 53 | */ |
| 54 | - function getList($filter = '') |
|
| 55 | - { |
|
| 54 | + function getList($filter = '') |
|
| 55 | + { |
|
| 56 | 56 | $sql = "SELECT *, DATE_FORMAT(voucher.date, '%d-%m-%Y') AS date_dk |
| 57 | 57 | FROM accounting_voucher voucher |
| 58 | 58 | WHERE voucher.active = 1 AND voucher.year_id = ".$this->year->get('id')." |
@@ -61,13 +61,13 @@ discard block |
||
| 61 | 61 | switch ($filter) { |
| 62 | 62 | case 'lastfive': |
| 63 | 63 | $sql .= " ORDER BY voucher.number DESC, voucher.id DESC LIMIT 5"; |
| 64 | - break; |
|
| 64 | + break; |
|
| 65 | 65 | default: |
| 66 | 66 | $sql .= " ORDER BY voucher.number DESC, voucher.id DESC"; |
| 67 | 67 | break; |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - $db = new Db_Sql; |
|
| 70 | + $db = new Db_Sql; |
|
| 71 | 71 | |
| 72 | 72 | $db->query($sql); |
| 73 | 73 | |
@@ -83,19 +83,19 @@ discard block |
||
| 83 | 83 | $i++; |
| 84 | 84 | } |
| 85 | 85 | return $list; |
| 86 | - } |
|
| 86 | + } |
|
| 87 | 87 | |
| 88 | - function getMaxNumber() |
|
| 89 | - { |
|
| 90 | - $db = new DB_Sql; |
|
| 88 | + function getMaxNumber() |
|
| 89 | + { |
|
| 90 | + $db = new DB_Sql; |
|
| 91 | 91 | |
| 92 | - $db->query("SELECT MAX(number) AS max_voucher_number |
|
| 92 | + $db->query("SELECT MAX(number) AS max_voucher_number |
|
| 93 | 93 | FROM accounting_voucher |
| 94 | 94 | WHERE intranet_id = " . $this->year->kernel->intranet->get('id') . " |
| 95 | 95 | AND year_id = " . $this->year->get('id')); |
| 96 | - if (!$db->nextRecord()) { |
|
| 97 | - return 0; |
|
| 98 | - } |
|
| 99 | - return $db->f('max_voucher_number'); |
|
| 100 | - } |
|
| 96 | + if (!$db->nextRecord()) { |
|
| 97 | + return 0; |
|
| 98 | + } |
|
| 99 | + return $db->f('max_voucher_number'); |
|
| 100 | + } |
|
| 101 | 101 | } |
| 102 | 102 | \ No newline at end of file |
@@ -26,10 +26,10 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | function __construct($year) |
| 28 | 28 | { |
| 29 | - $this->year = $year; |
|
| 29 | + $this->year = $year; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - /** |
|
| 32 | + /** |
|
| 33 | 33 | * Denne funktion bruges bl.a. under bogf�ringen, s� man bare taster kontonummer |
| 34 | 34 | * og s� s�ttes den rigtige konto. |
| 35 | 35 | * |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | function findById($id) |
| 76 | 76 | { |
| 77 | 77 | require_once dirname (__FILE__) . '/Account.php'; |
| 78 | - return new Account($this->year, $id); |
|
| 78 | + return new Account($this->year, $id); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | function findByType($type, $saldo = false) |