Passed
Push — 1.10.x ( 08890a...2189d7 )
by Yannick
116:38 queued 75:46
created
main/admin/access_url_edit_course_category_to_url.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -240,10 +240,11 @@
 block discarded – undo
240 240
 	<td colspan="3" align="center">
241 241
 		<br />
242 242
 		<?php
243
-		if(isset($_GET['add']))
244
-			echo '<button class="save" onclick="valide()" >'.get_lang('Add').'</button>';
245
-		else
246
-			echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>';
243
+		if(isset($_GET['add'])) {
244
+					echo '<button class="save" onclick="valide()" >'.get_lang('Add').'</button>';
245
+		} else {
246
+					echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>';
247
+		}
247 248
 		?>
248 249
 	</td>
249 250
 </tr>
Please login to merge, or discard this patch.
main/admin/configure_extensions.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
 ?>
216 216
 <div id="message" style="display: none">
217 217
 	<?php
218
-	if(!empty($message))
219
-		Display::display_normal_message($message)
218
+	if(!empty($message)) {
219
+			Display::display_normal_message($message)
220 220
 	?>
221 221
 </div>
222 222
 
@@ -297,7 +297,9 @@  discard block
 block discarded – undo
297 297
         </div>
298 298
             <div class="row">
299 299
                 <div class="col-md-5">
300
-                    <?php Display::display_icon('screenshot_ppt2lp.jpg', get_lang('Ppt2lp'), array('class'=>'img-responsive')); ?>
300
+                    <?php Display::display_icon('screenshot_ppt2lp.jpg', get_lang('Ppt2lp'), array('class'=>'img-responsive'));
301
+	}
302
+	?>
301 303
                 </div>
302 304
                 <div class="col-md-7">
303 305
                     <form method="POST" class="form-horizontal" action="<?php echo api_get_self(); ?>">
@@ -341,8 +343,7 @@  discard block
 block discarded – undo
341 343
 								$defaults[$row['subkey']] = $row['selected_value'];
342 344
 							}
343 345
 							$form->addButtonSave(get_lang('ReconfigureExtension'), 'activeExtension');
344
-						}
345
-						else {
346
+						} else {
346 347
 							$defaults['host'] = 'localhost';
347 348
 							$defaults['port'] = '2002';
348 349
 							$defaults['size'] = '720x540';
Please login to merge, or discard this patch.
main/admin/add_users_to_usergroup.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -345,7 +345,10 @@  discard block
 block discarded – undo
345 345
 $searchForm->display();
346 346
 echo '</div>';
347 347
 ?>
348
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;">
348
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) {
349
+    echo '&add=true' ;
350
+}
351
+?>" style="margin:0px;">
349 352
 <?php
350 353
 echo '<legend>'.$tool_name.': '.$data['name'].'</legend>';
351 354
 
@@ -420,7 +423,10 @@  discard block
 block discarded – undo
420 423
     ?>
421 424
     <br />
422 425
       <label class="control-label">
423
-          <input type="checkbox" <?php if ($user_with_any_group) echo 'checked="checked"';?> onchange="checked_in_no_group(this.checked);" name="user_with_any_group" id="user_with_any_group_id">
426
+          <input type="checkbox" <?php if ($user_with_any_group) {
427
+    echo 'checked="checked"';
428
+}
429
+?> onchange="checked_in_no_group(this.checked);" name="user_with_any_group" id="user_with_any_group_id">
424 430
           <?php echo get_lang('UsersRegisteredInAnyGroup'); ?>
425 431
       </label>
426 432
     </div>
Please login to merge, or discard this patch.
main/admin/special_exports.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -193,7 +193,10 @@
 block discarded – undo
193 193
         while (false!==($file = readdir($handle))) {
194 194
             if ($file != "." && $file != "..") {
195 195
                 $Diff = (time() - filemtime("$temp_zip_dir/$file"))/60/60;  //the "age" of the file in hours
196
-                if ($Diff > 4) unlink("$temp_zip_dir/$file");   //delete files older than 4 hours
196
+                if ($Diff > 4) {
197
+                    unlink("$temp_zip_dir/$file");
198
+                }
199
+                //delete files older than 4 hours
197 200
             }
198 201
         }
199 202
         closedir($handle);
Please login to merge, or discard this patch.
main/announcements/download.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,9 @@
 block discarded – undo
43 43
     //remove last slash if present
