Completed
Branch master (6ed6e7)
by Lars
07:57
created
src/Intraface/modules/currency/Controller/Add.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
         $tpl = $this->template->create('Intraface/modules/currency/Controller/tpl/add');
24 24
 
25
-        return $this->getError()->view() . $tpl->render($this, $data);
25
+        return $this->getError()->view().$tpl->render($this, $data);
26 26
     }
27 27
 
28 28
     function postForm()
Please login to merge, or discard this patch.
src/Intraface/modules/language/Languages.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
 
19 19
     function getTypeKey()
20 20
     {
21
-    	return $this->type_key;
21
+        return $this->type_key;
22 22
     }
23 23
 
24 24
     function getChosen()
25 25
     {
26
-    	return Doctrine::getTable('Intraface_modules_language_Languages')->findByIntranetId($GLOBALS['intraface_doctrine_intranet_id']);
26
+        return Doctrine::getTable('Intraface_modules_language_Languages')->findByIntranetId($GLOBALS['intraface_doctrine_intranet_id']);
27 27
     }
28 28
 
29 29
     function getChosenAsArray()
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
         $langs = array();
32 32
         $gateway = new Intraface_modules_language_Gateway;
33 33
 
34
-    	foreach ($this->getChosen() as $lang) {
34
+        foreach ($this->getChosen() as $lang) {
35 35
             $langs[$lang->type_key] = $gateway->getByKey($lang->type_key);
36
-    	}
36
+        }
37 37
 
38 38
         return $langs;
39 39
     }
40 40
 
41 41
     function flush()
42 42
     {
43
-    	$q = Doctrine_Query::create();
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
 }
51 51
\ No newline at end of file
Please login to merge, or discard this patch.
src/Intraface/modules/language/Controller/Index.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@
 block discarded – undo
28 28
         $languages = new Intraface_modules_language_Languages;
29 29
         $languages->flush();
30 30
         if ($this->body('language')) {
31
-        	foreach ($this->body('language') as $key) {
31
+            foreach ($this->body('language') as $key) {
32 32
                 $languages = new Intraface_modules_language_Languages;
33 33
                 $languages->type_key = $key;
34 34
                 $languages->save();
35
-        	}
35
+            }
36 36
         }
37 37
         return new k_SeeOther($this->url());
38 38
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
         $data = array('languages' => $gateway->getAll(), 'chosen' => $chosen);
21 21
 
22
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/languages');
22
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/languages');
23 23
         return $tpl->render($this, $data);
24 24
     }
25 25
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     function wrapHtml($content)
41 41
     {
42
-        $tpl = $this->template->create(dirname(__FILE__) . '/tpl/content');
42
+        $tpl = $this->template->create(dirname(__FILE__).'/tpl/content');
43 43
         return $tpl->render($this, array('content' => $content));
44 44
     }
45 45
 
Please login to merge, or discard this patch.
src/Intraface/modules/contact/MainContact.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         $this->addPreloadFile('Contact.php');
22 22
         $this->addPreloadFile('ContactMessage.php'); // kan m�ske slettes
23 23
         $this->addPreloadFile('ContactPerson.php');
24
-         $this->addPreloadFile('ContactReminder.php');
24
+            $this->addPreloadFile('ContactReminder.php');
25 25
 
26 26
         $this->addRequiredShared('email');
27 27
         $this->addRequiredShared('keyword');
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         // settings
42 42
         // paymentconditions in days
43
-         $this->includeSettingFile('settings.php');
43
+            $this->includeSettingFile('settings.php');
44 44
 
45 45
         $this->addSetting('paymentcondition', array(0, 8, 14, 30));
46 46
         $this->addSetting('type',
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             )
51 51
         );
52 52
 
53
-         $this->addSetting('contact_login_url', array(
53
+            $this->addSetting('contact_login_url', array(
54 54
             0 => 'kundelogin.dk',
55 55
             1 => 'medlemslogin.dk'
56 56
         ));
Please login to merge, or discard this patch.
src/Intraface/modules/contact/PdfLabel.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
         parent::__construct();
13 13
         $this->setValue('font_size', 10);
14 14
         
15
-        switch($label_type) {
15
+        switch ($label_type) {
16 16
             case 1:
17 17
                 // 2x8 labels pr. ark
18 18
                 $this->setValue('margin_top', 0); // x/2,83 = mm
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         
51 51
         // Search info on first label
52
-        $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top , $this->get('font_size'), "<b>Søgning</b>");
52
+        $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top, $this->get('font_size'), "<b>Søgning</b>");
53 53
         $line = 1;
54 54
         if ($search != "") {
55 55
             $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing'), $this->get('font_size'), "Søgetekst: ".$search);
@@ -57,11 +57,11 @@  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
         
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             
71 71
             // TODO -- hvorfor bruger vi ikke antallet af labels til at vide, hvorn�r
72 72
             // vi skifter linje? Vi kender faktisk ikke antallet af labels i en r�kke. Det kunne vi selvf�lgelig komme til
73
-            if ($this->get('x') + $this->label_width  > $this->get('right_margin_position')) {
73
+            if ($this->get('x') + $this->label_width > $this->get('right_margin_position')) {
74 74
                 // For enden af linjen, ny linje
75 75
                 $this->setY("-".$this->label_height);
76 76
                 $this->setX(0);
@@ -89,19 +89,19 @@  discard block
 block discarded – undo
89 89
                 $this->setY(0);
90 90
             }
91 91
         
92
-            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top , $this->get('font_size'), "<b>".$contacts[$i]['number']."</b>");
92
+            $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top, $this->get('font_size'), "<b>".$contacts[$i]['number']."</b>");
93 93
             $this->addText($this->get('x') + $this->label_padding_left, $this->get('y') - $this->label_padding_top - $this->get('font_spacing'), $this->get('font_size'), "<b>".$contacts[$i]['name']."</b>");
94 94
             $line = 2;
95 95
             $address_lines = explode("\n", $contacts[$i]['address']['address']);
96 96
             foreach ($address_lines AS $l) {
97 97
                 if (trim($l) != "") {
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'), $l);
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'), $l);
99 99
                     $line++;
100 100
                 }
101 101
             }
102
-            $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']);
102
+            $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']);
103 103
             $line++;
104
-            $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']);
104
+            $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']);
105 105
         }
106 106
     }
