Completed
Push — 1.11.x ( 52cc6f...bf3cbb )
by José
80:28 queued 41:29
created
main/lp/lp_impress.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         //just showing the src in a iframe ...
82 82
         $html .= '<h2>'.$toc['title'].'</h2>';
83 83
         $html .= '<iframe border="0" frameborder="0" style="width:100%;height:600px" src="' . $src . '"></iframe>';
84
-    }else{
84
+    } else{
85 85
         $html .= "<div class='impress-title'>";
86 86
         $html .= '<h1>'.$toc['title'].'</h1>';
87 87
         $html .= "</div>";
Please login to merge, or discard this patch.
main/lp/openoffice_text_document.class.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,8 +119,9 @@
 block discarded – undo
119 119
 
120 120
         for ($i = 0; $i<count($matches[0]); $i++) {
121 121
 
122
-            if (empty($matches[1][$i]))
123
-                continue;
122
+            if (empty($matches[1][$i])) {
123
+                            continue;
124
+            }
124 125
 
125 126
             $content = api_strstr($content, $matches[0][$i]);
126 127
             if ($i + 1 !== count($matches[0])) {
Please login to merge, or discard this patch.
main/session/add_courses_to_session.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -207,7 +207,10 @@  discard block
 block discarded – undo
207 207
 
208 208
 unset($Courses);
209 209
 ?>
210
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $sessionId; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
210
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $sessionId; ?><?php if(!empty($_GET['add'])) {
211
+    echo '&add=true' ;
212
+}
213
+?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
211 214
     <legend><?php echo $tool_name.' ('.$session_info['name'].')'; ?></legend>
212 215
     <input type="hidden" name="formSent" value="1" />
213 216
 
@@ -230,7 +233,10 @@  discard block
 block discarded – undo
230 233
                 <div id="ajax_list_courses_multiple">
231 234
                     <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" class="form-control">
232 235
                         <?php foreach ($nosessionCourses as $enreg) { ?>
233
-                            <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) echo 'selected="selected"'; ?>>
236
+                            <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) {
237
+    echo 'selected="selected"';
238
+}
239
+?>>
234 240
                                 <?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?>
235 241
                             </option>
236 242
                         <?php } ?>
Please login to merge, or discard this patch.
main/inc/lib/course.lib.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3342,7 +3342,7 @@  discard block
 block discarded – undo
3342 3342
             $html .= '<a class="thumbnail" href="'.$params['link'].'">';
3343 3343
             $html .= $params['icon'];
3344 3344
             $html .= '</a>';
3345
-        }else{
3345
+        } else{
3346 3346
             $html .= $params['icon'];
3347 3347
         }
3348 3348
         $html .= '</div>';
@@ -3423,7 +3423,7 @@  discard block
 block discarded – undo
3423 3423
                                . Display::returnFontAwesomeIcon('folder-open') . '</a>';
3424 3424
                             $params['document'] .= Display::div('', ['id' => 'document_result_' . $course_info['real_id'] . '_0', 'class' => 'document_preview_container']);
3425 3425
                         }
