@@ -52,7 +52,7 @@ |
||
52 | 52 | $status_options = ''; |
53 | 53 | foreach ($items as $key => $value) |
54 | 54 | { |
55 | - $status_options.= "<option value=\"$key\">$value</option>"; |
|
55 | + $status_options .= "<option value=\"$key\">$value</option>"; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | return <<<EOT |
@@ -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); |
@@ -11,6 +11,6 @@ |
||
11 | 11 | * @license see /license.txt |
12 | 12 | * @author Laurent Opprecht <[email protected]>, Nicolas Rod for the University of Geneva |
13 | 13 | */ |
14 | -require_once dirname(__FILE__) . '/config/aai.class.php'; |
|
14 | +require_once dirname(__FILE__).'/config/aai.class.php'; |
|
15 | 15 | |
16 | 16 | Shibboleth::set_config(aai::config()); |
17 | 17 | \ No newline at end of file |
@@ -10,14 +10,14 @@ |
||
10 | 10 | * @author Laurent Opprecht <[email protected]>, Nicolas Rod for the University of Geneva |
11 | 11 | */ |
12 | 12 | |
13 | -$__dir = dirname(__FILE__) . '/'; |
|
14 | -$no_redirection = true; //no redirection in global. |
|
15 | -include_once($__dir . '/../../inc/global.inc.php'); |
|
13 | +$__dir = dirname(__FILE__).'/'; |
|
14 | +$no_redirection = true; //no redirection in global. |
|
15 | +include_once($__dir.'/../../inc/global.inc.php'); |
|
16 | 16 | |
17 | -require_once $__dir . 'config.php'; |
|
17 | +require_once $__dir.'config.php'; |
|
18 | 18 | |
19 | 19 | if (api_get_setting('server_type') == 'test') |
20 | 20 | { |
21 | - include_once $__dir . '/test/shibboleth_test_helper.class.php'; |
|
22 | - include_once $__dir . '/test/shibboleth_test.class.php'; |
|
21 | + include_once $__dir.'/test/shibboleth_test_helper.class.php'; |
|
22 | + include_once $__dir.'/test/shibboleth_test.class.php'; |
|
23 | 23 | } |
@@ -12,8 +12,8 @@ |
||
12 | 12 | * @author Laurent Opprecht <[email protected]>, Nicolas Rod for the University of Geneva |
13 | 13 | */ |
14 | 14 | $dir = dirname(__FILE__); |
15 | -include_once($dir . '/../init.php'); |
|
16 | -include_once($dir . '/../app/lib/scaffolder/scaffolder.class.php'); |
|
15 | +include_once($dir.'/../init.php'); |
|
16 | +include_once($dir.'/../app/lib/scaffolder/scaffolder.class.php'); |
|
17 | 17 | |
18 | 18 | if (!ShibbolethTest::is_enabled()) |
19 | 19 | { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html |
24 | 24 | * @author Laurent Opprecht <[email protected]> |
25 | 25 | */ |
26 | -class <?php echo $prefix . $class_name ?> |
|
26 | +class <?php echo $prefix.$class_name ?> |
|
27 | 27 | |
28 | 28 | { |
29 | 29 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | return self::store()->create_object($data); |
52 | 52 | } |
53 | 53 | |
54 | -<?php foreach($fields as $field){?> |
|
54 | +<?php foreach ($fields as $field) {?> |
|
55 | 55 | public $<?php echo $field->name; ?> = <?php echo $field->def ? $field->def : 'null'; ?>; |
56 | 56 | <?php }?> |
57 | 57 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html |
74 | 74 | * @author Laurent Opprecht <[email protected]> |
75 | 75 | */ |
76 | -class <?php echo $prefix . $class_name ?>Store extends Store |
|
76 | +class <?php echo $prefix.$class_name ?>Store extends Store |
|
77 | 77 | { |
78 | 78 | |
79 | 79 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | public function __construct() |
94 | 94 | { |
95 | - parent::__construct('<?php echo $table_name;?>', '<?php echo $class_name;?>', '<?php echo $id_name;?>'); |
|
95 | + parent::__construct('<?php echo $table_name; ?>', '<?php echo $class_name; ?>', '<?php echo $id_name; ?>'); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | { |
115 | 115 | return parent::create_object($data); |
116 | 116 | } |
117 | -<?php foreach($keys as $key){?> |
|
117 | +<?php foreach ($keys as $key) {?> |
|
118 | 118 | |
119 | 119 | /** |
120 | 120 | * |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | |
58 | 58 | ob_start(); |
59 | - include dirname(__FILE__) . '/template/model.php'; |
|
59 | + include dirname(__FILE__).'/template/model.php'; |
|
60 | 60 | $result = ob_get_clean(); |
61 | 61 | return $result; |
62 | 62 | } |
@@ -246,9 +246,9 @@ discard block |
||
246 | 246 | |
247 | 247 | $db_name = $this->get_db_name($object); |
248 | 248 | $sql = "INSERT INTO `{$db_name}`.`{$this->table_name}` "; |
249 | - $sql .= ' (' . join(', ', $keys) . ') '; |
|
249 | + $sql .= ' ('.join(', ', $keys).') '; |
|
250 | 250 | $sql .= 'VALUES'; |
251 | - $sql .= ' (' . join(', ', $values) . ') '; |
|
251 | + $sql .= ' ('.join(', ', $values).') '; |
|
252 | 252 | |
253 | 253 | $result = $this->execute($sql); |
254 | 254 | if ($result) |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | $items = array(); |
296 | 296 | foreach ($args as $key => $val) |
297 | 297 | { |
298 | - $items[] = $key . ' = ' . $this->format_value($val); |
|
298 | + $items[] = $key.' = '.$this->format_value($val); |
|
299 | 299 | } |
300 | 300 | return implode(' AND ', $items); |
301 | 301 | } |
@@ -107,8 +107,7 @@ discard block |
||
107 | 107 | if ($this->is_new($object)) |
108 | 108 | { |
109 | 109 | $result = $this->insert($object); |
110 | - } |
|
111 | - else |
|
110 | + } else |
|
112 | 111 | { |
113 | 112 | $result = $this->update($object); |
114 | 113 | } |
@@ -257,8 +256,7 @@ discard block |
||
257 | 256 | $object->{$this->id_name} = $id; |
258 | 257 | $object->{db_name} = $db_name; |
259 | 258 | return $id; |
260 | - } |
|
261 | - else |
|
259 | + } else |
|
262 | 260 | { |
263 | 261 | return false; |
264 | 262 | } |
@@ -278,16 +276,13 @@ discard block |
||
278 | 276 | return ''; |
279 | 277 | } |
280 | 278 | $args = array($this->pk_name, $arg); |
281 | - } |
|
282 | - else if (is_string($arg)) |
|
279 | + } else if (is_string($arg)) |
|
283 | 280 | { |
284 | 281 | return $arg; |
285 | - } |
|
286 | - else if (is_array($arg)) |
|
282 | + } else if (is_array($arg)) |
|
287 | 283 | { |
288 | 284 | $args = $arg; |
289 | - } |
|
290 | - else |
|
285 | + } else |
|
291 | 286 | { |
292 | 287 | return $arg; |
293 | 288 | } |
@@ -309,17 +304,14 @@ discard block |
||
309 | 304 | if (is_bool($var)) |
310 | 305 | { |
311 | 306 | return $value ? '1' : '0'; |
312 | - } |
|
313 | - else if (is_numeric($value)) |
|
307 | + } else if (is_numeric($value)) |
|
314 | 308 | { |
315 | 309 | return empty($value) ? '0' : $value; |
316 | - } |
|
317 | - else if (is_string($value)) |
|
310 | + } else if (is_string($value)) |
|
318 | 311 | { |
319 | 312 | $value = mysql_escape_string($value); |
320 | 313 | return "'$value'"; |
321 | - } |
|
322 | - else |
|
314 | + } else |
|
323 | 315 | { |
324 | 316 | return $value; |
325 | 317 | } |
@@ -41,10 +41,10 @@ |
||
41 | 41 | 'identity' => $user['email'] |
42 | 42 | ), |
43 | 43 | 'issuedOn' => strtotime($userSkill['acquired_skill_at']), |
44 | - 'badge' => api_get_path(WEB_CODE_PATH) . "badge/class.php?id=$skillId", |
|
44 | + 'badge' => api_get_path(WEB_CODE_PATH)."badge/class.php?id=$skillId", |
|
45 | 45 | 'verify' => array( |
46 | 46 | 'type' => 'hosted', |
47 | - 'url' => api_get_path(WEB_CODE_PATH) . "badge/assertion.php?" . http_build_query(array( |
|
47 | + 'url' => api_get_path(WEB_CODE_PATH)."badge/assertion.php?".http_build_query(array( |
|
48 | 48 | 'user' => $userId, |
49 | 49 | 'skill' => $skillId, |
50 | 50 | 'course' => $courseId, |