Passed
Push — 1.10.x ( aae6b1...e5a590 )
by Yannick
131:05 queued 81:36
created
main/auth/cas/lib/CAS/languages/english.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,20 +8,20 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 $this->_strings = array(
11
- CAS_STR_USING_SERVER 
12
- => 'using server',
13
- CAS_STR_AUTHENTICATION_WANTED 
14
- => 'CAS Authentication wanted!',
15
- CAS_STR_LOGOUT 
16
- => 'CAS logout wanted!',
17
- CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED 
18
- => 'You should already have been redirected to the CAS server. Click <a href="%s">here</a> to continue.',
19
- CAS_STR_AUTHENTICATION_FAILED 
20
- => 'CAS Authentication failed!',
21
- CAS_STR_YOU_WERE_NOT_AUTHENTICATED 
22
- => '<p>You were not authenticated.</p><p>You may submit your request again by clicking <a href="%s">here</a>.</p><p>If the problem persists, you may contact <a href="mailto:%s">the administrator of this site</a>.</p>',
23
- CAS_STR_SERVICE_UNAVAILABLE
24
- => 'The service `<b>%s</b>\' is not available (<b>%s</b>).'
11
+    CAS_STR_USING_SERVER 
12
+    => 'using server',
13
+    CAS_STR_AUTHENTICATION_WANTED 
14
+    => 'CAS Authentication wanted!',
15
+    CAS_STR_LOGOUT 
16
+    => 'CAS logout wanted!',
17
+    CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED 
18
+    => 'You should already have been redirected to the CAS server. Click <a href="%s">here</a> to continue.',
19
+    CAS_STR_AUTHENTICATION_FAILED 
20
+    => 'CAS Authentication failed!',
21
+    CAS_STR_YOU_WERE_NOT_AUTHENTICATED 
22
+    => '<p>You were not authenticated.</p><p>You may submit your request again by clicking <a href="%s">here</a>.</p><p>If the problem persists, you may contact <a href="mailto:%s">the administrator of this site</a>.</p>',
23
+    CAS_STR_SERVICE_UNAVAILABLE
24
+    => 'The service `<b>%s</b>\' is not available (<b>%s</b>).'
25 25
 );
26 26
 
27 27
 ?>
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
main/auth/cas/lib/CAS/languages/japanese.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,20 +8,20 @@
 block discarded – undo
8 8
  **/
9 9
 
