Completed
Push — 1.10.x ( fe0e5a...3a6f9c )
by Yannick
134:15 queued 86:39
created
main/auth/courses_controller.php 1 patch
Spacing   +17 added lines, -18 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @param string   $message confirmation message(optional)
62 62
      * @param string   $error error message(optional)
63 63
      */
64
-    public function categories_list($action, $message='', $error='')
64
+    public function categories_list($action, $message = '', $error = '')
65 65
     {
66 66
         $data = array();
67 67
         $data['user_course_categories'] = $this->model->get_user_course_categories();
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
         // we need only the course codes as these will be used to match against the courses of the category
118 118
         if ($user_courses != '') {
119
-            foreach($user_courses as $key => $value) {
119
+            foreach ($user_courses as $key => $value) {
120 120
                 $user_coursecodes[] = $value['code'];
121 121
             }
122 122
         }
@@ -385,13 +385,13 @@  discard block
 block discarded – undo
385 385
                     $html .= '</strong>';
386 386
                 } else {
387 387
                     if (!empty($categoryCourses)) {
388
-                        $html .= '<a href="' . getCourseCategoryUrl(
388
+                        $html .= '<a href="'.getCourseCategoryUrl(
389 389
                                 1,
390 390
                                 $limit['length'],
391 391
                                 $categoryCode,
392 392
                                 $hiddenLinks,
393 393
                                 $action
394
-                            ) . '">';
394
+                            ).'">';
395 395
                         $html .= "$categoryName ($categoryCourses)";
396 396
                         $html .= '</a>';
397 397
                     } else {
@@ -412,13 +412,13 @@  discard block
 block discarded – undo
412 412
                         if ($code == $subCategory1Code) {
413 413
                             $html .= "<strong>$subCategory1Name ($subCategory1Courses)</strong>";
414 414
                         } else {
415
-                            $html .= '<a href="' . getCourseCategoryUrl(
415
+                            $html .= '<a href="'.getCourseCategoryUrl(
416 416
                                     1,
417 417
                                     $limit['length'],
418 418
                                     $categoryCode,
419 419
                                     $hiddenLinks,
420 420
                                     $action
421
-                                ) . '">';
421
+                                ).'">';
422 422
                             $html .= "$subCategory1Name ($subCategory1Courses)";
423 423
                             $html .= '</a>';
424 424
                         }
@@ -436,13 +436,13 @@  discard block
 block discarded – undo
436 436
                                 if ($code == $subCategory2Code) {
437 437
                                     $html .= "<strong>$subCategory2Name ($subCategory2Courses)</strong>";
438 438
                                 } else {
439
-                                    $html .= '<a href="' . getCourseCategoryUrl(
439
+                                    $html .= '<a href="'.getCourseCategoryUrl(
440 440
                                             1,
441 441
                                             $limit['length'],
442 442
                                             $categoryCode,
443 443
                                             $hiddenLinks,
444 444
                                             $action
445
-                                        ) . '">';
445
+                                        ).'">';
446 446
                                     $html .= "$subCategory2Name ($subCategory2Courses)";
447 447
                                     $html .= '</a>';
448 448
                                 }
@@ -460,13 +460,13 @@  discard block
 block discarded – undo
460 460
                                         if ($code == $subCategory3Code) {
461 461
                                             $html .= "<strong>$subCategory3Name ($subCategory3Courses)</strong>";
462 462
                                         } else {
463
-                                            $html .= '<a href="' . getCourseCategoryUrl(
463
+                                            $html .= '<a href="'.getCourseCategoryUrl(
464 464
                                                     1,
465 465
                                                     $limit['length'],
466 466
                                                     $categoryCode,
467 467
                                                     $hiddenLinks,
468 468
                                                     $action
469
-                                                ) . '">';
469
+                                                ).'">';
470 470
                                             $html .= "$subCategory3Name ($subCategory3Courses)";
471 471
                                             $html .= '</a>';
472 472
                                         }
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
         $icon = '<em class="fa fa-smile-o"></em>';
594 594
 
595 595
         return Display::div(
596
-            $icon . ' ' . get_lang("AlreadyRegisteredToSession"),
596
+            $icon.' '.get_lang("AlreadyRegisteredToSession"),
597 597
             array('class' => 'info-catalog')
598 598
         );
599 599
     }
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
      */
606 606
     public function getSessionIcon($sessionName)
607 607
     {
608
-        return Display::return_icon('window_list.png', $sessionName, null,ICON_SIZE_MEDIUM);
608
+        return Display::return_icon('window_list.png', $sessionName, null, ICON_SIZE_MEDIUM);
609 609
     }
610 610
 
611 611
     /**
@@ -626,8 +626,7 @@  discard block
 block discarded – undo
626 626
         $pageTotal = intval(ceil(intval($countSessions) / $limit['length']));
627 627
         // Do NOT show pagination if only one page or less
628 628
         $cataloguePagination = $pageTotal > 1 ?
629
-            getCataloguePagination($limit['current'], $limit['length'], $pageTotal) :
630
-            '';
629
+            getCataloguePagination($limit['current'], $limit['length'], $pageTotal) : '';
631 630
         $sessionsBlocks = $this->getFormatedSessionsBlock($sessions);
632 631
 
633 632
         // Get session list catalogue URL
@@ -638,13 +637,13 @@  discard block
 block discarded – undo
638 637
         $tpl = new Template();
639 638
         $tpl->assign('show_courses', CoursesAndSessionsCatalog::showCourses());
640 639
         $tpl->assign('show_sessions', CoursesAndSessionsCatalog::showSessions());
641
-        $tpl->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false));
640
+        $tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false));
642 641
         $tpl->assign('course_url', $courseUrl);
643 642
         $tpl->assign('catalog_pagination', $cataloguePagination);
644 643
         $tpl->assign('hidden_links', $hiddenLinks);
645 644
         $tpl->assign('search_token', Security::get_token());
646 645
         $tpl->assign('search_date', $date);
647
-        $tpl->assign('web_session_courses_ajax_url', api_get_path(WEB_AJAX_PATH) . 'course.ajax.php');
646
+        $tpl->assign('web_session_courses_ajax_url', api_get_path(WEB_AJAX_PATH).'course.ajax.php');
648 647
         $tpl->assign('sessions', $sessionsBlocks);
649 648
         $tpl->assign('already_subscribed_label', $this->getAlreadyRegisteredInSessionLabel());
650 649
 
@@ -671,7 +670,7 @@  discard block
 block discarded – undo
671 670
 
672 671
         $tpl->assign('show_courses', CoursesAndSessionsCatalog::showCourses());
673 672
         $tpl->assign('show_sessions', CoursesAndSessionsCatalog::showSessions());
674
-        $tpl->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false));
673
+        $tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false));
675 674
         $tpl->assign('course_url', $courseUrl);
676 675
         $tpl->assign('already_subscribed_label', $this->getAlreadyRegisteredInSessionLabel());
677 676
         $tpl->assign('hidden_links', $hiddenLinks);
@@ -702,7 +701,7 @@  discard block
 block discarded – undo
702 701
         $tpl = new Template();
703 702
         $tpl->assign('show_courses', CoursesAndSessionsCatalog::showCourses());
704 703
         $tpl->assign('show_sessions', CoursesAndSessionsCatalog::showSessions());
705
-        $tpl->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false));
704
+        $tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false));
706 705
         $tpl->assign('course_url', $courseUrl);
707 706
         $tpl->assign('already_subscribed_label', $this->getAlreadyRegisteredInSessionLabel());
708 707
         $tpl->assign('hidden_links', $hiddenLinks);
Please login to merge, or discard this patch.
main/auth/courses.php 1 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 1 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.
main/auth/my_progress.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,16 +54,16 @@  discard block
 block discarded – undo
54 54
         }
55 55
         $course_info = api_get_course_info_by_id($result['c_id']);
56 56
         $course_image = '<img src="'.$course_info['course_image_large'].'">';
57
-        $dates .= '<li><a href="#'.$login.'">' . api_convert_and_format_date($login, DATE_FORMAT_SHORT) . '</a></li>';
57
+        $dates .= '<li><a href="#'.$login.'">'.api_convert_and_format_date($login, DATE_FORMAT_SHORT).'</a></li>';
58 58
         $issues .= '<li id ="'.$login.'">';
59 59
         $issues .= '<div class="img-course">'.$course_image.'</div>';
60 60
         
61 61
         $issues .= '<div class="text-course">';
62
-        $issues .= '<p>' . sprintf(
62
+        $issues .= '<p>'.sprintf(
63 63
                 get_lang('YouHaveEnteredTheCourseXInY'),
64
-                '" '. $courseInfo['name'] .' "',
64
+                '" '.$courseInfo['name'].' "',
65 65
                 api_convert_and_format_date($login, DATE_TIME_FORMAT_LONG) 
66
-                ) . '</p>';
66
+                ).'</p>';
67 67
         $issues .= '</div>'; 
68 68
         $issues .= '</li>';
69 69
         $count++;
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
     $content .= '<div class="row">';
83 83
     $content .= '<div class="col-md-12">';
84 84
     $content .= '<div id="my_timeline">';
85
-    $content .= '<ul id="dates">' . $dates . '</ul>';
86
-    $content .= '<ul id="issues">' . $issues . '</ul>';
85
+    $content .= '<ul id="dates">'.$dates.'</ul>';
86
+    $content .= '<ul id="issues">'.$issues.'</ul>';
87 87
     $content .= '<div id="grad_left"></div>';
88 88
     $content .= '<div id="grad_right"></div>';
89 89
     $content .= '<a href="#" id="prev"></a>';
Please login to merge, or discard this patch.
facebook-php-sdk/src/Facebook/FacebookSignedRequestFromInputHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,8 +157,8 @@
 block discarded – undo
157 157
    */
158 158
   public function getRawSignedRequestFromCookie()
159 159
   {
160
-    if (isset($_COOKIE['fbsr_' . $this->appId])) {
161
-      return $_COOKIE['fbsr_' . $this->appId];
160
+    if (isset($_COOKIE['fbsr_'.$this->appId])) {
161
+      return $_COOKIE['fbsr_'.$this->appId];
162 162
     }
163 163
     return null;
164 164
   }
Please login to merge, or discard this patch.
facebook-php-sdk/src/Facebook/FacebookRedirectLoginHelper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
       'client_id' => $this->appId,
100 100
       'redirect_uri' => $this->redirectUrl,
101 101
       'state' => $this->state,
102
-      'sdk' => 'php-sdk-' . FacebookRequest::VERSION,
102
+      'sdk' => 'php-sdk-'.FacebookRequest::VERSION,
103 103
       'scope' => implode(',', $scope)
104 104
     );
105 105
     
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
       $params['display'] = 'popup';
109 109
     }
110 110
     
111
-    return 'https://www.facebook.com/' . $version . '/dialog/oauth?' .
111
+    return 'https://www.facebook.com/'.$version.'/dialog/oauth?'.
112 112
       http_build_query($params, null, '&');
113 113
   }
