Completed
Push — master ( 5da9ea...eef579 )
by Angel Fernando Quiroz
50:18 queued 17:36
created
src/Chamilo/ThemeBundle/Util/DependencyResolver.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,8 @@
 block discarded – undo
69 69
             if (!isset($this->registered[$id])) {
70 70
                 continue;
71 71
             } // unregistered
72
-            if (!$this->hasDependencies($id)) { // standalone
72
+            if (!$this->hasDependencies($id)) {
73
+// standalone
73 74
                 $this->queued[]      = $this->registered[$id];
74 75
                 $this->resolved[$id] = true;
75 76
 
Please login to merge, or discard this patch.
src/Chamilo/ThemeBundle/Event/ThemeEvent.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,7 @@
 block discarded – undo
13 13
  * Base event class to make theme related events easier to detect
14 14
  *
15 15
  */
16
-class ThemeEvent extends Event {
16
+class ThemeEvent extends Event
17
+{
17 18
 
18 19
 }
Please login to merge, or discard this patch.
custompages/language.inc.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,8 @@  discard block
 block discarded – undo
12 12
  * Returns the best match between available languages and visitor preferences
13 13
  * @return string the best match as 2-chars code, null when none match
14 14
 */
15
-function get_preferred_language($available_langs) {
15
+function get_preferred_language($available_langs)
16
+{
16 17
     // Parsing the Accept-languages HTTP header
17 18
     $langs = array();
18 19
     foreach (explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $httplang) {
@@ -41,6 +42,7 @@  discard block
 block discarded – undo
41 42
 /**
42 43
  * Get a language variable in a specific language
43 44
  */
44
-function custompages_get_lang($variable) {
45
+function custompages_get_lang($variable)
46
+{
45 47
     return get_lang($variable, null, $_SESSION['user_language_choice']);
46 48
 }
Please login to merge, or discard this patch.
main/install/install.lib.php 1 patch
Braces   +32 added lines, -17 removed lines patch added patch discarded remove patch
@@ -650,7 +650,8 @@  discard block
 block discarded – undo
650 650
  * can be done in the language of the user
651 651
  */
652 652
 function display_language_selection()
653
-{ ?>
653
+{
654
+?>
654 655
     <h2><?php get_lang('WelcomeToTheChamiloInstaller'); ?></h2>
655 656
     <div class="RequirementHeading">
656 657
         <h2><?php echo display_step_sequence(); ?>
@@ -696,7 +697,8 @@  discard block
 block discarded – undo
696 697
     $badUpdatePath,
697 698
     $updatePath = '',
698 699
     $update_from_version_8 = array()
699
-) {
700
+)
701
+{
700 702
     global $_setting;
701 703
     echo '<div class="RequirementHeading"><h2>'.display_step_sequence().get_lang('Requirements')."</h2></div>";
702 704
     echo '<div class="RequirementText">';
@@ -1012,8 +1014,7 @@  discard block
 block discarded – undo
1012 1014
                 <?php echo get_lang('Error'); ?>!<br />
1013 1015
                 Chamilo <?php echo implode('|', $update_from_version_8).' '.get_lang('HasNotBeenFoundInThatDir'); ?>.
1014 1016
             </div>
1015
-        <?php }
1016
-        else {
1017
+        <?php } else {
1017 1018
             echo '<br />';
1018 1019
         }
1019 1020
         ?>
@@ -1133,7 +1134,10 @@  discard block
 block discarded – undo
1133 1134
         <button type="submit" name="step1" class="btn btn-default" onclick="javascript: window.location='index.php'; return false;" value="<?php echo get_lang('Previous'); ?>" >
1134 1135
             <em class="fa fa-backward"> </em> <?php echo get_lang('Previous'); ?>
1135 1136
         </button>
1136
-        <button type="submit" name="step2_install" class="btn btn-success" value="<?php echo get_lang("NewInstallation"); ?>" <?php if ($error) echo 'disabled="disabled"'; ?> >
1137
+        <button type="submit" name="step2_install" class="btn btn-success" value="<?php echo get_lang("NewInstallation"); ?>" <?php if ($error) {
1138
+    echo 'disabled="disabled"';
1139
+}
1140
+?> >
1137 1141
             <em class="fa fa-forward"> </em> <?php echo get_lang('NewInstallation'); ?>
1138 1142
         </button>
1139 1143
         <input type="hidden" name="is_executable" id="is_executable" value="-" />
@@ -1350,7 +1354,8 @@  discard block
 block discarded – undo
1350 1354
     $extra_notice,
1351 1355
     $displayWhenUpdate = true,
1352 1356
     $tr_attribute = ''
1353
-) {
1357
+)
1358
+{
1354 1359
     //echo "<tr ".$tr_attribute.">";
1355 1360
     echo "<label class='col-sm-4'>$parameterName</label>";
1356 1361
 
@@ -1391,7 +1396,8 @@  discard block
 block discarded – undo
1391 1396
     $dbNameForm,
1392 1397
     $dbPortForm = 3306,
1393 1398
     $installationProfile = ''
1394
-) {
1399
+)
1400
+{
1395 1401
     if ($installType == 'update') {
1396 1402
         global $_configuration;
1397 1403
         $dbHostForm = $_configuration['db_host'];
@@ -1420,7 +1426,7 @@  discard block
 block discarded – undo
1420 1426
                 <input type="hidden" name="dbHostForm" value="<?php echo htmlentities($dbHostForm); ?>" /><?php echo $dbHostForm; ?>
1421 1427
             </div>
1422 1428
             <div class="col-sm-3"></div>
1423
-            <?php }else{ ?>
1429
+            <?php } else{ ?>
1424 1430
             <div class="col-sm-5">
1425 1431
                 <input type="text" class="form-control" size="25" maxlength="50" name="dbHostForm" value="<?php echo htmlentities($dbHostForm); ?>" />
1426 1432
             </div>
@@ -1434,7 +1440,7 @@  discard block
 block discarded – undo
1434 1440
                 <input type="hidden" name="dbPortForm" value="<?php echo htmlentities($dbPortForm); ?>" /><?php echo $dbPortForm; ?>
1435 1441
             </div>
1436 1442
             <div class="col-sm-3"></div>
1437
-            <?php }else{ ?>
1443
+            <?php } else{ ?>
1438 1444
             <div class="col-sm-5">
1439 1445
                 <input type="text" class="form-control" size="25" maxlength="50" name="dbPortForm" value="<?php echo htmlentities($dbPortForm); ?>" />
1440 1446
             </div>
@@ -1516,9 +1522,12 @@  discard block
 block discarded – undo
1516 1522
             Database port: <strong><?php echo $manager->getConnection()->getPort(); ?></strong><br/>
1517 1523
             Database driver: <strong><?php echo $manager->getConnection()->getDriver()->getName(); ?></strong><br/>
1518 1524
         </div>
1519
-    <?php else: ?>
1525
+    <?php else {
1526
+    : ?>
1520 1527
         <div id="db_status" class="alert alert-danger">
1521
-            <p><?php echo get_lang('FailedConectionDatabase'); ?></strong></p>
1528
+            <p><?php echo get_lang('FailedConectionDatabase');
1529
+}
1530
+?></strong></p>
1522 1531
             <code><?php echo $database_exists_text ?></code>
1523 1532
         </div>
1524 1533
     <?php endif; ?>
@@ -1545,7 +1554,8 @@  discard block
 block discarded – undo
1545 1554
     <?php
1546 1555
 }
1547 1556
 
1548
-function panel($content = null, $title = null, $id = null, $style = null) {
1557
+function panel($content = null, $title = null, $id = null, $style = null)
1558
+{
1549 1559
     $html = '';
1550 1560
     if (empty($style)) {
1551 1561
         $style = 'default';
@@ -1577,7 +1587,8 @@  discard block
 block discarded – undo
1577 1587
     $formFieldName,
1578 1588
     $parameterValue,
1579 1589
     $displayWhenUpdate = 'true'
1580
-) {
1590
+)
1591
+{
1581 1592
     $html = '<div class="form-group">';
1582 1593
     $html .= '<label class="col-sm-6 control-label">' . $parameterName . '</label>';
1583 1594
     if ($installType == INSTALL_TYPE_UPDATE && $displayWhenUpdate) {
@@ -1624,7 +1635,8 @@  discard block
 block discarded – undo
1624 1635
     $allowSelfRegProf,
1625 1636
     $loginForm,
1626 1637
     $passForm
1627
-) {
1638
+)
1639
+{
1628 1640
     if ($installType != 'update' && empty($languageForm)) {
1629 1641
         $languageForm = $_SESSION['install_language'];
1630 1642
     }
@@ -1668,7 +1680,8 @@  discard block
 block discarded – undo
1668 1680
     if ($installType == 'update') {
1669 1681
         $html .= '<input type="hidden" name="languageForm" value="'.api_htmlentities($languageForm, ENT_QUOTES).'" />'.$languageForm;
1670 1682
 
1671
-    } else { // new installation
1683
+    } else {
1684
+// new installation
1672 1685
         $html .= '<div class="col-sm-6">';
1673 1686
         $html .= display_language_selection_box('languageForm', $languageForm);
1674 1687
         $html .= '</div>';
@@ -2036,7 +2049,8 @@  discard block
 block discarded – undo
2036 2049
     $allowRegistration,
2037 2050
     $allowTeacherSelfRegistration,
2038 2051
     $installationProfile = ''
2039
-) {
2052
+)
2053
+{
2040 2054
     $allowTeacherSelfRegistration = $allowTeacherSelfRegistration ? 'true' : 'false';
2041 2055
 
2042 2056
     // Use PHP 5.3 to avoid issue with weird peripherical auto-installers like travis-ci
@@ -2734,7 +2748,8 @@  discard block
 block discarded – undo
2734 2748
     $allowSelfReg,
2735 2749
     $allowSelfRegProf,
2736 2750
     $installationProfile = ''
2737
-) {
2751
+)
2752
+{
2738 2753
     $sysPath = !empty($sysPath) ? $sysPath : api_get_path(SYS_PATH);
2739 2754
 
2740 2755
     $connection = $manager->getConnection();
Please login to merge, or discard this patch.
main/session/session_course_edit.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     $rs_coaches = Database::query($sql);
58 58
 
59 59
     $coaches_course_session = array();
60
-    if (Database::num_rows($rs_coaches) > 0){
60
+    if (Database::num_rows($rs_coaches) > 0) {
61 61
         while ($row_coaches = Database::fetch_row($rs_coaches)) {
62 62
             $coaches_course_session[] = $row_coaches[0];
63 63
         }
@@ -166,13 +166,19 @@  discard block
 block discarded – undo
166 166
 
167 167
         <select name="id_coach[]" class="form-control" multiple>
168 168
             <option value="0">----- <?php echo get_lang("Choose") ?> -----</option>
169
-            <option value="0" <?php if(count($arr_infos) == 0) echo 'selected="selected"'; ?>>
169
+            <option value="0" <?php if(count($arr_infos) == 0) {
170
+    echo 'selected="selected"';
171
+}
172
+?>>
170 173
                 <?php echo get_lang('None') ?>
171 174
             </option>
172 175
             <?php
173 176
             foreach ($coaches as $enreg) {
174 177
                 ?>
175
-                <option value="<?php echo $enreg['user_id']; ?>" <?php if(((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) echo 'selected="selected"'; ?>>
178
+                <option value="<?php echo $enreg['user_id']; ?>" <?php if(((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) {
179
+    echo 'selected="selected"';
180
+}
181
+?>>
176 182
                     <?php echo api_get_person_name($enreg['firstname'], $enreg['lastname']).' ('.$enreg['username'].')'; ?>
177 183
                 </option>
178 184
             <?php
Please login to merge, or discard this patch.
main/session/session_course_user.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     }
111 111
 
112 112
     foreach ($existingCourses as $existingCourse) {
113
-        if (!in_array($existingCourse['id'], $CourseList)){
113
+        if (!in_array($existingCourse['id'], $CourseList)) {
114 114
             $existingCourse = Database::escape_string($existingCourse['id']);
115 115
             $sql = "INSERT IGNORE INTO $tbl_session_rel_course_rel_user (session_id,c_id,user_id)
116 116
                     VALUES ('$id_session','$existingCourse','$id_user')";
@@ -186,7 +186,10 @@  discard block
 block discarded – undo
186 186
                     <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" style="width:320px;"> <?php
187 187
                         foreach($nosessionCourses as $enreg) {
188 188
                             ?>
189
-                            <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"'; ?>><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option>
189
+                            <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) {
190
+    echo 'selected="selected"';
191
+}
192
+?>><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option>
190 193
                         <?php
191 194
                         }
192 195
                         ?> </select></div> <?php
Please login to merge, or discard this patch.
main/course_home/vertical_activity.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,8 @@
 block discarded – undo
19 19
 
20 20
 if (api_is_allowed_to_edit(null, true)) {
21 21
     // HIDE
22
-    if (!empty($_GET['hide'])) { // visibility 1 -> 0
22
+    if (!empty($_GET['hide'])) {
23
+// visibility 1 -> 0
23 24
         $sql = "UPDATE $tool_table SET visibility=0 WHERE c_id = $course_id AND id='".$id."'";
24 25
         Database::query($sql);
25 26
         $show_message = Display::return_message(get_lang('ToolIsNowHidden'), 'confirmation');
Please login to merge, or discard this patch.
main/course_home/3column.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,14 +93,16 @@
 block discarded – undo
93 93
 
94 94
 /* HIDE */
95 95
 
96
-elseif ($hide) { // visibility 1 -> 0
96
+elseif ($hide) {
97
+// visibility 1 -> 0
97 98
     Database::query("UPDATE $TBL_ACCUEIL SET visibility=0 WHERE c_id = $course_id AND id=$id");
98 99
     $show_message .= Display::return_message(get_lang('ToolIsNowHidden'), 'confirmation');
99 100
 }
100 101
 
101 102
 /*	REACTIVATE */
102 103
 
103
-elseif ($restore) { // visibility 0,2 -> 1
104
+elseif ($restore) {
105
+// visibility 0,2 -> 1
104 106
     Database::query("UPDATE $TBL_ACCUEIL SET visibility=1  WHERE c_id = $course_id AND id=$id");
105 107
     $show_message .= Display::return_message(get_lang('ToolIsNowVisible'), 'confirmation');
106 108
 }
Please login to merge, or discard this patch.
main/course_home/course_home.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,8 @@
 block discarded – undo
176 176
 $auto_launch = api_get_course_setting('enable_lp_auto_launch');
177 177
 $session_id = api_get_session_id();
178 178
 if (!empty($auto_launch)) {
179
-    if ($auto_launch == 2) { //LP list
179
+    if ($auto_launch == 2) {
180
+//LP list
180 181
         if (api_is_platform_admin() || api_is_allowed_to_edit()) {
181 182
             $show_autolaunch_lp_warning = true;
182 183
         } else {
Please login to merge, or discard this patch.