Completed
Push — master ( 9d10c2...bf46e5 )
by Lars
05:14
created
src/Intraface/modules/modulepackage/Controller/Postform.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Intraface/modules/modulepackage/Controller/AddPackage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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!
Please login to merge, or discard this patch.
src/Intraface/modules/modulepackage/Controller/Index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         	'email_shared' => $email_shared
63 63
         );
64 64
 
65
-        $tpl = $this->template->create(dirname(__FILE__) . '/templates/index');
65
+        $tpl = $this->template->create(dirname(__FILE__).'/templates/index');
66 66
         return $tpl->render($this, $data);
67 67
     }
68 68
 
Please login to merge, or discard this patch.
src/Intraface/modules/modulepackage/ModulePackage.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
src/Intraface/modules/contact/ContactPerson.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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()) {
Please login to merge, or discard this patch.
src/Intraface/modules/contact/include_frontpage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     );
Please login to merge, or discard this patch.
src/Intraface/modules/contact/ContactReminder.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -199,9 +199,9 @@  discard block
 block discarded – undo
199 199
             throw new Exception("Was not able to convert date in ContactReminder->update");
200 200
         }
201 201
 
202
-        $sql = "reminder_date = ".$this->db->quote($date->get(), 'date')."," .
203
-                "date_changed = NOW()," .
204
-                "subject = ".$this->db->quote($input['subject'], 'text')."," .
202
+        $sql = "reminder_date = ".$this->db->quote($date->get(), 'date').",".
203
+                "date_changed = NOW(),".
204
+                "subject = ".$this->db->quote($input['subject'], 'text').",".
205 205
                 "description = ".$this->db->quote($input['description'], 'text')."";
206 206
 
207 207
         if ($this->error->isError()) {
@@ -212,17 +212,17 @@  discard block
 block discarded – undo
212 212
             $result = $this->db->exec("UPDATE contact_reminder_single SET ".$sql." WHERE intranet_id = ".$this->db->quote($this->contact->kernel->intranet->get('id'), 'integer')." AND id = ".$this->db->quote($this->id, 'integer'));
213 213
         } else {
214 214
             $result = $this->db->exec("INSERT INTO contact_reminder_single SET ".$sql.", ".
215
-                "intranet_id = ".$this->db->quote($this->contact->kernel->intranet->get('id'), 'integer')."," .
216
-                "contact_id = ".$this->db->quote($this->contact->get('id'), 'integer')."," .
217
-                "created_by_user_id = ".$this->db->quote($this->contact->kernel->user->get('id'), 'integer')."," .
218
-                "status_key = 1," .
219
-                "date_created = NOW()," .
215
+                "intranet_id = ".$this->db->quote($this->contact->kernel->intranet->get('id'), 'integer').",".
216
+                "contact_id = ".$this->db->quote($this->contact->get('id'), 'integer').",".
217
+                "created_by_user_id = ".$this->db->quote($this->contact->kernel->user->get('id'), 'integer').",".
218
+                "status_key = 1,".
219
+                "date_created = NOW(),".
220 220
                 "active = 1");
221 221
             $this->id = $this->db->lastInsertID();
222 222
         }
223 223
 
224 224
         if (PEAR::isError($result)) {
225
-            throw new Exception('Could not save information in ContactReminder->update' . $result->getUserInfo());
225
+            throw new Exception('Could not save information in ContactReminder->update'.$result->getUserInfo());
226 226
             return false;
227 227
         }
228 228
          return $this->id;
@@ -240,9 +240,9 @@  discard block
 block discarded – undo
240 240
         /**
241 241
          * @todo: validation needed - not crucial as we are setting the postpone date
242 242
          */