114 114
 
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
       'client_id' => $this->appId,
130 130
       'redirect_uri' => $this->redirectUrl,
131 131
       'state' => $this->state,
132
-      'sdk' => 'php-sdk-' . FacebookRequest::VERSION,
132
+      'sdk' => 'php-sdk-'.FacebookRequest::VERSION,
133 133
       'auth_type' => 'rerequest',
134 134
       'scope' => implode(',', $scope)
135 135
     );
136
-    return 'https://www.facebook.com/' . $version . '/dialog/oauth?' .
136
+    return 'https://www.facebook.com/'.$version.'/dialog/oauth?'.
137 137
       http_build_query($params, null, '&');
138 138
   }
139 139
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
       'next' => $next,
160 160
       'access_token' => $session->getToken()
161 161
     );
162
-    return 'https://www.facebook.com/logout.php?' . http_build_query($params, null, '&');
162
+    return 'https://www.facebook.com/logout.php?'.http_build_query($params, null, '&');
163 163
   }
164 164
 
165 165
   /**
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         'Session not active, could not store state.', 720
235 235
       );
236 236
     }
237
-    $_SESSION[$this->sessionPrefix . 'state'] = $state;
237
+    $_SESSION[$this->sessionPrefix.'state'] = $state;
238 238
   }
239 239
 
240 240
   /**
@@ -255,8 +255,8 @@  discard block
 block discarded – undo
255 255
         'Session not active, could not load state.', 721
256 256
       );
257 257
     }
258
-    if (isset($_SESSION[$this->sessionPrefix . 'state'])) {
259
-      $this->state = $_SESSION[$this->sessionPrefix . 'state'];
258
+    if (isset($_SESSION[$this->sessionPrefix.'state'])) {
259
+      $this->state = $_SESSION[$this->sessionPrefix.'state'];
260 260
       return $this->state;
261 261
     }
262 262
     return null;
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
       if ($fp !== FALSE) {
294 294
         $buf = fread($fp, $bytes);
295 295
         fclose($fp);
296
-        if($buf !== FALSE) {
296
+        if ($buf !== FALSE) {
297 297
           return bin2hex($buf);
298 298
         }
299 299
       }
Please login to merge, or discard this patch.
main/auth/external_login/facebook-php-sdk/src/Facebook/FacebookResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@
 block discarded – undo
189 189
       $url = parse_url($this->responseData->paging->$direction);
190 190
       parse_str($url['query'], $params);
191 191
 
192
-      if (isset($params['type']) && strpos($this->request->getPath(), $params['type']) !== false){
192
+      if (isset($params['type']) && strpos($this->request->getPath(), $params['type']) !== false) {
193 193
         unset($params['type']);
194 194
       }
195 195
       return new FacebookRequest(
Please login to merge, or discard this patch.
facebook-php-sdk/src/Facebook/HttpClients/FacebookCurlHttpClient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
       CURLOPT_HEADER         => true, // Enable header processing
178 178
       CURLOPT_SSL_VERIFYHOST => 2,
179 179
       CURLOPT_SSL_VERIFYPEER => true,
180
-      CURLOPT_CAINFO         => __DIR__ . '/certs/DigiCertHighAssuranceEVRootCA.pem',
180
+      CURLOPT_CAINFO         => __DIR__.'/certs/DigiCertHighAssuranceEVRootCA.pem',
181 181
     );
182 182
 
183 183
     if ($method !== "GET") {
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     $return = array();
237 237
 
238 238
     foreach ($this->requestHeaders as $key => $value) {
239
-      $return[] = $key . ': ' . $value;
239
+      $return[] = $key.': '.$value;
240 240
     }
241 241
 
242 242
     return $return;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     $headerSize = self::$facebookCurl->getinfo(CURLINFO_HEADER_SIZE);
301 301
     // This corrects a Curl bug where header size does not account
302 302
     // for additional Proxy headers.
303
-    if ( self::needsCurlProxyFix() ) {
303
+    if (self::needsCurlProxyFix()) {
304 304
       // Additional way to calculate the request body size.
305 305
       if (preg_match('/Content-Length: (\d+)/', $this->rawResponse, $m)) {
306 306
           $headerSize = mb_strlen($this->rawResponse) - $m[1];
Please login to merge, or discard this patch.