3426
-                    }else{
3426
+                    } else{
3427 3427
                         if ($course_info['visibility'] != COURSE_VISIBILITY_CLOSED && $load_dirs) {
3428 3428
                             $params['document'] = '<a id="document_preview_' . $course_info['real_id'] . '_0" class="document_preview btn btn-default btn-sm" href="javascript:void(0);">'
3429 3429
                                . Display::returnFontAwesomeIcon('folder-open') . '</a>';
@@ -3598,7 +3598,7 @@  discard block
 block discarded – undo
3598 3598
             if ($showCustomIcon === 'true' && $iconName != 'course.png') {
3599 3599
                 $thumbnails = $course_info['course_image'];
3600 3600
                 $image = $course_info['course_image_large'];
3601
-            }else{
3601
+            } else{
3602 3602
                 $image = Display::return_icon('session_default.png', null, null, null,null, true);
3603 3603
             }
3604 3604
 
@@ -3736,7 +3736,7 @@  discard block
 block discarded – undo
3736 3736
             if ($showCustomIcon === 'true' && $iconName != 'course.png') {
3737 3737
                 $thumbnails = $course_info['course_image'];
3738 3738
                 $image = $course_info['course_image_large'];
3739
-            }else{
3739
+            } else{
3740 3740
                 $image = Display::return_icon('session_default.png', null, null, null,null, true);
3741 3741
             }
3742 3742
 
@@ -3998,7 +3998,7 @@  discard block
 block discarded – undo
3998 3998
         if ($showCustomIcon === 'true' && $iconName != 'course.png') {
3999 3999
             $thumbnails = $course_info['course_image'];
4000 4000
             $image = $course_info['course_image_large'];
4001
-        }else{
4001
+        } else{
4002 4002
             $image = Display::return_icon('session_default.png', null, null, null,null, true);
4003 4003
         }
4004 4004
         $params['thumbnails'] = $thumbnails;
Please login to merge, or discard this patch.
main/course_progress/thematic_plan.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,9 +9,10 @@
 block discarded – undo
9 9
 
10 10
 // actions menu
11 11
 $new_thematic_plan_data = array();
12
-if (!empty($thematic_plan_data))
13
-foreach($thematic_plan_data as $thematic_item) {
12
+if (!empty($thematic_plan_data)) {
13
+    foreach($thematic_plan_data as $thematic_item) {
14 14
     $thematic_simple_list[] = $thematic_item['description_type'];
15
+}
15 16
     $new_thematic_plan_data[$thematic_item['description_type']] = $thematic_item;
16 17
 }
17 18
 
Please login to merge, or discard this patch.
main/admin/subscribe_user2course.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -287,7 +287,10 @@  discard block
 block discarded – undo
287 287
     <td width="40%" align="center">
288 288
      <select name="UserList[]" multiple="multiple" size="20" style="width:300px;">
289 289
     <?php foreach ($db_users as $user) { ?>
290
-          <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'],$users)) echo 'selected="selected"'; ?>>
290
+          <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'],$users)) {
291
+    echo 'selected="selected"';
292
+}
293
+?>>
291 294
       <?php
292 295
         $userName = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')';
293 296
         if ($showOfficialCode) {
@@ -308,7 +311,10 @@  discard block
 block discarded – undo
308 311
    <td width="40%" align="center">
309 312
     <select name="CourseList[]" multiple="multiple" size="20" style="width:300px;">
310 313
     <?php foreach ($db_courses as $course) { ?>
311
-         <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) echo 'selected="selected"'; ?>>
314
+         <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) {
315
+    echo 'selected="selected"';
316
+}
317
+?>>
312 318
              <?php echo '('.$course['visual_code'].') '.$course['title']; ?>
313 319
          </option>
314 320
     <?php } ?>
Please login to merge, or discard this patch.
main/upload/upload.document.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,9 +64,10 @@
 block discarded – undo
64 64
     	$new_comment = isset($_POST['comment']) ? Database::escape_string(trim($_POST['comment'])) : '';
65 65
     	$new_title = isset($_POST['title']) ? Database::escape_string(trim($_POST['title'])) : '';
66 66
 
67
-    	if ($new_path && ($new_comment || $new_title))
68
-    	if (($docid = DocumentManager::get_document_id($_course, $new_path))) {
67
+    	if ($new_path && ($new_comment || $new_title)) {
68
+    	    	if (($docid = DocumentManager::get_document_id($_course, $new_path))) {
69 69
         	$table_document = Database::get_course_table(TABLE_DOCUMENT);
70
+    	}
70 71
         	$ct = '';
71 72
             if ($new_comment) {
72 73
                 $ct .= ", comment='$new_comment'";
Please login to merge, or discard this patch.
main/exercise/hotspot_admin.inc.php 1 patch
Braces   +29 added lines, -11 removed lines patch added patch discarded remove patch
@@ -679,12 +679,15 @@  discard block
 block discarded – undo
679 679
                                     $option1 = $option2 = $option3 = '';
680 680
                                     for ($k = 1; $k <= 100; $k++) {
681 681
                                         $selected1 = $selected2 = $selected3 = '';
682
-                                        if ($k == $threadhold1[$i])
683
-                                            $selected1 = 'selected="selected"';
684
-                                        if ($k == $threadhold2[$i])
685
-                                            $selected2 = 'selected="selected"';
686
-                                        if ($k == $threadhold3[$i])
687
-                                            $selected3 = 'selected="selected"';
682
+                                        if ($k == $threadhold1[$i]) {
683
+                                                                                    $selected1 = 'selected="selected"';
684
+                                        }
685
+                                        if ($k == $threadhold2[$i]) {
686
+                                                                                    $selected2 = 'selected="selected"';
687
+                                        }
688
+                                        if ($k == $threadhold3[$i]) {
689
+                                                                                    $selected3 = 'selected="selected"';
690
+                                        }
688 691
                                         $option1.='<option ' . $selected1 . ' >' . $k . ' % </option>';
689 692
                                         $option2.='<option ' . $selected2 . ' >' . $k . ' % </option>';
690 693
                                         $option3.='<option ' . $selected3 . '>' . $k . ' %</option>';
@@ -731,7 +734,10 @@  discard block
 block discarded – undo
731 734
                                                 <div class="checkbox">
732 735
                                                     <p>
733 736
                                                         <label>
734
-                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]"  <?php if ($try[$i] == 1) echo'checked'; ?> />
737
+                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]"  <?php if ($try[$i] == 1) {
738
+    echo'checked';
739
+}
740
+?> />
735 741
                                                             <?php echo get_lang('TryAgain'); ?>
736 742
                                                         </label>
737 743
                                                     </p>
@@ -784,7 +790,10 @@  discard block
 block discarded – undo
784 790
                                                             <div class="checkbox">
785 791
                                                                 <p>
786 792
                                                                     <label>
787
-                                                                        <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> />
793
+                                                                        <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) {
794
+    echo'checked';
795
+}
796
+?> />
788 797
                                                                         <?php echo get_lang('TryAgain'); ?>
789 798
                                                                     </label>
790 799
                                                                 </p>
@@ -823,7 +832,10 @@  discard block
 block discarded – undo
823 832
                                             <th ><?php echo get_lang('OAR'); ?>*</th>
824 833
                                             <?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
825 834
                                                 <th colspan="2" ><?php echo get_lang('Comment'); ?></th>
826
-                                                <th ><?php if ($answerType == HOT_SPOT_DELINEATION) echo get_lang('Scenario'); ?></th>
835
+                                                <th ><?php if ($answerType == HOT_SPOT_DELINEATION) {
836
+    echo get_lang('Scenario');
837
+}
838
+?></th>
827 839
                                             <?php } else { ?>
828 840
                                                 <th colspan="3" ><?php echo get_lang('Comment'); ?></th>
829 841
                                             <?php } ?>
@@ -849,7 +861,10 @@  discard block
 block discarded – undo
849 861
                                                 <div class="checkbox">
850 862
                                                     <p>
851 863
                                                         <label>
852
-                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if (isset($try[$i]) && $try[$i] == 1) echo'checked'; ?> />
864
+                                                            <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if (isset($try[$i]) && $try[$i] == 1) {
865
+    echo'checked';
866
+}
867
+?> />
853 868
                                                             <?php echo get_lang('TryAgain'); ?>
854 869
                                                         </label>
855 870
                                                     </p>
@@ -998,7 +1013,10 @@  discard block
 block discarded – undo
998 1013
                                         <div class="checkbox">
999 1014
                                             <p>
1000 1015
                                                 <label>
1001
-                                                    <input type="checkbox" class="checkbox" name="try_noerror" <?php if ($try_noerror == 1) echo'checked'; ?> />
1016
+                                                    <input type="checkbox" class="checkbox" name="try_noerror" <?php if ($try_noerror == 1) {
1017
+    echo'checked';
1018
+}
1019
+?> />
1002 1020
                                                     <?php echo get_lang('TryAgain'); ?>
1003 1021
                                                 </label>
1004 1022
                                             </p>
Please login to merge, or discard this patch.
main/inc/lib/blog.lib.php 1 patch
Braces   +26 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1007,8 +1007,9 @@  discard block
 block discarded – undo
1007 1007
             $blog_post_actions .= '</a>';
1008 1008
         }
