Completed
Pull Request — master (#26)
by Lars
10:03
created
src/Intraface/modules/newsletter/Controller/templates/subscribers.tpl.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@
 block discarded – undo
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')); ?>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,9 +32,12 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/templates/list-edit.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
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']);
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/templates/letters.tpl.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
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; ?>
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,9 +10,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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>
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/templates/list.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/templates/contact-lists.tpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/templates/send.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     <fieldset>
17 17
         <legend><?php e(t('Body text')); ?></legend>
18 18
         <div>
19
-        <pre><?php e(wordwrap($context->getLetter()->get('text') . "\n\n" . $context->getLetter()->list->get('unsubscribe')), 72); ?></pre>
19
+        <pre><?php e(wordwrap($context->getLetter()->get('text')."\n\n".$context->getLetter()->list->get('unsubscribe')), 72); ?></pre>
20 20
     </div>
21 21
     </fieldset>
22 22
   <div>
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/Subscribers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 
89 89
         }*/
90 90
 
91
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/subscribers');
91
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/subscribers');
92 92
         return $smarty->render($this);
93 93
     }
94 94
 
Please login to merge, or discard this patch.
src/Intraface/modules/newsletter/Controller/Send.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     {
13 13
         $module = $this->getKernel()->module("newsletter");
14 14
 
15
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/send');
15
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/send');
16 16
         return $smarty->render($this);
17 17
     }
18 18
 
Please login to merge, or discard this patch.
src/Intraface/modules/accounting/AccountGateway.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 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
      *
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     function findById($id)
76 76
     {
77
-        require_once dirname(__FILE__) . '/Account.php';
77
+        require_once dirname(__FILE__).'/Account.php';
78 78
         return new Account($this->year, $id);
79 79
     }
80 80
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         $db = new DB_Sql;
188 188
         $sql = "SELECT id
189 189
             FROM accounting_account
190
-            WHERE intranet_id = " . $this->year->kernel->intranet->get("id") . " AND year_id = ".$this->year->get('id')." AND active = 1";
190
+            WHERE intranet_id = " . $this->year->kernel->intranet->get("id")." AND year_id = ".$this->year->get('id')." AND active = 1";
191 191
         $db->query($sql);
192 192
 
193 193
         return $db->numRows();
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     /**
66 66
      * @deprecated
67 67
      * @param $id
68
-     * @return unknown_type
68
+     * @return Account
69 69
      */
70 70
     function findFromId($id)
71 71
     {
@@ -78,6 +78,9 @@  discard block
 block discarded – undo
78 78
         return new Account($this->year, $id);
79 79
     }
80 80
 
81
+    /**
82
+     * @param string $type
83
+     */
81 84
     function findByType($type, $saldo = false)
82 85
     {
83 86
         return $this->getList($type, $saldo);
Please login to merge, or discard this patch.