@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | { |
21 | 21 | $data = array('data' => $this->session()->get('fileimport_data')); |
22 | 22 | |
23 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/import'); |
|
23 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/import'); |
|
24 | 24 | return $smarty->render($this, $data); |
25 | 25 | } |
26 | 26 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $string_appender->addKeywordsByString($_POST['keyword']); |
49 | 49 | $this->success++; |
50 | 50 | } else { |
51 | - $this->errors[$e]['line'] = $line+1; // line starts at 0 |
|
51 | + $this->errors[$e]['line'] = $line + 1; // line starts at 0 |
|
52 | 52 | $this->errors[$e]['name'] = $contact['name']; |
53 | 53 | $this->errors[$e]['email'] = $contact['email']; |
54 | 54 | $this->errors[$e]['error'] = $contact_object->error; |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $data = $this->session()->set('fileimport_data', null); |
60 | 60 | |
61 | 61 | if (empty($this->errors)) { |
62 | - return new k_SeeOther($this->url('../', array('flare' => $this->success . ' contacts imported successfully'))); |
|
62 | + return new k_SeeOther($this->url('../', array('flare' => $this->success.' contacts imported successfully'))); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | return $this->render(); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $contact = $this->context->getContact(); |
35 | 35 | $similar_contacts = $contact->getSimilarContacts(); |
36 | 36 | |
37 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/merge'); |
|
37 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/merge'); |
|
38 | 38 | return $smarty->render($this); |
39 | 39 | } |
40 | 40 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | function setNewContactId($old_contact_id, $new_contact_id) |
75 | 75 | { |
76 | - $this->db_sql->query('UPDATE contact_person SET contact_id = ' . $new_contact_id . ' WHERE contact_id = ' . $old_contact_id); |
|
76 | + $this->db_sql->query('UPDATE contact_person SET contact_id = '.$new_contact_id.' WHERE contact_id = '.$old_contact_id); |
|
77 | 77 | return true; |
78 | 78 | } |
79 | 79 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $contact = $this->context->getContact(); |
24 | 24 | $person = $contact->loadContactPerson(0); |
25 | 25 | |
26 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/contactperson-edit'); |
|
26 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/contactperson-edit'); |
|
27 | 27 | return $smarty->render($this, array('person' => $person, 'contact' => $contact)); |
28 | 28 | } |
29 | 29 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | $this->document->setTitle('Memos'); |
21 | 21 | |
22 | - $tpl = $this->template->create(dirname(__FILE__) . '/templates/memos'); |
|
22 | + $tpl = $this->template->create(dirname(__FILE__).'/templates/memos'); |
|
23 | 23 | |
24 | 24 | if (is_numeric($this->context->name())) { |
25 | 25 | return $tpl->render($this, array('memos' => $gateway->findByContactId($this->context->name()))); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $reminder = new ContactReminder($this->context->getKernel()); |
35 | 35 | $contact = $reminder->contact; |
36 | 36 | |
37 | - $smarty = $this->template->create(dirname(__FILE__) . '/templates/memo-edit'); |
|
37 | + $smarty = $this->template->create(dirname(__FILE__).'/templates/memo-edit'); |
|
38 | 38 | return $smarty->render($this, array('reminder' => $reminder, 'contact' => $contact)); |
39 | 39 | } |
40 | 40 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | { |
23 | 23 | $db = MDB2::singleton(DB_DSN, array('persistent' => true)); |
24 | 24 | if (PEAR::isError($db)) { |
25 | - throw new Exception($db->getMessage() . $db->getUserInfo()); |
|
25 | + throw new Exception($db->getMessage().$db->getUserInfo()); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | $db->setFetchMode(MDB2_FETCHMODE_ASSOC); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | //always check for errors. In this examples, error checking is omitted |
81 | 81 | //to make the example concise. |
82 | 82 | if (PEAR::isError($translation)) { |
83 | - throw new Exception('Could not start Translation ' . $translation->getMessage()); |
|
83 | + throw new Exception('Could not start Translation '.$translation->getMessage()); |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | // set the group of strings you want to fetch from |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | // %url% will be replaced with the targeted url |
100 | 100 | //$this->translation->outputString = '%stringID% (%pageID_url%)'; //default: '%stringID%' |
101 | 101 | $translation->outputString = '%stringID%'; |
102 | - $translation->url = ''; //same as default |
|
103 | - $translation->emptyPrefix = ''; //default: empty string |
|
104 | - $translation->emptyPostfix = ''; //default: empty string |
|
102 | + $translation->url = ''; //same as default |
|
103 | + $translation->emptyPrefix = ''; //default: empty string |
|
104 | + $translation->emptyPostfix = ''; //default: empty string |
|
105 | 105 | return $translation; |
106 | 106 | } |
107 | 107 |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | if (!$this->subscriber->unsubscribe($email, $comment)) { |
91 | 91 | require_once 'XML/RPC2/Exception.php'; |
92 | - throw new XML_RPC2_FaultException('you could not unsubscribe ('. implode(', ', $this->subscriber->error->getMessage()).')', -4); |
|
92 | + throw new XML_RPC2_FaultException('you could not unsubscribe ('.implode(', ', $this->subscriber->error->getMessage()).')', -4); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | return $this->prepareResponseData(true); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | $code = $this->processRequestData($code); |
209 | 209 | |
210 | 210 | $db = MDB2::singleton(DB_DSN); |
211 | - $result = $db->query('SELECT list_id FROM newsletter_subscriber WHERE code = ' . $db->quote($code, 'text')); |
|
211 | + $result = $db->query('SELECT list_id FROM newsletter_subscriber WHERE code = '.$db->quote($code, 'text')); |
|
212 | 212 | if ($row = $result->fetchRow(MDB2_FETCHMODE_ASSOC)) { |
213 | 213 | return $this->prepareResponseData($row['list_id']); |
214 | 214 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function auth() |
50 | 50 | { |
51 | - $result = $this->db->query("SELECT id FROM intranet WHERE private_key = " . $this->db->quote($this->key, 'text')); |
|
51 | + $result = $this->db->query("SELECT id FROM intranet WHERE private_key = ".$this->db->quote($this->key, 'text')); |
|
52 | 52 | if (PEAR::isError($result)) { |
53 | 53 | throw new Exception($result->getUserInfo()); |
54 | 54 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $result = $this->db->query("SELECT id FROM user WHERE email = ".$this->db->quote($this->email, 'text')." AND password = ".$this->db->quote(md5($this->password), 'text')); |
41 | 41 | |
42 | 42 | if (PEAR::isError($result)) { |
43 | - throw new Exception('result is an error' . $result->getMessage() . $result->getUserInfo()); |
|
43 | + throw new Exception('result is an error'.$result->getMessage().$result->getUserInfo()); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | if ($result->numRows() != 1) { |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | } |
49 | 49 | $row = $result->fetchRow(MDB2_FETCHMODE_ASSOC); |
50 | 50 | |
51 | - $result = $this->db->exec("UPDATE user SET lastlogin = NOW(), session_id = ".$this->db->quote($this->session_id, 'text')." WHERE id = ". $this->db->quote($row['id'], 'integer')); |
|
51 | + $result = $this->db->exec("UPDATE user SET lastlogin = NOW(), session_id = ".$this->db->quote($this->session_id, 'text')." WHERE id = ".$this->db->quote($row['id'], 'integer')); |
|
52 | 52 | if (PEAR::isError($result)) { |
53 | - throw new Exception('could not update user ' . $result->getMessage() . $result->getUserInfo()); |
|
53 | + throw new Exception('could not update user '.$result->getMessage().$result->getUserInfo()); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | $user = new Intraface_User($row['id']); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | { |
68 | 68 | $result = $this->db->query("SELECT id FROM user WHERE session_id = ".$this->db->quote($this->session_id, 'text')); |
69 | 69 | if (PEAR::isError($result)) { |
70 | - throw new Exception('could not check if user is logged in ' . $result->getUserInfo()); |
|
70 | + throw new Exception('could not check if user is logged in '.$result->getUserInfo()); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | if ($result->numRows() == 0) { |
@@ -85,10 +85,10 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function logout() |
87 | 87 | { |
88 | - $result = $this->db->exec("UPDATE user SET session_id = " . $this->db->quote('', 'text') . " WHERE session_id = " . $this->db->quote($this->session_id, 'text')); |
|
88 | + $result = $this->db->exec("UPDATE user SET session_id = ".$this->db->quote('', 'text')." WHERE session_id = ".$this->db->quote($this->session_id, 'text')); |
|
89 | 89 | |
90 | 90 | if (PEAR::isError($result)) { |
91 | - throw new Exception('could not log user out ' . $result->getUserInfo()); |
|
91 | + throw new Exception('could not log user out '.$result->getUserInfo()); |
|
92 | 92 | } |
93 | 93 | return true; |
94 | 94 | } |
@@ -88,7 +88,7 @@ |
||
88 | 88 | $result = $this->db->exec("UPDATE user SET session_id = " . $this->db->quote('', 'text') . " WHERE session_id = " . $this->db->quote($this->session_id, 'text')); |
89 | 89 | |
90 | 90 | if (PEAR::isError($result)) { |
91 | - throw new Exception('could not log user out ' . $result->getUserInfo()); |
|
91 | + throw new Exception('could not log user out ' . $result->getUserInfo()); |
|
92 | 92 | } |
93 | 93 | return true; |
94 | 94 | } |
@@ -99,11 +99,11 @@ |
||
99 | 99 | public static function getBelongToTypes() |
100 | 100 | { |
101 | 101 | return array(1 => 'intranet', |
102 | - 2 => 'user', |
|
103 | - 3 => 'contact', |
|
104 | - 4 => 'contact_delivery', |
|
105 | - 5 => 'contact_invoice', |
|
106 | - 6 => 'contactperson'); |
|
102 | + 2 => 'user', |
|
103 | + 3 => 'contact', |
|
104 | + 4 => 'contact_delivery', |
|
105 | + 5 => 'contact_invoice', |
|
106 | + 6 => 'contactperson'); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * @param string $belong_to What the address belongs to, corresponding to the ones in Address::getBelongToTypes() |
84 | 84 | * @param integer $belong_to_id From belong_to. NB not id on the address |
85 | 85 | * |
86 | - * @return object Address |
|
86 | + * @return Intraface_Address Address |
|
87 | 87 | */ |
88 | 88 | function factory($belong_to, $belong_to_id) |
89 | 89 | { |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | /** |
95 | 95 | * Returns possible belong to types |
96 | 96 | * |
97 | - * @return array |
|
97 | + * @return string[] |
|
98 | 98 | */ |
99 | 99 | public static function getBelongToTypes() |
100 | 100 | { |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * |
221 | 221 | * @param array $array_var et array med felter med adressen. Se felterne i init funktionen: $this->fields |
222 | 222 | * |
223 | - * @return bolean true or false |
|
223 | + * @return boolean true or false |
|
224 | 224 | */ |
225 | 225 | function save($array_var) |
226 | 226 | { |