107 107
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@
 block discarded – undo
75 75
                 $this->setY("-".$this->label_height);
76 76
                 $this->setX(0);
77 77
         
78
-            }
79
-            else {
78
+            } else {
80 79
                 // Vi rykker en label til h�jre
81 80
                 $this->setX("+".$this->label_width);
82 81
             }
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/ContactGateway.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     function findByEmail($value)
34 34
     {
35
-        $this->db->query("SELECT address.belong_to_id AS id FROM contact INNER JOIN address ON address.belong_to_id = contact.id WHERE address.email = '".$value."' AND contact.intranet_id = " . $this->kernel->intranet->get('id') . " AND address.active = 1 AND contact.active = 1");
35
+        $this->db->query("SELECT address.belong_to_id AS id FROM contact INNER JOIN address ON address.belong_to_id = contact.id WHERE address.email = '".$value."' AND contact.intranet_id = ".$this->kernel->intranet->get('id')." AND address.active = 1 AND contact.active = 1");
36 36
         if ($this->db->numRows() == 0) {
37 37
             return array();
38 38
         }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     function findByCode($value)
47 47
     {
48
-        $this->db->query("SELECT id FROM contact WHERE code  = '".$value."' AND contact.intranet_id = " . $this->kernel->intranet->get('id'));
48
+        $this->db->query("SELECT id FROM contact WHERE code  = '".$value."' AND contact.intranet_id = ".$this->kernel->intranet->get('id'));
49 49
         if (!$this->db->nextRecord()) {
50 50
             throw new Exception('Contact not found');
51 51
         }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     function findByUsername($value)
56 56
     {
57
-        $this->db->query("SELECT id FROM contact WHERE username  = '".$value['username']."' AND password  = '".$value['password']."' AND contact.intranet_id = " . $kernel->intranet->get('id'));
57
+        $this->db->query("SELECT id FROM contact WHERE username  = '".$value['username']."' AND password  = '".$value['password']."' AND contact.intranet_id = ".$kernel->intranet->get('id'));
58 58
         if (!$this->db->nextRecord()) {
59 59
             throw new Exception('Contact not found');
60 60
         }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
     function findByOpenId($value)
65 65
     {
66
-        $this->db->query("SELECT id FROM contact WHERE openid_url  = '".$value."' AND contact.intranet_id = " . $kernel->intranet->get('id'));
66
+        $this->db->query("SELECT id FROM contact WHERE openid_url  = '".$value."' AND contact.intranet_id = ".$kernel->intranet->get('id'));
67 67
         if (!$this->db->nextRecord()) {
68 68
             throw new Exception('Contact not found');
69 69
         }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function getMaxNumber()
127 127
     {
128
-        $this->db->query("SELECT number FROM contact WHERE intranet_id = " . $this->kernel->intranet->get("id") . " ORDER BY number DESC");
128
+        $this->db->query("SELECT number FROM contact WHERE intranet_id = ".$this->kernel->intranet->get("id")." ORDER BY number DESC");
129 129
         if (!$this->db->nextRecord()) {
130 130
             return 0;
131 131
         }
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/Controller/Choosecontact.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     {
21 21
         $module = $this->getKernel()->module("contact");
22 22
 
23
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/choosecontact');
23
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/choosecontact');
24 24
         return $smarty->render($this, array('contacts' => $this->getContacts()));
25 25
     }
26 26
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         $this->document->addScript('contact/contact_edit.js');
94 94
 
95
-        $smarty = $this->template->create(dirname(__FILE__) . '/templates/edit');
95
+        $smarty = $this->template->create(dirname(__FILE__).'/templates/edit');
96 96
         return $smarty->render($this);
97 97
     }
98 98
 
Please login to merge, or discard this patch.