10 10
 $this->_strings = array(
11
- CAS_STR_USING_SERVER 
12
- => 'using server',
13
- CAS_STR_AUTHENTICATION_WANTED 
14
- => 'CAS�ˤ��ǧ�ڤ�Ԥ��ޤ�',
15
- CAS_STR_LOGOUT 
16
- => 'CAS����?�����Ȥ��ޤ�!',
17
- CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED 
18
- => 'CAS�����Ф˹Ԥ�ɬ�פ�����ޤ�����ưŪ��ž������ʤ����� <a href="%s">������</a> �
Please login to merge, or discard this patch.
main/auth/cas/lib/CAS/languages/languages.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@
 block discarded – undo
12 12
 /**
13 13
  * a phpCAS string index
14 14
  */
15
-define("CAS_STR_USING_SERVER",                1);
16
-define("CAS_STR_AUTHENTICATION_WANTED",       2);
17
-define("CAS_STR_LOGOUT",                      3);
15
+define("CAS_STR_USING_SERVER", 1);
16
+define("CAS_STR_AUTHENTICATION_WANTED", 2);
17
+define("CAS_STR_LOGOUT", 3);
18 18
 define("CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED", 4);
19
-define("CAS_STR_AUTHENTICATION_FAILED",       5);
20
-define("CAS_STR_YOU_WERE_NOT_AUTHENTICATED",  6);
21
-define("CAS_STR_SERVICE_UNAVAILABLE",         7);
19
+define("CAS_STR_AUTHENTICATION_FAILED", 5);
20
+define("CAS_STR_YOU_WERE_NOT_AUTHENTICATED", 6);
21
+define("CAS_STR_SERVICE_UNAVAILABLE", 7);
22 22
 //@}
23 23
 
24 24
 ?>
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
main/auth/cas/lib/CAS/languages/greek.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,20 +8,20 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 $this->_strings = array(
11
- CAS_STR_USING_SERVER 
12
- => '��������������� � ������������',
13
- CAS_STR_AUTHENTICATION_WANTED 
14
- => '���������� � ����������� CAS!',
15
- CAS_STR_LOGOUT 
16
- => '���������� � ���������� ��� CAS!',
17
- CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED 
18
- => '�� ������ �� ������ �������������� ���� ����������� CAS. ����� ���� <a href="%s">���</a> ��� �� ����������.',
19
- CAS_STR_AUTHENTICATION_FAILED 
20
- => '� ����������� CAS �������!',
21
- CAS_STR_YOU_WERE_NOT_AUTHENTICATED 
22
- => '<p>��� ���������������.</p><p>�������� �� ����������������, �������� ���� <a href="%s">���</a>.</p><p>��� �� �������� ���������, ����� �� ����� �� ��� <a href="mailto:%s">�����������</a>.</p>',
23
- CAS_STR_SERVICE_UNAVAILABLE
24
- => '� �������� `<b>%s</b>\' ��� ����� ��������� (<b>%s</b>).'
11
+    CAS_STR_USING_SERVER 
12
+    => '��������������� � ������������',
13
+    CAS_STR_AUTHENTICATION_WANTED 
14
+    => '���������� � ����������� CAS!',
15
+    CAS_STR_LOGOUT 
16
+    => '���������� � ���������� ��� CAS!',
17
+    CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED 
18
+    => '�� ������ �� ������ �������������� ���� ����������� CAS. ����� ���� <a href="%s">���</a> ��� �� ����������.',
19
+    CAS_STR_AUTHENTICATION_FAILED 
20
+    => '� ����������� CAS �������!',
21
+    CAS_STR_YOU_WERE_NOT_AUTHENTICATED 
22
+    => '<p>��� ���������������.</p><p>�������� �� ����������������, �������� ���� <a href="%s">���</a>.</p><p>��� �� �������� ���������, ����� �� ����� �� ��� <a href="mailto:%s">�����������</a>.</p>',
23
+    CAS_STR_SERVICE_UNAVAILABLE
24
+    => '� �������� `<b>%s</b>\' ��� ����� ��������� (<b>%s</b>).'
25 25
 );
26 26
 
27 27
 ?>
28 28
\ No newline at end of file
Please login to merge, or discard this patch.
main/auth/cas/lib/CAS/languages/french.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,20 +8,20 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 $this->_strings = array(
11
- CAS_STR_USING_SERVER 
12
- => 'utilisant le serveur',
13
- CAS_STR_AUTHENTICATION_WANTED 
14
- => 'Authentication CAS n�cessaire&nbsp;!',
15
- CAS_STR_LOGOUT 
16
- => 'D�connexion demand�e&nbsp;!',
17
- CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED 
18
- => 'Vous auriez du etre redirig�(e) vers le serveur CAS. Cliquez <a href="%s">ici</a> pour continuer.',
19
- CAS_STR_AUTHENTICATION_FAILED 
20
- => 'Authentification CAS infructueuse&nbsp;!',
21
- CAS_STR_YOU_WERE_NOT_AUTHENTICATED 
22
- => '<p>Vous n\'avez pas �t� authentifi�(e).</p><p>Vous pouvez soumettre votre requete � nouveau en cliquant <a href="%s">ici</a>.</p><p>Si le probl�me persiste, vous pouvez contacter <a href="mailto:%s">l\'administrateur de ce site</a>.</p>',
23
- CAS_STR_SERVICE_UNAVAILABLE
24
- => 'Le service `<b>%s</b>\' est indisponible (<b>%s</b>)'
11
+    CAS_STR_USING_SERVER 
12
+    => 'utilisant le serveur',
13
+    CAS_STR_AUTHENTICATION_WANTED 
14
+    => 'Authentication CAS n�cessaire&nbsp;!',
15
+    CAS_STR_LOGOUT 
16
+    => 'D�connexion demand�e&nbsp;!',
17
+    CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED 
18
+    => 'Vous auriez du etre redirig�(e) vers le serveur CAS. Cliquez <a href="%s">ici</a> pour continuer.',
19
+    CAS_STR_AUTHENTICATION_FAILED 
20
+    => 'Authentification CAS infructueuse&nbsp;!',
21
+    CAS_STR_YOU_WERE_NOT_AUTHENTICATED 
22
+    => '<p>Vous n\'avez pas �t� authentifi�(e).</p><p>Vous pouvez soumettre votre requete � nouveau en cliquant <a href="%s">ici</a>.</p><p>Si le probl�me persiste, vous pouvez contacter <a href="mailto:%s">l\'administrateur de ce site</a>.</p>',
23
+    CAS_STR_SERVICE_UNAVAILABLE
24
+    => 'Le service `<b>%s</b>\' est indisponible (<b>%s</b>)'
25 25
 
26 26
 );
27 27
 
Please login to merge, or discard this patch.
main/auth/cas/lib/CAS/languages/spanish.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,20 +8,20 @@
 block discarded – undo
8 8
  */
9 9
 
10 10
 $this->_strings = array(
11
- CAS_STR_USING_SERVER 
12
- => 'usando servidor',
13
- CAS_STR_AUTHENTICATION_WANTED 
14
- => '¡Autentificación CAS necesaria!',
15
- CAS_STR_LOGOUT 
16
- => '¡Salida CAS necesaria!',
17
- CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED 
18
- => 'Ya debería haber sido redireccionado al servidor CAS. Haga click <a href="%s">aquí</a> para continuar.',
19
- CAS_STR_AUTHENTICATION_FAILED 
20
- => '¡Autentificación CAS fallida!',
21
- CAS_STR_YOU_WERE_NOT_AUTHENTICATED 
22
- => '<p>No estás autentificado.</p><p>Puedes volver a intentarlo haciendo click <a href="%s">aquí</a>.</p><p>Si el problema persiste debería contactar con el <a href="mailto:%s">administrador de este sitio</a>.</p>',
23
- CAS_STR_SERVICE_UNAVAILABLE
24
- => 'El servicio `<b>%s</b>\' no está disponible (<b>%s</b>).'
11
+    CAS_STR_USING_SERVER 
12
+    => 'usando servidor',
13
+    CAS_STR_AUTHENTICATION_WANTED 
14
+    => '¡Autentificación CAS necesaria!',
15
+    CAS_STR_LOGOUT 
16
+    => '¡Salida CAS necesaria!',
17
+    CAS_STR_SHOULD_HAVE_BEEN_REDIRECTED 
18
+    => 'Ya debería haber sido redireccionado al servidor CAS. Haga click <a href="%s">aquí</a> para continuar.',
19
+    CAS_STR_AUTHENTICATION_FAILED 
20
+    => '¡Autentificación CAS fallida!',
21
+    CAS_STR_YOU_WERE_NOT_AUTHENTICATED 
22
+    => '<p>No estás autentificado.</p><p>Puedes volver a intentarlo haciendo click <a href="%s">aquí</a>.</p><p>Si el problema persiste debería contactar con el <a href="mailto:%s">administrador de este sitio</a>.</p>',
23
+    CAS_STR_SERVICE_UNAVAILABLE
24
+    => 'El servicio `<b>%s</b>\' no está disponible (<b>%s</b>).'
25 25
 );
26 26
 
27 27
 ?>
Please login to merge, or discard this patch.
main/auth/courses.php 2 patches
Switch Indentation   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -171,29 +171,53 @@  discard block
 block discarded – undo
171 171
 }