44 44
     //$doc_url = ($doc_url{strlen($doc_url)-1}=='/')?substr($doc_url,0,strlen($doc_url)-1):$doc_url;
45 45
     //mod_rewrite can change /some/path/ to /some/path// in some cases, so clean them all off (René)
46
-    while ($doc_url{$dul = strlen($doc_url)-1}=='/') $doc_url = substr($doc_url,0,$dul);
46
+    while ($doc_url{$dul = strlen($doc_url)-1}=='/') {
47
+        $doc_url = substr($doc_url,0,$dul);
48
+    }
47 49
     //create the path
48 50
     $document_explorer = api_get_path(WEB_COURSE_PATH).api_get_course_path(); // home course path
49 51
     //redirect
Please login to merge, or discard this patch.
main/announcements/announcements.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -483,8 +483,9 @@  discard block
 block discarded – undo
483 483
 
484 484
 if (api_is_allowed_to_edit() && $announcement_number > 1) {
485 485
     if (api_get_group_id() == 0 ) {
486
-        if (!$show_actions)
487
-            echo '<div class="actions">';
486
+        if (!$show_actions) {
487
+                    echo '<div class="actions">';
488
+        }
488 489
         if (!isset($_GET['action'])) {
489 490
             echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&action=delete_all\" onclick=\"javascript:if(!confirm('".get_lang("ConfirmYourChoice")."')) return false;\">".
490 491
                 Display::return_icon('delete_announce.png',get_lang('AnnouncementDeleteAll'),'',ICON_SIZE_MEDIUM)."</a>";
@@ -492,8 +493,9 @@  discard block
 block discarded – undo
492 493
     }
493 494
 }
494 495
 
495
-if ($show_actions)
496
+if ($show_actions) {
496 497
     echo '</div>';
498
+}
497 499
 
498 500
 Display::showFlash();
499 501
 
Please login to merge, or discard this patch.
main/survey/fillsurvey.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1132,7 +1132,7 @@
 block discarded – undo
1132 1132
                         $questions[$row['sort']]['survey_group_sec1'] = $row['survey_group_sec1'];
1133 1133
                         $questions[$row['sort']]['survey_group_sec2'] = $row['survey_group_sec2'];
1134 1134
                         $questions[$row['sort']]['survey_group_pri'] = $row['survey_group_pri'];
1135
-                    }  else {
1135
+                    } else {
1136 1136
                         // If the type is a page break we are finished loading the questions for this page
1137 1137
                         break;
1138 1138
                     }
Please login to merge, or discard this patch.
main/survey/survey.lib.php 1 patch
Braces   +3 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1247,7 +1247,7 @@  discard block
 block discarded – undo
1247 1247
                     '".Database::escape_string($_course['id'])."')";
1248 1248
             Database::query($sql);
1249 1249
             $shared_question_id = Database::insert_id();
1250
-        }  else {
1250
+        } else {
1251 1251
             // Updating an existing question
1252 1252
             // adding the question to the survey_question table
1253 1253
             $sql = "UPDATE $tbl_survey_question SET
@@ -2776,14 +2776,12 @@  discard block
 block discarded – undo
2776 2776
                                 echo $answers_of_user[$question_id][$option_id]['value'];
2777 2777
                                 echo "</td>";
2778 2778
                             }
2779
-                        }
2780
-                        else {
2779
+                        } else {
2781 2780
                             echo '<td align="center">';
2782 2781
                             if (!empty($answers_of_user[$question_id][$option_id])) {
2783 2782
                                 if ($answers_of_user[$question_id][$option_id]['value'] != 0) {
2784 2783
                                     echo $answers_of_user[$question_id][$option_id]['value'];
2785
-                                }
2786
-                                else {
2784
+                                } else {
2787 2785
                                     echo 'v';
2788 2786
                                 }
2789 2787
                             }
Please login to merge, or discard this patch.
main/survey/survey.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,9 @@
 block discarded – undo
124 124
 	}
125 125
 }
126 126
 
127
-if (!empty($survey_data['survey_version'])) echo '<b>'.get_lang('Version').': '.$survey_data['survey_version'].'</b>';
127
+if (!empty($survey_data['survey_version'])) {
128
+    echo '<b>'.get_lang('Version').': '.$survey_data['survey_version'].'</b>';
129
+}
128 130
 
129 131
 // We exit here is the first or last question is a pagebreak (which causes errors)
130 132
 SurveyUtil::check_first_last_question($_GET['survey_id']);
Please login to merge, or discard this patch.