Passed
Push — 1.10.x ( f64eef...04397c )
by Angel Fernando Quiroz
132:38 queued 79:40
created
main/install/install.lib.php 1 patch
Braces   +15 added lines, -8 removed lines patch added patch discarded remove patch
@@ -973,8 +973,7 @@  discard block
 block discarded – undo
973 973
                 <?php echo get_lang('Error'); ?>!<br />
974 974
                 Chamilo <?php echo implode('|', $update_from_version_8).' '.get_lang('HasNotBeenFoundInThatDir'); ?>.
975 975
             </div>
976
-        <?php }
977
-        else {
976
+        <?php } else {
978 977
             echo '<br />';
979 978
         }
980 979
         ?>
@@ -1060,14 +1059,19 @@  discard block
 block discarded – undo
1060 1059
         <button type="submit" name="step1" class="btn btn-default" onclick="javascript: window.location='index.php'; return false;" value="<?php echo get_lang('Previous'); ?>" >
1061 1060
             <em class="fa fa-backward"> </em> <?php echo get_lang('Previous'); ?>
1062 1061
         </button>
1063
-        <button type="submit" name="step2_install" class="btn btn-success" value="<?php echo get_lang("NewInstallation"); ?>" <?php if ($error) echo 'disabled="disabled"'; ?> >
1062
+        <button type="submit" name="step2_install" class="btn btn-success" value="<?php echo get_lang("NewInstallation"); ?>" <?php if ($error) {
1063
+    echo 'disabled="disabled"';
1064
+}
1065
+?> >
1064 1066
             <em class="fa fa-forward"> </em> <?php echo get_lang('NewInstallation'); ?>
1065 1067
         </button>
1066 1068
         <input type="hidden" name="is_executable" id="is_executable" value="-" />
1067 1069
         <?php
1068 1070
         // Real code
1069 1071
         echo '<button type="submit" class="btn btn-default" name="step2_update_8" value="Upgrade from Chamilo 1.9.x"';
1070
-        if ($error) echo ' disabled="disabled"';
1072
+        if ($error) {
1073
+            echo ' disabled="disabled"';
1074
+        }
1071 1075
         echo ' ><em class="fa fa-forward"> </em> '.get_lang('UpgradeFromLMS19x').'</button>';
1072 1076
 
1073 1077
         echo '</p>';
@@ -1350,7 +1354,7 @@  discard block
 block discarded – undo
1350 1354
                 <input type="hidden" name="dbHostForm" value="<?php echo htmlentities($dbHostForm); ?>" /><?php echo $dbHostForm; ?>
1351 1355
             </div>
1352 1356
             <div class="col-sm-3"></div>
1353
-            <?php }else{ ?>
1357
+            <?php } else{ ?>
1354 1358
             <div class="col-sm-5">
1355 1359
                 <input type="text" class="form-control" size="25" maxlength="50" name="dbHostForm" value="<?php echo htmlentities($dbHostForm); ?>" />
1356 1360
             </div>
@@ -1364,7 +1368,7 @@  discard block
 block discarded – undo
1364 1368
                 <input type="hidden" name="dbPortForm" value="<?php echo htmlentities($dbPortForm); ?>" /><?php echo $dbPortForm; ?>
1365 1369
             </div>
1366 1370
             <div class="col-sm-3"></div>
1367
-            <?php }else{ ?>
1371
+            <?php } else{ ?>
1368 1372
             <div class="col-sm-5">
1369 1373
                 <input type="text" class="form-control" size="25" maxlength="50" name="dbPortForm" value="<?php echo htmlentities($dbPortForm); ?>" />
1370 1374
             </div>
@@ -1449,12 +1453,15 @@  discard block
 block discarded – undo
1449 1453
 
1450 1454
             </div>
1451 1455
 
1452
-        <?php else: ?>
1456
+        <?php else {
1457
+    : ?>
1453 1458
 
1454 1459
             <?php echo $database_exists_text ?>
1455 1460
             <div id="db_status" style="float:left;" class="alert alert-danger">
1456 1461
                 <div style="float:left;">
1457
-                    <?php echo get_lang('FailedConectionDatabase'); ?></strong>
1462
+                    <?php echo get_lang('FailedConectionDatabase');
1463
+}
1464
+?></strong>
1458 1465
                 </div>
1459 1466
             </div>
1460 1467
 
Please login to merge, or discard this patch.
main/course_description/index.php 1 patch
Braces   +27 added lines, -9 removed lines patch added patch discarded remove patch
@@ -43,15 +43,33 @@
 block discarded – undo
43 43
 
44 44
 // interbreadcrumb
45 45
 $interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('CourseProgram'));
46
-if ($description_type == 1) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('GeneralDescription'));
47
-if ($description_type == 2) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Objectives'));
48
-if ($description_type == 3) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Topics'));
49
-if ($description_type == 4) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Methodology'));
50
-if ($description_type == 5) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('CourseMaterial'));
51
-if ($description_type == 6) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('HumanAndTechnicalResources'));
52
-if ($description_type == 7) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Assessment'));
53
-if ($description_type == 8) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('ThematicAdvance'));
54
-if ($description_type >= 9) $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Others'));
46
+if ($description_type == 1) {
47
+    $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('GeneralDescription'));
48
+}
49
+if ($description_type == 2) {
50
+    $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Objectives'));
51
+}
52
+if ($description_type == 3) {
53
+    $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Topics'));
54
+}
55
+if ($description_type == 4) {
56
+    $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Methodology'));
57
+}
58
+if ($description_type == 5) {
59
+    $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('CourseMaterial'));
60
+}
61
+if ($description_type == 6) {
62
+    $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('HumanAndTechnicalResources'));
63
+}
64
+if ($description_type == 7) {
65
+    $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Assessment'));
66
+}
67
+if ($description_type == 8) {
68
+    $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('ThematicAdvance'));
69
+}
70
+if ($description_type >= 9) {
71
+    $interbreadcrumb[] = array ("url" => "#", "name" => get_lang('Others'));
72
+}
55 73
 
