@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | $xml->startElement('Array'); |
60 | 60 | $this->array2XML($xml, 'Entity', (array)$this); |
61 | 61 | $xml->endElement(); |
62 | - } |
|
63 | - else |
|
62 | + } else |
|
64 | 63 | { |
65 | 64 | $this->object2XML($xml, $this); |
66 | 65 | } |
@@ -81,20 +80,17 @@ discard block |
||
81 | 80 | if(is_array($value) || is_numeric($key)) |
82 | 81 | { |
83 | 82 | $this->array2XML($xml, $key, (array)$value); |
84 | - } |
|
85 | - else if(is_object($value)) |
|
83 | + } else if(is_object($value)) |
|
86 | 84 | { |
87 | 85 | $xml->startElement($key); |
88 | 86 | $this->object2XML($xml, $value); |
89 | 87 | $xml->endElement(); |
90 | - } |
|
91 | - else |
|
88 | + } else |
|
92 | 89 | { |
93 | 90 | if($key[0] === '$') |
94 | 91 | { |
95 | 92 | $xml->writeElement(substr($key, 1), $value); |
96 | - } |
|
97 | - else |
|
93 | + } else |
|
98 | 94 | { |
99 | 95 | $key = strtr($key, array(' '=>'', ','=>'')); |
100 | 96 | $xml->writeElement($key, $value); |
@@ -127,8 +123,7 @@ discard block |
||
127 | 123 | if(is_object($value)) |
128 | 124 | { |
129 | 125 | $this->object2XML($xml, $value); |
130 | - } |
|
131 | - else if(is_array($value)) |
|
126 | + } else if(is_array($value)) |
|
132 | 127 | { |
133 | 128 | $this->array2XML($xml, $key, $value); |
134 | 129 | continue; |
@@ -15,8 +15,7 @@ discard block |
||
15 | 15 | if(isset($params['filter'])) |
16 | 16 | { |
17 | 17 | $this->filter = new \Data\Filter($params['filter']); |
18 | - } |
|
19 | - else if(isset($params['$filter'])) |
|
18 | + } else if(isset($params['$filter'])) |
|
20 | 19 | { |
21 | 20 | $this->filter = new \Data\Filter($params['$filter']); |
22 | 21 | } |
@@ -29,8 +28,7 @@ discard block |
||
29 | 28 | if(isset($params['select'])) |
30 | 29 | { |
31 | 30 | $this->select = explode(',',$params['select']); |
32 | - } |
|
33 | - else if(isset($params['$select'])) |
|
31 | + } else if(isset($params['$select'])) |
|
34 | 32 | { |
35 | 33 | $this->select = explode(',',$params['$select']); |
36 | 34 | } |
@@ -47,8 +45,7 @@ discard block |
||
47 | 45 | { |
48 | 46 | //Default to assending |
49 | 47 | $this->orderby[$exp[0]] = 1; |
50 | - } |
|
51 | - else |
|
48 | + } else |
|
52 | 49 | { |
53 | 50 | switch($exp[1]) |
54 | 51 | { |
@@ -34,8 +34,7 @@ |
||
34 | 34 | $args['RawMessage'] = array(); |
35 | 35 | $args['RawMessage']['Data'] = base64_encode($email->getRawMessage()); |
36 | 36 | return $this->ses->sendRawEmail($args); |
37 | - } |
|
38 | - else |
|
37 | + } else |
|
39 | 38 | { |
40 | 39 | $args = array(); |
41 | 40 | $args['Source'] = $email->getFromAddress(); |
@@ -34,8 +34,7 @@ |
||
34 | 34 | $args['RawMessage'] = array(); |
35 | 35 | $args['RawMessage']['Data'] = base64_encode($email->getRawMessage()); |
36 | 36 | return $this->ses->sendRawEmail($args); |
37 | - } |
|
38 | - else |
|
37 | + } else |
|
39 | 38 | { |
40 | 39 | $args = array(); |
41 | 40 | $args['Source'] = $email->getFromAddress(); |
@@ -34,8 +34,7 @@ |
||
34 | 34 | $args['RawMessage'] = array(); |
35 | 35 | $args['RawMessage']['Data'] = base64_encode($email->getRawMessage()); |
36 | 36 | return $this->ses->sendRawEmail($args); |
37 | - } |
|
38 | - else |
|
37 | + } else |
|
39 | 38 | { |
40 | 39 | $args = array(); |
41 | 40 | $args['Source'] = $email->getFromAddress(); |
@@ -34,8 +34,7 @@ |
||
34 | 34 | $args['RawMessage'] = array(); |
35 | 35 | $args['RawMessage']['Data'] = base64_encode($email->getRawMessage()); |
36 | 36 | return $this->ses->sendRawEmail($args); |
37 | - } |
|
38 | - else |
|
37 | + } else |
|
39 | 38 | { |
40 | 39 | $args = array(); |
41 | 40 | $args['Source'] = $email->getFromAddress(); |
@@ -17,8 +17,7 @@ |
||
17 | 17 | if(isset($GLOBALS['FLIPSIDE_SETTINGS_LOC'])) |
18 | 18 | { |
19 | 19 | require_once($GLOBALS['FLIPSIDE_SETTINGS_LOC'].'/class.FlipsideSettings.php'); |
20 | -} |
|
21 | -else |
|
20 | +} else |
|
22 | 21 | { |
23 | 22 | require_once('/var/www/secure_settings/class.FlipsideSettings.php'); |
24 | 23 | } |
@@ -34,8 +34,7 @@ |
||
34 | 34 | $args['RawMessage'] = array(); |
35 | 35 | $args['RawMessage']['Data'] = base64_encode($email->getRawMessage()); |
36 | 36 | return $this->ses->sendRawEmail($args); |
37 | - } |
|
38 | - else |
|
37 | + } else |
|
39 | 38 | { |
40 | 39 | $args = array(); |
41 | 40 | $args['Source'] = $email->getFromAddress(); |
@@ -21,14 +21,12 @@ discard block |
||
21 | 21 | throw new \Exception('No such LDAP User!'); |
22 | 22 | } |
23 | 23 | $this->ldapObj = $users[0]; |
24 | - } |
|
25 | - else |
|
24 | + } else |
|
26 | 25 | { |
27 | 26 | if(isset($data['extended'])) |
28 | 27 | { |
29 | 28 | $this->ldapObj = $data['extended']; |
30 | - } |
|
31 | - else |
|
29 | + } else |
|
32 | 30 | { |
33 | 31 | $this->ldapObj = $data; |
34 | 32 | } |
@@ -44,7 +42,9 @@ discard block |
||
44 | 42 | { |
45 | 43 | $dn = explode(',', $array[$i]); |
46 | 44 | $res = $this->isInGroupNamed(substr($dn[0], 3)); |
47 | - if($res) return $res; |
|
45 | + if($res) { |
|
46 | + return $res; |
|
47 | + } |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | return $res; |
@@ -206,8 +206,7 @@ discard block |
||
206 | 206 | } |
207 | 207 | } |
208 | 208 | return $res; |
209 | - } |
|
210 | - else |
|
209 | + } else |
|
211 | 210 | { |
212 | 211 | return false; |
213 | 212 | } |
@@ -231,8 +230,7 @@ discard block |
||
231 | 230 | if(!is_object($this->ldapObj)) |
232 | 231 | { |
233 | 232 | return $this->setFieldLocal('userPassword', $this->generateLDAPPass($password)); |
234 | - } |
|
235 | - else |
|
233 | + } else |
|
236 | 234 | { |
237 | 235 | $obj = array('dn'=>$this->ldapObj->dn); |
238 | 236 | $obj['userPassword'] = $this->generateLDAPPass($password); |
@@ -321,8 +319,7 @@ discard block |
||
321 | 319 | if(!is_object($this->ldapObj)) |
322 | 320 | { |
323 | 321 | return $this->setFieldLocal('uid', $uid); |
324 | - } |
|
325 | - else |
|
322 | + } else |
|
326 | 323 | { |
327 | 324 | throw new \Exception('Unsupported!'); |
328 | 325 | } |
@@ -416,8 +413,7 @@ discard block |
||
416 | 413 | if(isset($ldapObj->userpassword)) |
417 | 414 | { |
418 | 415 | $hash = hash('sha512', $ldapObj->dn.';'.$ldapObj->userpassword[0].';'.$ldapObj->mail[0]); |
419 | - } |
|
420 | - else |
|
416 | + } else |
|
421 | 417 | { |
422 | 418 | $hash = hash('sha512', $ldapObj->dn.';'.openssl_random_pseudo_bytes(10).';'.$ldapObj->mail[0]); |
423 | 419 | } |