@@ -45,8 +45,7 @@ |
||
45 | 45 | if (in_array(OPENID_NS_2_0 .'/signon', $xrds_current_service['types']) || |
46 | 46 | in_array(OPENID_NS_2_0 .'/server', $xrds_current_service['types'])) { |
47 | 47 | $xrds_current_service['version'] = 2; |
48 | - } |
|
49 | - elseif (in_array(OPENID_NS_1_1, $xrds_current_service['types']) || |
|
48 | + } elseif (in_array(OPENID_NS_1_1, $xrds_current_service['types']) || |
|
50 | 49 | in_array(OPENID_NS_1_0, $xrds_current_service['types'])) { |
51 | 50 | $xrds_current_service['version'] = 1; |
52 | 51 | } |
@@ -61,8 +61,9 @@ |
||
61 | 61 | */ |
62 | 62 | function _openid_is_xri($identifier) { |
63 | 63 | $firstchar = substr($identifier, 0, 1); |
64 | - if ($firstchar == "@" || $firstchar == "=") |
|
65 | - return TRUE; |
|
64 | + if ($firstchar == "@" || $firstchar == "=") { |
|
65 | + return TRUE; |
|
66 | + } |
|
66 | 67 | |
67 | 68 | if (stristr($identifier, 'xri://') !== FALSE) { |
68 | 69 | return TRUE; |
@@ -137,8 +137,12 @@ discard block |
||
137 | 137 | // call the ancestor's constructor |
138 | 138 | $this->PGTStorage($cas_parent); |
139 | 139 | |
140 | - if (empty($format) ) $format = CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT; |
|
141 | - if (empty($path) ) $path = CAS_PGT_STORAGE_FILE_DEFAULT_PATH; |
|
140 | + if (empty($format) ) { |
|
141 | + $format = CAS_PGT_STORAGE_FILE_DEFAULT_FORMAT; |
|
142 | + } |
|
143 | + if (empty($path) ) { |
|
144 | + $path = CAS_PGT_STORAGE_FILE_DEFAULT_PATH; |
|
145 | + } |
|
142 | 146 | |
143 | 147 | // check that the path is an absolute path |
144 | 148 | if (getenv("OS")=="Windows_NT"){ |
@@ -147,8 +151,7 @@ discard block |
||
147 | 151 | phpCAS::error('an absolute path is needed for PGT storage to file'); |
148 | 152 | } |
149 | 153 | |
150 | - } |
|
151 | - else |
|
154 | + } else |
|
152 | 155 | { |
153 | 156 | |
154 | 157 | if ( $path[0] != '/' ) { |
@@ -186,8 +189,9 @@ discard block |
||
186 | 189 | { |
187 | 190 | phpCAS::traceBegin(); |
188 | 191 | // if the storage has already been initialized, return immediatly |
189 | - if ( $this->isInitialized() ) |
|
190 | - return; |
|
192 | + if ( $this->isInitialized() ) { |
|
193 | + return; |
|
194 | + } |
|
191 | 195 | // call the ancestor's method (mark as initialized) |
192 | 196 | parent::init(); |
193 | 197 | phpCAS::traceEnd(); |
@@ -166,11 +166,21 @@ discard block |
||
166 | 166 | // call the ancestor's constructor |
167 | 167 | $this->PGTStorage($cas_parent); |
168 | 168 | |
169 | - if ( empty($database_type) ) $database_type = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE; |
|
170 | - if ( empty($hostname) ) $hostname = CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME; |
|
171 | - if ( $port==0 ) $port = CAS_PGT_STORAGE_DB_DEFAULT_PORT; |
|
172 | - if ( empty($database) ) $database = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE; |
|
173 | - if ( empty($table) ) $table = CAS_PGT_STORAGE_DB_DEFAULT_TABLE; |
|
169 | + if ( empty($database_type) ) { |
|
170 | + $database_type = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE_TYPE; |
|
171 | + } |
|
172 | + if ( empty($hostname) ) { |
|
173 | + $hostname = CAS_PGT_STORAGE_DB_DEFAULT_HOSTNAME; |
|
174 | + } |
|
175 | + if ( $port==0 ) { |
|
176 | + $port = CAS_PGT_STORAGE_DB_DEFAULT_PORT; |
|
177 | + } |
|
178 | + if ( empty($database) ) { |
|
179 | + $database = CAS_PGT_STORAGE_DB_DEFAULT_DATABASE; |
|
180 | + } |
|
181 | + if ( empty($table) ) { |
|
182 | + $table = CAS_PGT_STORAGE_DB_DEFAULT_TABLE; |
|
183 | + } |
|
174 | 184 | |
175 | 185 | // build and store the PEAR DB URL |
176 | 186 | $this->_url = $database_type.':'.'//'.$user.':'.$password.'@'.$hostname.':'.$port.'/'.$database; |
@@ -192,8 +202,9 @@ discard block |
||
192 | 202 | { |
193 | 203 | phpCAS::traceBegin(); |
194 | 204 | // if the storage has already been initialized, return immediatly |
195 | - if ( $this->isInitialized() ) |
|
196 | - return; |
|
205 | + if ( $this->isInitialized() ) { |
|
206 | + return; |
|
207 | + } |
|
197 | 208 | // call the ancestor's method (mark as initialized) |
198 | 209 | parent::init(); |
199 | 210 |
@@ -4,8 +4,9 @@ |
||
4 | 4 | require_once dirname(__FILE__).'/../../inc/global.inc.php'; |
5 | 5 | $url = api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php'; |
6 | 6 | |
7 | -if (! isset($_SESSION['conditional_login']['uid'])) |
|
7 | +if (! isset($_SESSION['conditional_login']['uid'])) { |
|
8 | 8 | die("Not Authorised"); |
9 | +} |
|
9 | 10 | ?> |
10 | 11 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
11 | 12 | <html lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml"> |
@@ -80,7 +80,12 @@ discard block |
||
80 | 80 | |
81 | 81 | if ($res==1) { //WRONG PASSWORD |
82 | 82 | //$errorMessage = "LDAP User or password incorrect, try again.<br />"; |
83 | - if (isset($log)) unset($log); if (isset($uid)) unset($uid); |
|
83 | + if (isset($log)) { |
|
84 | + unset($log); |
|
85 | + } |
|
86 | + if (isset($uid)) { |
|
87 | + unset($uid); |
|
88 | + } |
|
84 | 89 | $loginLdapSucces = false; |
85 | 90 | } |
86 | 91 | if ($res==-1) { //WRONG USERNAME |
@@ -401,8 +406,9 @@ discard block |
||
401 | 406 | return $info; |
402 | 407 | |
403 | 408 | } else { |
404 | - if (count($ldap_query)!=0) |
|
405 | - Display :: display_error_message(get_lang('LDAPConnectionError')); |
|
409 | + if (count($ldap_query)!=0) { |
|
410 | + Display :: display_error_message(get_lang('LDAPConnectionError')); |
|
411 | + } |
|
406 | 412 | return array(); |
407 | 413 | } |
408 | 414 | } |
@@ -206,8 +206,7 @@ |
||
206 | 206 | echo $message; |
207 | 207 | var_dump(debug_backtrace()); |
208 | 208 | die; |
209 | - } |
|
210 | - else |
|
209 | + } else |
|
211 | 210 | { |
212 | 211 | $message = "Assert successful $message <br/>"; |
213 | 212 | echo $message; |
@@ -168,12 +168,10 @@ |
||
168 | 168 | if (empty($result)) |
169 | 169 | { |
170 | 170 | $result = $default; |
171 | - } |
|
172 | - else if (count($result) == 1) |
|
171 | + } else if (count($result) == 1) |
|
173 | 172 | { |
174 | 173 | $result = reset($result); |
175 | - } |
|
176 | - else |
|
174 | + } else |
|
177 | 175 | { |
178 | 176 | $result = $result; |
179 | 177 | } |
@@ -56,8 +56,7 @@ discard block |
||
56 | 56 | if ($email = $form->get_email()) |
57 | 57 | { |
58 | 58 | $user->email = $email; |
59 | - } |
|
60 | - else |
|
59 | + } else |
|
61 | 60 | { |
62 | 61 | $content = $form->display(); |
63 | 62 | Shibboleth::display()->page($content); |
@@ -71,8 +70,7 @@ discard block |
||
71 | 70 | if ($is_new_user && $user->status_request) |
72 | 71 | { |
73 | 72 | Shibboleth::redirect('/main/auth/shibboleth/app/view/request.php'); |
74 | - } |
|
75 | - else |
|
73 | + } else |
|
76 | 74 | { |
77 | 75 | Shibboleth::redirect(); |
78 | 76 | } |
@@ -141,8 +139,7 @@ discard block |
||
141 | 139 | { |
142 | 140 | $request_submitted = get_lang('RequestSubmitted'); |
143 | 141 | Shibboleth::display()->message_page($request_submitted); |
144 | - } |
|
145 | - else |
|
142 | + } else |
|
146 | 143 | { |
147 | 144 | $request_failed = get_lang('RequestFailed'); |
148 | 145 | Shibboleth::display()->error_page($request_failed); |