172 172
 
173 173
 switch ($action) {
174
-    case 'subscribe_user_with_password':
175
-        $courses_controller->subscribe_user(
176
-            $_POST['subscribe_user_with_password'],
177
-            $_POST['search_term'],
178
-            $_POST['category_code']
179
-        );
180
-        exit;
181
-        break;
182
-    case 'createcoursecategory':
183
-        $courses_controller->categories_list($action);
184
-        break;
185
-    case 'deletecoursecategory':
186
-        $courses_controller->courses_list($action);
187
-        break;
188
-    case 'sortmycourses':
189
-        $courses_controller->courses_list($action);
190
-        break;
191
-    case 'subscribe':
192
-        if (!$user_can_view_page) {
193
-            api_not_allowed(true);
194
-        }
195
-
196
-        if (!CoursesAndSessionsCatalog::is(CATALOG_SESSIONS)) {
174
+        case 'subscribe_user_with_password':
175
+            $courses_controller->subscribe_user(
176
+                $_POST['subscribe_user_with_password'],
177
+                $_POST['search_term'],
178
+                $_POST['category_code']
179
+            );
180
+            exit;
181
+            break;
182
+        case 'createcoursecategory':
183
+            $courses_controller->categories_list($action);
184
+            break;
185
+        case 'deletecoursecategory':
186
+            $courses_controller->courses_list($action);
187
+            break;
188
+        case 'sortmycourses':
189
+            $courses_controller->courses_list($action);
190
+            break;
191
+        case 'subscribe':
192
+            if (!$user_can_view_page) {
193
+                api_not_allowed(true);
194
+            }
195
+
196
+            if (!CoursesAndSessionsCatalog::is(CATALOG_SESSIONS)) {
197
+                $courses_controller->courses_categories(
198
+                    $action,
199
+                    $categoryCode,
200
+                    null,
201
+                    null,
202
+                    null,
203
+                    $limit
204
+                );
205
+            } else {
206
+                header('Location: ' . api_get_self());
207
+            }
208
+            break;
209
+        case 'display_random_courses':
210
+            if (!$user_can_view_page) {
211
+                api_not_allowed(true);
212
+            }
213
+
214
+            $courses_controller->courses_categories($action);
215
+            break;
216
+        case 'display_courses':
217
+            if (!$user_can_view_page) {
218
+                api_not_allowed(true);
219
+            }
220
+
197 221
             $courses_controller->courses_categories(
198 222
                 $action,
199 223
                 $categoryCode,
@@ -202,126 +226,102 @@  discard block
 block discarded – undo
202 226
                 null,
203 227
                 $limit
204 228
             );
205
-        } else {
206
-            header('Location: ' . api_get_self());
207
-        }
208
-        break;
209
-    case 'display_random_courses':
210
-        if (!$user_can_view_page) {
211
-            api_not_allowed(true);
212
-        }
213
-
214
-        $courses_controller->courses_categories($action);
215
-        break;
216
-    case 'display_courses':
217
-        if (!$user_can_view_page) {
218
-            api_not_allowed(true);
219
-        }
220
-
221
-        $courses_controller->courses_categories(
222
-            $action,
223
-            $categoryCode,
224
-            null,
225
-            null,
226
-            null,
227
-            $limit
228
-        );
229
-        break;
230
-    case 'display_sessions':
231
-        if (!$user_can_view_page) {
232
-            api_not_allowed(true);
233
-        }
234
-
235
-        $courses_controller->sessionsList($action, $nameTools, $limit);
236
-        break;
237
-    case 'subscribe_to_session':
238
-        if (!$user_can_view_page) {
239
-            api_not_allowed(true);
240
-        }
241
-
242
-        $userId = api_get_user_id();
243
-        $confirmed = isset($_GET['confirm']);
244
-        $sessionId = intval($_GET['session_id']);
245
-
246
-        if (empty($userId)) {
247
-            api_not_allowed();
248
-            exit;
249
-        }
229
+            break;
230
+        case 'display_sessions':
231
+            if (!$user_can_view_page) {
232
+                api_not_allowed(true);
233
+            }
234
+
235
+            $courses_controller->sessionsList($action, $nameTools, $limit);
236
+            break;
237
+        case 'subscribe_to_session':
238
+            if (!$user_can_view_page) {
239
+                api_not_allowed(true);
240
+            }
250 241
 
251
-        if (!$confirmed) {
252
-            $template = new Template(null, false, false, false, false, false);
253
-            $template->assign('session_id', $sessionId);
242
+            $userId = api_get_user_id();
243
+            $confirmed = isset($_GET['confirm']);
244
+            $sessionId = intval($_GET['session_id']);
254 245
 
255
-            $layout = $template->get_template('auth/confirm_session_subscription.tpl');
246
+            if (empty($userId)) {
247
+                api_not_allowed();
248
+                exit;
249
+            }
256 250
 
257
-            echo $template->fetch($layout);
258
-            exit;
259
-        }
251
+            if (!$confirmed) {
252
+                $template = new Template(null, false, false, false, false, false);
253
+                $template->assign('session_id', $sessionId);
260 254
 
261
-        $registrationAllowed = api_get_setting('catalog_allow_session_auto_subscription');
262
-        if ($registrationAllowed === 'true') {
263
-            $entityManager = Database::getManager();
264
-            $repository = $entityManager->getRepository('ChamiloCoreBundle:SequenceResource');
255
+                $layout = $template->get_template('auth/confirm_session_subscription.tpl');
265 256
 
266
-            $sequences = $repository->getRequirements(
267
-                $sessionId,
268
-                SequenceResource::SESSION_TYPE
269
-            );
257
+                echo $template->fetch($layout);
258
+                exit;
259
+            }
260
+
261
+            $registrationAllowed = api_get_setting('catalog_allow_session_auto_subscription');
262
+            if ($registrationAllowed === 'true') {
263
+                $entityManager = Database::getManager();
264
+                $repository = $entityManager->getRepository('ChamiloCoreBundle:SequenceResource');
270 265
 
271
-            if (count($sequences) > 0) {
272
-                $requirementsData = SequenceResourceManager::checkRequirementsForUser(
273
-                    $sequences,
274
-                    SequenceResource::SESSION_TYPE,
275
-                    $userId
266
+                $sequences = $repository->getRequirements(
267
+                    $sessionId,
268
+                    SequenceResource::SESSION_TYPE
276 269
                 );
277 270
 
278
-                $continueWithSubscription = SequenceResourceManager::checkSequenceAreCompleted($requirementsData);
271
+                if (count($sequences) > 0) {
272
+                    $requirementsData = SequenceResourceManager::checkRequirementsForUser(
273
+                        $sequences,
274
+                        SequenceResource::SESSION_TYPE,
275
+                        $userId
276
+                    );
279 277
 
280
-                if (!$continueWithSubscription) {
281
-                    header('Location: ' .  api_get_path(WEB_CODE_PATH) . 'auth/courses.php');
282
-                    exit;
278
+                    $continueWithSubscription = SequenceResourceManager::checkSequenceAreCompleted($requirementsData);
279
+
280
+                    if (!$continueWithSubscription) {
281
+                        header('Location: ' .  api_get_path(WEB_CODE_PATH) . 'auth/courses.php');
282
+                        exit;
283
+                    }
283 284
                 }
284
-            }
285 285
 
286
-            SessionManager::suscribe_users_to_session(
287
-                $_GET['session_id'],
288
-                array($userId),
289
-                SESSION_VISIBLE_READ_ONLY,
290
-                false
291
-            );
286
+                SessionManager::suscribe_users_to_session(
287
+                    $_GET['session_id'],
288
+                    array($userId),
289
+                    SESSION_VISIBLE_READ_ONLY,
290
+                    false
291
+                );
292 292
 
293
-            $coursesList = SessionManager::get_course_list_by_session_id($_GET['session_id']);
294
-            $count = count($coursesList);
295
-            $url = '';
296
-
297
-            if ($count <= 0) {
298
-                // no course in session -> return to catalog
299
-                $url = api_get_path(WEB_CODE_PATH) . 'auth/courses.php';
300
-            } elseif ($count == 1) {
301
-                // only one course, so redirect directly to this course
302
-                foreach ($coursesList as $course) {
303
-                    $url = api_get_path(WEB_COURSE_PATH) . $course['directory'] . '/index.php?id_session=' . intval($_GET['session_id']);
293
+                $coursesList = SessionManager::get_course_list_by_session_id($_GET['session_id']);
294
+                $count = count($coursesList);
295
+                $url = '';
296
+
297
+                if ($count <= 0) {
298
+                    // no course in session -> return to catalog
299
+                    $url = api_get_path(WEB_CODE_PATH) . 'auth/courses.php';
300
+                } elseif ($count == 1) {
301
+                    // only one course, so redirect directly to this course
302
+                    foreach ($coursesList as $course) {
303
+                        $url = api_get_path(WEB_COURSE_PATH) . $course['directory'] . '/index.php?id_session=' . intval($_GET['session_id']);
304
+                    }
305
+                } else {
306
+                    $url = api_get_path(WEB_CODE_PATH) . 'session/index.php?session_id=' . intval($_GET['session_id']);
304 307
                 }
305
-            } else {
306
-                $url = api_get_path(WEB_CODE_PATH) . 'session/index.php?session_id=' . intval($_GET['session_id']);
308
+                header('Location: ' . $url);
309
+                exit;
307 310
             }
308
-            header('Location: ' . $url);
309
-            exit;
310
-        }
311
-        //else show error message?
312
-        break;
313
-    case 'search_tag':
314
-        if (!$user_can_view_page) {
315
-            api_not_allowed(true);
316
-        }
317
-
318
-        $courses_controller->sessionsListByCoursesTag($limit);
319
-        break;
320
-    case 'search_session':
321
-        if (!$user_can_view_page) {
322
-            api_not_allowed(true);
323
-        }
324
-
325
-        $courses_controller->sessionListBySearch($limit);
326
-        break;
311
+            //else show error message?
312
+            break;
313
+        case 'search_tag':
314
+            if (!$user_can_view_page) {
315
+                api_not_allowed(true);
316
+            }
317
+
318
+            $courses_controller->sessionsListByCoursesTag($limit);
319
+            break;
320
+        case 'search_session':
321
+            if (!$user_can_view_page) {
322
+                api_not_allowed(true);
323
+            }
324
+
325
+            $courses_controller->sessionListBySearch($limit);
326
+            break;
327 327
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
                 $limit
204 204
             );
205 205
         } else {
206
-            header('Location: ' . api_get_self());
206
+            header('Location: '.api_get_self());
207 207
         }
208 208
         break;
209 209
     case 'display_random_courses':
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
                 $continueWithSubscription = SequenceResourceManager::checkSequenceAreCompleted($requirementsData);
279 279
 
280 280
                 if (!$continueWithSubscription) {
281
-                    header('Location: ' .  api_get_path(WEB_CODE_PATH) . 'auth/courses.php');
281
+                    header('Location: '.api_get_path(WEB_CODE_PATH).'auth/courses.php');
282 282
                     exit;
283 283
                 }
284 284
             }
@@ -296,16 +296,16 @@  discard block
 block discarded – undo
296 296
 
297 297
             if ($count <= 0) {
298 298
                 // no course in session -> return to catalog
299
-                $url = api_get_path(WEB_CODE_PATH) . 'auth/courses.php';
299
+                $url = api_get_path(WEB_CODE_PATH).'auth/courses.php';
300 300
             } elseif ($count == 1) {
301 301
                 // only one course, so redirect directly to this course
302 302
                 foreach ($coursesList as $course) {
303
-                    $url = api_get_path(WEB_COURSE_PATH) . $course['directory'] . '/index.php?id_session=' . intval($_GET['session_id']);
303
+                    $url = api_get_path(WEB_COURSE_PATH).$course['directory'].'/index.php?id_session='.intval($_GET['session_id']);
304 304
                 }
305 305
             } else {
306
-                $url = api_get_path(WEB_CODE_PATH) . 'session/index.php?session_id=' . intval($_GET['session_id']);
306
+                $url = api_get_path(WEB_CODE_PATH).'session/index.php?session_id='.intval($_GET['session_id']);
307 307
             }
308
-            header('Location: ' . $url);
308
+            header('Location: '.$url);
309 309
             exit;
310 310
         }
311 311
         //else show error message?
Please login to merge, or discard this patch.
main/auth/gotocourse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
     $msg .= '<div class="well_login">';
43 43
     $msg .= $form->return_form();
44
-    $msg .='</div>';
44
+    $msg .= '</div>';
45 45
     if (api_is_cas_activated()) {
46 46
         $msg .= "</div>";
47 47
     }
Please login to merge, or discard this patch.
main/auth/conditional_login/complete_phone_number.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 $url =  api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php';
6 6
 
7 7
 if (! isset($_SESSION['conditional_login']['uid']))
8
-  die("Not Authorised");
8
+    die("Not Authorised");
9 9
 ?>
10 10
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
11 11
 <html lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml">
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@  discard block
 block discarded – undo
2 2
 /* For licensing terms, see /license.txt */
3 3
 
4 4
 require_once dirname(__FILE__).'/../../inc/global.inc.php';
5
-$url =  api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php';
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
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
   </body>
21 21
 </html>
22 22
 <?php
23
-if (isset($_POST['submit'])){
23
+if (isset($_POST['submit'])) {
24 24
     $u = api_get_user_info($_SESSION['conditional_login']['uid']);
25 25
     $u['phone'] = $_POST['phone_number'];
26 26
     $password = null; // we don't want to change the password
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,8 +4,9 @@
 block discarded – undo
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">
Please login to merge, or discard this patch.