56 74
 // course description controller object
57 75
 $course_description_controller = new CourseDescriptionController();
Please login to merge, or discard this patch.
main/user/resume_session.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -149,8 +149,7 @@  discard block
 block discarded – undo
149 149
     	<?php
150 150
     		if ($session['access_start_date'] == '00-00-0000' && $session['access_end_date']== '00-00-0000' ) {
151 151
     		    echo get_lang('NoTimeLimits');
152
-            }
153
-    		else {
152
+            } else {
154 153
                 if ($session['access_start_date'] != '00-00-0000') {
155 154
                 	//$session['date_start'] = Display::tag('i', get_lang('NoTimeLimits'));
156 155
                     $session['access_start_date'] =  get_lang('From').' '.$session['access_start_date'];
@@ -189,12 +188,18 @@  discard block
 block discarded – undo
189 188
     		<?php echo api_ucfirst(get_lang('SessionVisibility')) ?> :
190 189
     	</td>
191 190
     	<td>
192
-    		<?php if ($session['visibility']==1) echo get_lang('ReadOnly'); elseif($session['visibility']==2) echo get_lang('Visible');elseif($session['visibility']==3) echo api_ucfirst(get_lang('Invisible'))  ?>
191
+    		<?php if ($session['visibility']==1) {
192
+    echo get_lang('ReadOnly');
193
+} elseif($session['visibility']==2) {
194
+    echo get_lang('Visible');
195
+} elseif($session['visibility']==3) {
196
+    echo api_ucfirst(get_lang('Invisible'))  ?>
193 197
     	</td>
194 198
     </tr>
195 199
     <?php
196 200
 
197 201
     $multiple_url_is_on = api_get_multiple_access_url();
202
+}
198 203
     if ($multiple_url_is_on) {
199 204
         echo '<tr><td>';
200 205
         echo 'URL';
Please login to merge, or discard this patch.
main/user/add_users_to_session.php 1 patch
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -477,7 +477,10 @@  discard block
 block discarded – undo
477 477
     <div class="actions">
478 478
     	<?php echo $link_add_type_unique ?>&nbsp;|&nbsp;<?php echo $link_add_type_multiple ?>&nbsp;|&nbsp;<?php echo $link_add_group; ?>
479 479
     </div>
480
-    <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
480
+    <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($_GET['add'])) {
481
+    echo '&add=true' ;
482
+}
483
+?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
481 484
     <?php echo '<legend>'.$tool_name.' ('.$session_info['name'].') </legend>'; ?>
482 485
     <?php
483 486
     if ($add_type == 'multiple') {
@@ -545,7 +548,10 @@  discard block
 block discarded – undo
545 548
                   <?php
546 549
                   foreach ($nosessionUsersList as $uid => $enreg) {
547 550
                   ?>
548
-                      <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) echo 'selected="selected"'; ?>><?php echo api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; ?></option>
551
+                      <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) {
552
+    echo 'selected="selected"';
553
+}
554
+?>><?php echo api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].')'; ?></option>
549 555
                   <?php
550 556
                   }
551 557
                   ?>
Please login to merge, or discard this patch.
custompages/first_login-dist.php 1 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.
main/admin/add_courses_to_usergroup.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,10 @@
 block discarded – undo
144 144
 echo '</div>';
145 145
 ?>
146 146
 
147
-<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;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
147
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) {
148
+    echo '&add=true' ;
149
+}
150
+?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
148 151
 <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>';
149 152
 
150 153
 if ($add_type=='multiple') {
Please login to merge, or discard this patch.
main/admin/add_sessions_to_usergroup.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,10 @@
 block discarded – undo
144 144
 echo '</div>';
145 145
 ?>
146 146
 
147
-<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;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
147
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) {
148
+    echo '&add=true' ;
149
+}
150
+?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
148 151
 <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>';
149 152
 
150 153
 if ($add_type=='multiple') {
Please login to merge, or discard this patch.
main/newscorm/openoffice_text.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/dropbox/dropbox_functions.inc.php 1 patch
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -734,7 +734,9 @@  discard block
 block discarded – undo
734 734
             WHERE user_id='$id'";
735 735
     $result = Database::query($sql);
736 736
     $res = Database::fetch_array($result);
737
-    if (!$res) return false;
737
+    if (!$res) {
738
+        return false;
739
+    }
738 740
 
739 741
     return stripslashes($res['username']);
740 742
 }
@@ -810,10 +812,15 @@  discard block
 block discarded – undo
810 812
             ";
811 813
     $result = Database::query($sql);
812 814
 
813
-    if (!($res = Database::fetch_array($result)))
814
-        die(get_lang('GeneralError').' (code 901)');
815
-    if ($owner == 0) return $res['uploader_id'];
816
-    if ($res['uploader_id'] == $owner) return true;
815
+    if (!($res = Database::fetch_array($result))) {
816
+            die(get_lang('GeneralError').' (code 901)');
817
+    }
818
+    if ($owner == 0) {
819
+        return $res['uploader_id'];
820
+    }
821
+    if ($res['uploader_id'] == $owner) {
822
+        return true;
823
+    }
817 824
     die(get_lang('GeneralError').' (code '.$or_die.')');
818 825
 }
819 826
 
Please login to merge, or discard this patch.