1009 1009
 
1010
-        if (api_is_allowed('BLOG_' . $blog_id, 'article_rate'))
1011
-            $rating_select = Blog::display_rating_form('post',$blog_id,$post_id);
1010
+        if (api_is_allowed('BLOG_' . $blog_id, 'article_rate')) {
1011
+                    $rating_select = Blog::display_rating_form('post',$blog_id,$post_id);
1012
+        }
1012 1013
 
1013 1014
         $blog_post_text=stripslashes($blog_post_text);
1014 1015
 
@@ -1652,8 +1653,9 @@  discard block
 block discarded – undo
1652 1653
 
1653 1654
                         $arrPermissions = array();
1654 1655
 
1655
-                        while ($row = Database::fetch_array($result))
1656
-                            $arrPermissions[] = $row['action'];
1656
+                        while ($row = Database::fetch_array($result)) {
1657
+                                                    $arrPermissions[] = $row['action'];
1658
+                        }
1657 1659
 
1658 1660
                             echo '<tr>';
1659 1661
                             echo '<td style="text-align:right; vertical-align:top;">' . get_lang('TaskManager') . ':&nbsp;&nbsp;</td>';
@@ -2329,8 +2331,9 @@  discard block
 block discarded – undo
2329 2331
         //Handle leap year