243
-        $result = $this->db->exec('UPDATE contact_reminder_single SET date_changed = NOW(), reminder_date = ' .$this->db->quote($date, 'date').' WHERE intranet_id = '.$this->db->quote($this->contact->kernel->intranet->get('id'), 'integer').' AND id = '.$this->db->quote($this->id, 'integer'));
243
+        $result = $this->db->exec('UPDATE contact_reminder_single SET date_changed = NOW(), reminder_date = '.$this->db->quote($date, 'date').' WHERE intranet_id = '.$this->db->quote($this->contact->kernel->intranet->get('id'), 'integer').' AND id = '.$this->db->quote($this->id, 'integer'));
244 244
         if (PEAR::isError($result)) {
245
-            throw new Exception('Could not postphone reminder' . $result->getUserInfo());
245
+            throw new Exception('Could not postphone reminder'.$result->getUserInfo());
246 246
             return false;
247 247
         }
248 248
          $this->load();
@@ -265,11 +265,11 @@  discard block
 block discarded – undo
265 265
 
266 266
         $db = MDB2::singleton(DB_DSN);
267 267
         //
268
-        $result = $db->query('SELECT contact_reminder_single.*, DATE_FORMAT(contact_reminder_single.reminder_date, "%d-%m-%Y") AS dk_reminder_date, address.name AS contact_name ' .
269
-                'FROM contact_reminder_single ' .
270
-                'INNER JOIN contact ON (contact_reminder_single.contact_id = contact.id AND contact.intranet_id = '.$db->quote($kernel->intranet->get('id'), 'integer') . ' AND contact.active = 1) '.
271
-                'LEFT JOIN address ON (address.belong_to_id = contact.id AND address.type = 3 AND address.active = 1) ' .
272
-                'WHERE contact_reminder_single.reminder_date < DATE_ADD(NOW(), INTERVAL 30 DAY) AND contact_reminder_single.intranet_id = ' .$db->quote($kernel->intranet->get('id'), 'integer').' AND contact_reminder_single.active = 1 AND contact_reminder_single.status_key = 1 ' .
268
+        $result = $db->query('SELECT contact_reminder_single.*, DATE_FORMAT(contact_reminder_single.reminder_date, "%d-%m-%Y") AS dk_reminder_date, address.name AS contact_name '.
269
+                'FROM contact_reminder_single '.
270
+                'INNER JOIN contact ON (contact_reminder_single.contact_id = contact.id AND contact.intranet_id = '.$db->quote($kernel->intranet->get('id'), 'integer').' AND contact.active = 1) '.
271
+                'LEFT JOIN address ON (address.belong_to_id = contact.id AND address.type = 3 AND address.active = 1) '.
272
+                'WHERE contact_reminder_single.reminder_date < DATE_ADD(NOW(), INTERVAL 30 DAY) AND contact_reminder_single.intranet_id = '.$db->quote($kernel->intranet->get('id'), 'integer').' AND contact_reminder_single.active = 1 AND contact_reminder_single.status_key = 1 '.
273 273
                 'ORDER BY contact_reminder_single.reminder_date ASC');
274 274
         if (PEAR::isError($result)) {
275 275
             die($result->getUserInfo());
@@ -292,9 +292,9 @@  discard block
 block discarded – undo
292 292
     {
293 293
         $status_key = array_search($status, $this->status_types);
294 294
 
295
-        $result = $this->db->exec('UPDATE contact_reminder_single SET date_changed = NOW(), status_key = ' .$this->db->quote($status_key, 'integer').' WHERE intranet_id = '.$this->db->quote($this->contact->kernel->intranet->get('id'), 'integer').' AND id = '.$this->db->quote($this->id, 'integer'));
295
+        $result = $this->db->exec('UPDATE contact_reminder_single SET date_changed = NOW(), status_key = '.$this->db->quote($status_key, 'integer').' WHERE intranet_id = '.$this->db->quote($this->contact->kernel->intranet->get('id'), 'integer').' AND id = '.$this->db->quote($this->id, 'integer'));
296 296
         if (PEAR::isError($result)) {
297
-            throw new Exception('Could not postphone reminder' . $result->getUserInfo());
297
+            throw new Exception('Could not postphone reminder'.$result->getUserInfo());
298 298
             return false;
299 299
         }
300 300
          $this->load();
Please login to merge, or discard this patch.
src/Intraface/modules/contact/Contact.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
  * @license
120 120
  *
121 121
  */
122
-require_once dirname(__FILE__) . '/ContactPerson.php';
122
+require_once dirname(__FILE__).'/ContactPerson.php';
123 123
 require_once 'Intraface/functions.php';
124 124
 
125 125
 class Contact extends Intraface_Standard
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
     {
387 387
         // HACK NECCESSARY FOR THE NEWSLETTERSUBSCRIBER
388 388
         $this->kernel->useModule('contact');
389
-        return ($this->value['login_url'] = 'http://' . $this->kernel->getSetting()->get('intranet', 'contact.login_url') . '/' .$this->kernel->intranet->get('identifier') . '/login?code='. $this->get('code'));
389
+        return ($this->value['login_url'] = 'http://'.$this->kernel->getSetting()->get('intranet', 'contact.login_url').'/'.$this->kernel->intranet->get('identifier').'/login?code='.$this->get('code'));
390 390
     }
391 391
 
392 392
     /**
@@ -556,16 +556,16 @@  discard block
 block discarded – undo
556 556
 
557 557
         // prepare sql to update or insert
558 558
         if ($this->id > 0) {
559
-            $sql="UPDATE contact ";
560
-            $sql_after=" WHERE id='".$this->id."'";
559
+            $sql = "UPDATE contact ";
560
+            $sql_after = " WHERE id='".$this->id."'";
561 561
             $sql_create = "";
562 562
         } else {
563
-            $sql="INSERT INTO contact ";
564
-            $sql_after = ", code='".safeToDb(md5(date('Y-m-d H:i:s') . $sql_items))."'";
563
+            $sql = "INSERT INTO contact ";
564
+            $sql_after = ", code='".safeToDb(md5(date('Y-m-d H:i:s').$sql_items))."'";
565 565
             $sql_create = "date_created = NOW(),";
566 566
         }
567 567
 
568
-        $sql .= " SET	".$sql_create. "
568
+        $sql .= " SET	".$sql_create."
569 569
             intranet_id = '". $this->kernel->intranet->get('id')."',"
570 570
             .$sql_items.
571 571
             "date_changed = NOW()
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
             // Delivery Address
596 596
         foreach ($address_fields as $key => $value) {
597 597
             if (array_key_exists('delivery_'.$value, $var)) {
598
-                $delivery_address_to_save[$value] = $var['delivery_' . $value];
598
+                $delivery_address_to_save[$value] = $var['delivery_'.$value];
599 599
             }
600 600
         }
601 601
 
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
             return false;
630 630
         }
631 631
         $db = new DB_Sql;
632
-        $db->query("UPDATE contact SET active = 0, date_changed = NOW() WHERE intranet_id = " . $this->kernel->intranet->get("id") . " AND id = " . $this->id);
632
+        $db->query("UPDATE contact SET active = 0, date_changed = NOW() WHERE intranet_id = ".$this->kernel->intranet->get("id")." AND id = ".$this->id);
633 633
         return true;
634 634
     }
635 635
 
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
             return false;
650 650
         }
651 651
         $db = new DB_Sql;
652
-        $db->query("UPDATE contact SET active = 1, date_changed = NOW() WHERE intranet_id = " . $this->kernel->intranet->get("id") . " AND id = " . $this->id);
652
+        $db->query("UPDATE contact SET active = 1, date_changed = NOW() WHERE intranet_id = ".$this->kernel->intranet->get("id")." AND id = ".$this->id);
653 653
 
654 654
         return true;
655 655
     }
@@ -667,9 +667,9 @@  discard block
 block discarded – undo
667 667
         $db = new DB_Sql();
668 668
         $sql = "SELECT id
669 669
             FROM contact
670
-            WHERE intranet_id = " . $this->kernel->intranet->get("id") . "
671
-                AND number = " . (int)$number . "
672
-                AND id <> " . $this->id . "
670
+            WHERE intranet_id = " . $this->kernel->intranet->get("id")."
671
+                AND number = " . (int)$number."
672
+                AND id <> " . $this->id."
673 673
                 AND active = 1
674 674
             LIMIT 1";
675 675
         $db->query($sql);
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
     public function getMaxNumber()
690 690
     {
691 691
         $db = new DB_Sql();
692
-        $db->query("SELECT number FROM contact WHERE intranet_id = " . $this->kernel->intranet->get("id") . " ORDER BY number DESC");
692
+        $db->query("SELECT number FROM contact WHERE intranet_id = ".$this->kernel->intranet->get("id")." ORDER BY number DESC");
693 693
         if (!$db->nextRecord()) {
694 694
             return 0;
695 695
         }
@@ -781,11 +781,11 @@  discard block
 block discarded – undo
781 781
                 WHERE address.type=3
782 782
                     AND contact.active = 1
783 783
                     AND address.active = 1
784
-                    AND contact.intranet_id = " . $db->quote($this->kernel->intranet->get('id'), 'integer') . "
785
-                    AND contact.id != " . $db->quote($this->id, 'integer') . "
784
+                    AND contact.intranet_id = " . $db->quote($this->kernel->intranet->get('id'), 'integer')."
785
+                    AND contact.id != " . $db->quote($this->id, 'integer')."
786 786
                     AND (
787
-                        (address.email = " . $db->quote($this->address->get('email'), 'text') . " AND address.email != '')
788
-                        OR (address.phone = " . $db->quote($this->address->get('phone'), 'text') . " AND address.phone != ''))
787
+                        (address.email = " . $db->quote($this->address->get('email'), 'text')." AND address.email != '')
788
+                        OR (address.phone = " . $db->quote($this->address->get('phone'), 'text')." AND address.phone != ''))
789 789
 
790 790
                     ";
791 791
 
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
     function isFilledIn()
875 875
     {
876 876
         $db = new DB_Sql;
877
-        $db->query("SELECT count(*) AS antal FROM contact WHERE intranet_id = " . $this->kernel->intranet->get('id'));
877
+        $db->query("SELECT count(*) AS antal FROM contact WHERE intranet_id = ".$this->kernel->intranet->get('id'));
878 878
         if ($db->nextRecord()) {
879 879
             return $db->f('antal');
880 880
         }
@@ -892,7 +892,7 @@  discard block
 block discarded – undo
892 892
             return false;
893 893
         }
894 894
         $db = new DB_Sql;
895
-        $db->query("UPDATE contact SET code = '".md5($this->id . date('Y-m-d H:i:s') . $this->kernel->intranet->get('id'))."' WHERE id = " . $this->id);
895
+        $db->query("UPDATE contact SET code = '".md5($this->id.date('Y-m-d H:i:s').$this->kernel->intranet->get('id'))."' WHERE id = ".$this->id);
896 896
         $this->load();
897 897
         return true;
898 898
     }
@@ -909,7 +909,7 @@  discard block
 block discarded – undo
909 909
             return false;
910 910
         }
911 911
         $db = new DB_Sql;
912
-        $db->query("UPDATE contact SET password = '".md5($this->id . date('Y-m-d H:i:s') . $this->kernel->intranet->get('id'))."' WHERE id = " . $this->id);
912
+        $db->query("UPDATE contact SET password = '".md5($this->id.date('Y-m-d H:i:s').$this->kernel->intranet->get('id'))."' WHERE id = ".$this->id);
913 913
         $this->load();
914 914
         return true;
915 915
     }
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
     function getNewsletterSubscriptions()
923 923
     {
924 924
         $db = new DB_Sql;
925
-        $db->query("SELECT * FROM newsletter_subscriber WHERE optin = 1 AND active = 1 AND contact_id = " . $this->id . " AND intranet_id =" . $this->kernel->intranet->get('id'));
925
+        $db->query("SELECT * FROM newsletter_subscriber WHERE optin = 1 AND active = 1 AND contact_id = ".$this->id." AND intranet_id =".$this->kernel->intranet->get('id'));
926 926
         $lists = array();
927 927
         while ($db->nextRecord()) {
928 928
             $lists[] = $db->f('list_id');
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
     function needNewsletterOptin()
939 939
     {
940 940
         $db = new DB_Sql;
941
-        $db->query("SELECT list_id, code FROM newsletter_subscriber WHERE optin = 0 AND contact_id = " . $this->id . " AND intranet_id =" . $this->kernel->intranet->get('id'));
941
+        $db->query("SELECT list_id, code FROM newsletter_subscriber WHERE optin = 0 AND contact_id = ".$this->id." AND intranet_id =".$this->kernel->intranet->get('id'));
942 942
         $lists = array();
943 943
         $i = 0;
944 944
         while ($db->nextRecord()) {
@@ -959,7 +959,7 @@  discard block
 block discarded – undo
959 959
     function canBeDeleted()
960 960
     {
961 961
         $db = new DB_Sql;
962
-        $db->query("SELECT * FROM debtor WHERE contact_id = " . $this->id . " AND intranet_id = " . $this->kernel->intranet->get('id'));
962
+        $db->query("SELECT * FROM debtor WHERE contact_id = ".$this->id." AND intranet_id = ".$this->kernel->intranet->get('id'));
963 963
         if (!$db->nextRecord()) {
964 964
             return true;
965 965
         }
Please login to merge, or discard this patch.
src/Intraface/modules/contact/PdfLabel.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,18 +57,18 @@  discard block
 block discarded – undo
57 57
         }
58 58
         
59 59
         if (is_array($keywords) && count($keywords) > 0) {
60
-            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing') * $line, $this->get('font_size'), "Nøgleord: ".implode(", ", $keywords));
60
+            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing')*$line, $this->get('font_size'), "Nøgleord: ".implode(", ", $keywords));
61 61
             $line++;
62 62
         }
63 63
         
64
-        $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing') * $line, $this->get('font_size'), "Antal labels i søgning: ".count($contacts));
64
+        $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing')*$line, $this->get('font_size'), "Antal labels i søgning: ".count($contacts));
65 65
         
66 66
         // The contacts on labels
67 67
         
68 68
         for ($i = 0, $max = count($contacts); $i < $max; $i++) {
69 69
             // TODO -- hvorfor bruger vi ikke antallet af labels til at vide, hvorn�r
70 70
             // vi skifter linje? Vi kender faktisk ikke antallet af labels i en r�kke. Det kunne vi selvf�lgelig komme til
71
-            if ($this->get('x') + $this->label_width  > $this->get('right_margin_position')) {
71
+            if ($this->get('x') + $this->label_width > $this->get('right_margin_position')) {
72 72
                 // For enden af linjen, ny linje
73 73
                 $this->setY("-".$this->label_height);
74 74
                 $this->setX(0);
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
             $address_lines = explode("\n", $contacts[$i]['address']['address']);
92 92
             foreach ($address_lines as $l) {
93 93
                 if (trim($l) != "") {
94
-                    $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing') * $line, $this->get('font_size'), $l);
94
+                    $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing')*$line, $this->get('font_size'), $l);
95 95
                     $line++;
96 96
                 }
97 97
             }
98
-            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing') * $line, $this->get('font_size'), $contacts[$i]['address']['postcode']." ".$contacts[$i]['address']['city']);
98
+            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing')*$line, $this->get('font_size'), $contacts[$i]['address']['postcode']." ".$contacts[$i]['address']['city']);
99 99
             $line++;
100
-            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing') * $line, $this->get('font_size'), $contacts[$i]['address']['country']);
100
+            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing')*$line, $this->get('font_size'), $contacts[$i]['address']['country']);
101 101
         }
102 102
     }
103 103
 }
Please login to merge, or discard this patch.