2330 2332
         $numberofdays = array (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
2331 2333
 
2332
-        if(($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0))
2333
-            $numberofdays[2] = 29;
2334
+        if(($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0)) {
2335
+                    $numberofdays[2] = 29;
2336
+        }
2334 2337
 
2335 2338
         //Get the first day of the month
2336 2339
         $dayone = getdate(mktime(0, 0, 0, $month, 1, $year));
@@ -2360,8 +2363,9 @@  discard block
 block discarded – undo
2360 2363
         if( Database::num_rows($result) > 0) {
2361 2364
             while($blog_post = Database::fetch_array($result)) {
2362 2365
                 // If the day of this post is not yet in the array, add it.
2363
-                if (!in_array($blog_post['post_day'], $posts))
2364
-                    $posts[] = $blog_post['post_day'];
2366
+                if (!in_array($blog_post['post_day'], $posts)) {
2367
+                                    $posts[] = $blog_post['post_day'];
2368
+                }
2365 2369
             }
2366 2370
         }
2367 2371
 
@@ -2400,8 +2404,9 @@  discard block
 block discarded – undo
2400 2404
 
2401 2405
         echo "<tr>";
2402 2406
 
2403
-        for($ii = 1; $ii < 8; $ii ++)
2404
-            echo "<td class=\"weekdays\">", $DaysShort[$ii % 7], "</td>";
2407
+        for($ii = 1; $ii < 8; $ii ++) {
2408
+                    echo "<td class=\"weekdays\">", $DaysShort[$ii % 7], "</td>";
2409
+        }
2405 2410
 
2406 2411
         echo "</tr>";
2407 2412
 
@@ -2411,8 +2416,9 @@  discard block
 block discarded – undo
2411 2416
         while ($curday <= $numberofdays[$month]) {
2412 2417
             echo "<tr>";
2413 2418
             for ($ii = 0; $ii < 7; $ii ++) {
2414
-                if (($curday == -1) && ($ii == $startdayofweek))
2415
-                    $curday = 1;
2419
+                if (($curday == -1) && ($ii == $startdayofweek)) {
2420
+                                    $curday = 1;
2421
+                }
2416 2422
 
2417 2423
                 if (($curday > 0) && ($curday <= $numberofdays[$month])) {
2418 2424
                     $bgcolor = $ii < 5 ? $class="class=\"days_week\"" : $class="class=\"days_weekend\"";
@@ -2426,10 +2432,11 @@  discard block
 block discarded – undo
2426 2432
                     echo "<td " . $class.">";
2427 2433
 
2428 2434
                     // If there are posts on this day, create a filter link.
2429
-                    if(in_array($curday, $posts))
2430
-                        echo '<a href="blog.php?blog_id=' . $blog_id . '&filter=' . $year . '-' . $month . '-' . $curday . '&month=' . $month . '&year=' . $year . '" title="' . get_lang('ViewPostsOfThisDay') . '">' . $curday . '</a>';
2431
-                    else
2432
-                        echo $dayheader;
2435
+                    if(in_array($curday, $posts)) {
2436
+                                            echo '<a href="blog.php?blog_id=' . $blog_id . '&filter=' . $year . '-' . $month . '-' . $curday . '&month=' . $month . '&year=' . $year . '" title="' . get_lang('ViewPostsOfThisDay') . '">' . $curday . '</a>';
2437
+                    } else {
2438
+                                            echo $dayheader;
2439
+                    }
2433 2440
 
2434 2441
                     if (count($tasks) > 0) {
2435 2442
                         if (isset($tasks[$curday]) && is_array($tasks[$curday])) {
@@ -2444,8 +2451,9 @@  discard block
 block discarded – undo
2444 2451
 
2445 2452
                     echo "</td>";
2446 2453
                     $curday ++;
2447
-                } else
2448
-                    echo "<td>&nbsp;</td>";
2454
+                } else {
2455
+                                    echo "<td>&nbsp;</td>";
2456
+                }
2449 2457
             }
2450 2458
             echo "</tr>";
2451 2459
         }
Please login to merge, or discard this patch.