@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | Display::return_message($plugin->get_lang('OrderCancelled'), 'error', false) |
52 | 52 | ); |
53 | 53 | |
54 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
54 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
55 | 55 | exit; |
56 | 56 | } |
57 | 57 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | Display::return_message($erroMessage, 'error', false) |
67 | 67 | ); |
68 | 68 | unset($_SESSION['wizard']); |
69 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
69 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
70 | 70 | exit; |
71 | 71 | } |
72 | 72 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | unset($_SESSION['bc_service_sale_id']); |
152 | 152 | |
153 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/service_catalog.php'); |
|
153 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/service_catalog.php'); |
|
154 | 154 | |
155 | 155 | exit; |
156 | 156 | } |
@@ -71,7 +71,7 @@ |
||
71 | 71 | function sort_files($table) |
72 | 72 | { |
73 | 73 | $tablename_direction = isset($_GET['tablename_direction']) ? Security::remove_XSS($_GET['tablename_direction']) : 'ASC'; |
74 | - $accepted_extensions = array('.jpg', '.jpeg', '.gif', '.png', '.bmp','.svg'); |
|
74 | + $accepted_extensions = array('.jpg', '.jpeg', '.gif', '.png', '.bmp', '.svg'); |
|
75 | 75 | $temp = array(); |
76 | 76 | |
77 | 77 | foreach ($table as & $file_array) { |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | if (!is_array($result)) { |
409 | 409 | $result = array(); |
410 | 410 | $exceptions = array('.', '..', 'CVS', '.svn'); |
411 | - $search = array('_latin', '_unicode', '_corporate', '_org' , '_KM', '_'); |
|
411 | + $search = array('_latin', '_unicode', '_corporate', '_org', '_KM', '_'); |
|
412 | 412 | $replace_with = array(' (Latin)', ' (unicode)', ' (corporate)', ' (org)', ' (KM)', ' '); |
413 | 413 | $dirname = api_get_path(SYS_LANG_PATH); |
414 | 414 | $handle = opendir($dirname); |
@@ -443,9 +443,9 @@ discard block |
||
443 | 443 | if ($handle = opendir($directory)) { |
444 | 444 | while (false !== ($file = readdir($handle))) { |
445 | 445 | if ($file != "." && $file != "..") { |
446 | - if (is_dir($directory. "/" . $file)) { |
|
447 | - $array_items = array_merge($array_items, my_directory_to_array($directory. '/' . $file)); |
|
448 | - $file = $directory . "/" . $file; |
|
446 | + if (is_dir($directory."/".$file)) { |
|
447 | + $array_items = array_merge($array_items, my_directory_to_array($directory.'/'.$file)); |
|
448 | + $file = $directory."/".$file; |
|
449 | 449 | $array_items[] = preg_replace("/\/\//si", '/', $file); |
450 | 450 | } |
451 | 451 | } |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | // try to recover config file from Chamilo 1.9.x |
491 | 491 | if (file_exists($updatePath.'main/inc/conf/configuration.php')) { |
492 | 492 | $updateFromConfigFile = 'main/inc/conf/configuration.php'; |
493 | - } elseif (file_exists($updatePath . 'app/config/configuration.php')) { |
|
493 | + } elseif (file_exists($updatePath.'app/config/configuration.php')) { |
|
494 | 494 | $updateFromConfigFile = 'app/config/configuration.php'; |
495 | 495 | } else { |
496 | 496 | // Give up recovering. |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | <h2><?php get_lang('WelcomeToTheChamiloInstaller'); ?></h2> |
652 | 652 | <div class="RequirementHeading"> |
653 | 653 | <h2><?php echo display_step_sequence(); ?> |
654 | - <?php echo get_lang('InstallationLanguage');?> |
|
654 | + <?php echo get_lang('InstallationLanguage'); ?> |
|
655 | 655 | </h2> |
656 | 656 | <p><?php echo get_lang('PleaseSelectInstallationProcessLanguage'); ?>:</p> |
657 | 657 | <form id="lang_form" method="post" action="<?php echo api_get_self(); ?>"> |
@@ -705,14 +705,14 @@ discard block |
||
705 | 705 | } |
706 | 706 | echo '</div>'; |
707 | 707 | |
708 | - $properlyAccessUrl = checkAccessUrl(); |
|
708 | + $properlyAccessUrl = checkAccessUrl(); |
|
709 | 709 | |
710 | 710 | if (!$properlyAccessUrl) { |
711 | 711 | echo ' |
712 | 712 | <div class="alert alert-danger"> |
713 | - ' . Display::return_icon('error.png', get_lang('Error'), [], ICON_SIZE_MEDIUM) . |
|
714 | - ' ' . |
|
715 | - sprintf(get_lang('InstallMultiURLDetectedNotMainURL'), api_get_configuration_value('root_web')) . ' |
|
713 | + ' . Display::return_icon('error.png', get_lang('Error'), [], ICON_SIZE_MEDIUM). |
|
714 | + ' '. |
|
715 | + sprintf(get_lang('InstallMultiURLDetectedNotMainURL'), api_get_configuration_value('root_web')).' |
|
716 | 716 | </div> |
717 | 717 | '; |
718 | 718 | } |
@@ -736,7 +736,7 @@ discard block |
||
736 | 736 | if (phpversion() < REQUIRED_PHP_VERSION) { |
737 | 737 | echo '<strong><font color="red">'.get_lang('PHPVersionError').'</font></strong>'; |
738 | 738 | } else { |
739 | - echo '<strong><font color="green">'.get_lang('PHPVersionOK'). ' '.phpversion().'</font></strong>'; |
|
739 | + echo '<strong><font color="green">'.get_lang('PHPVersionOK').' '.phpversion().'</font></strong>'; |
|
740 | 740 | } |
741 | 741 | echo '</td> |
742 | 742 | </tr> |
@@ -1094,9 +1094,9 @@ discard block |
||
1094 | 1094 | } |
1095 | 1095 | |
1096 | 1096 | $deprecated = [ |
1097 | - api_get_path(SYS_CODE_PATH) . 'exercice/', |
|
1098 | - api_get_path(SYS_CODE_PATH) . 'newscorm/', |
|
1099 | - api_get_path(SYS_PLUGIN_PATH) . 'ticket/' |
|
1097 | + api_get_path(SYS_CODE_PATH).'exercice/', |
|
1098 | + api_get_path(SYS_CODE_PATH).'newscorm/', |
|
1099 | + api_get_path(SYS_PLUGIN_PATH).'ticket/' |
|
1100 | 1100 | ]; |
1101 | 1101 | $deprecatedToRemove = []; |
1102 | 1102 | |
@@ -1206,7 +1206,7 @@ discard block |
||
1206 | 1206 | function get_contact_registration_form() |
1207 | 1207 | { |
1208 | 1208 | |
1209 | - $html =' |
|
1209 | + $html = ' |
|
1210 | 1210 | <div class="form-horizontal"> |
1211 | 1211 | <div class="panel panel-default"> |
1212 | 1212 | <div class="panel-body"> |
@@ -1303,7 +1303,7 @@ discard block |
||
1303 | 1303 | <div class="col-sm-9"> |
1304 | 1304 | <div class="radio"> |
1305 | 1305 | <label> |
1306 | - <input type="radio" name="financial_decision" id="financial_decision1" value="1" checked /> ' . get_lang('Yes') . ' |
|
1306 | + <input type="radio" name="financial_decision" id="financial_decision1" value="1" checked /> ' . get_lang('Yes').' |
|
1307 | 1307 | </label> |
1308 | 1308 | </div> |
1309 | 1309 | <div class="radio"> |
@@ -1362,8 +1362,8 @@ discard block |
||
1362 | 1362 | echo '<input type="hidden" name="'.$formFieldName.'" id="'.$formFieldName.'" value="'.api_htmlentities($parameterValue).'" />'; |
1363 | 1363 | echo api_htmlentities($parameterValue); |
1364 | 1364 | } else { |
1365 | - echo '<div class="col-sm-5"><input type="' . $inputType . '" class="form-control" size="' . DATABASE_FORM_FIELD_DISPLAY_LENGTH . '" maxlength="' . $maxLength . '" name="' . $formFieldName . '" id="' . $formFieldName . '" value="' . api_htmlentities($parameterValue) . '" />' . "</div>"; |
|
1366 | - echo '<div class="col-sm-3">' . $extra_notice . '</div>'; |
|
1365 | + echo '<div class="col-sm-5"><input type="'.$inputType.'" class="form-control" size="'.DATABASE_FORM_FIELD_DISPLAY_LENGTH.'" maxlength="'.$maxLength.'" name="'.$formFieldName.'" id="'.$formFieldName.'" value="'.api_htmlentities($parameterValue).'" />'."</div>"; |
|
1366 | + echo '<div class="col-sm-3">'.$extra_notice.'</div>'; |
|
1367 | 1367 | } |
1368 | 1368 | } |
1369 | 1369 | } |
@@ -1397,12 +1397,12 @@ discard block |
||
1397 | 1397 | $dbNameForm = $_configuration['main_database']; |
1398 | 1398 | $dbPortForm = isset($_configuration['db_port']) ? $_configuration['db_port'] : ''; |
1399 | 1399 | |
1400 | - echo '<div class="RequirementHeading"><h2>' . display_step_sequence() .get_lang('DBSetting') . '</h2></div>'; |
|
1400 | + echo '<div class="RequirementHeading"><h2>'.display_step_sequence().get_lang('DBSetting').'</h2></div>'; |
|
1401 | 1401 | echo '<div class="RequirementContent">'; |
1402 | 1402 | echo get_lang('DBSettingUpgradeIntro'); |
1403 | 1403 | echo '</div>'; |
1404 | 1404 | } else { |
1405 | - echo '<div class="RequirementHeading"><h2>' . display_step_sequence() .get_lang('DBSetting') . '</h2></div>'; |
|
1405 | + echo '<div class="RequirementHeading"><h2>'.display_step_sequence().get_lang('DBSetting').'</h2></div>'; |
|
1406 | 1406 | echo '<div class="RequirementContent">'; |
1407 | 1407 | echo get_lang('DBSettingIntro'); |
1408 | 1408 | echo '</div>'; |
@@ -1412,12 +1412,12 @@ discard block |
||
1412 | 1412 | <div class="panel-body"> |
1413 | 1413 | <div class="form-group"> |
1414 | 1414 | <label class="col-sm-4"><?php echo get_lang('DBHost'); ?> </label> |
1415 | - <?php if ($installType == 'update'){ ?> |
|
1415 | + <?php if ($installType == 'update') { ?> |
|
1416 | 1416 | <div class="col-sm-5"> |
1417 | 1417 | <input type="hidden" name="dbHostForm" value="<?php echo htmlentities($dbHostForm); ?>" /><?php echo $dbHostForm; ?> |
1418 | 1418 | </div> |
1419 | 1419 | <div class="col-sm-3"></div> |
1420 | - <?php }else{ ?> |
|
1420 | + <?php } else { ?> |
|
1421 | 1421 | <div class="col-sm-5"> |
1422 | 1422 | <input type="text" class="form-control" size="25" maxlength="50" name="dbHostForm" value="<?php echo htmlentities($dbHostForm); ?>" /> |
1423 | 1423 | </div> |
@@ -1426,12 +1426,12 @@ discard block |
||
1426 | 1426 | </div> |
1427 | 1427 | <div class="form-group"> |
1428 | 1428 | <label class="col-sm-4"><?php echo get_lang('DBPort'); ?> </label> |
1429 | - <?php if ($installType == 'update'){ ?> |
|
1429 | + <?php if ($installType == 'update') { ?> |
|
1430 | 1430 | <div class="col-sm-5"> |
1431 | 1431 | <input type="hidden" name="dbPortForm" value="<?php echo htmlentities($dbPortForm); ?>" /><?php echo $dbPortForm; ?> |
1432 | 1432 | </div> |
1433 | 1433 | <div class="col-sm-3"></div> |
1434 | - <?php }else{ ?> |
|
1434 | + <?php } else { ?> |
|
1435 | 1435 | <div class="col-sm-5"> |
1436 | 1436 | <input type="text" class="form-control" size="25" maxlength="50" name="dbPortForm" value="<?php echo htmlentities($dbPortForm); ?>" /> |
1437 | 1437 | </div> |
@@ -1457,7 +1457,7 @@ discard block |
||
1457 | 1457 | <?php |
1458 | 1458 | //Database Name fix replace weird chars |
1459 | 1459 | if ($installType != INSTALL_TYPE_UPDATE) { |
1460 | - $dbNameForm = str_replace(array('-','*', '$', ' ', '.'), '', $dbNameForm); |
|
1460 | + $dbNameForm = str_replace(array('-', '*', '$', ' ', '.'), '', $dbNameForm); |
|
1461 | 1461 | } |
1462 | 1462 | |
1463 | 1463 | displayDatabaseParameter( |
@@ -1550,7 +1550,7 @@ discard block |
||
1550 | 1550 | if (!empty($title)) { |
1551 | 1551 | $panelTitle = Display::div($title, array('class' => 'panel-heading')); |
1552 | 1552 | $panelBody = Display::div($content, array('class' => 'panel-body')); |
1553 | - $panelParent = Display::div($panelTitle . $panelBody, array('id' => $id, 'class' => 'panel panel-'.$style)); |
|
1553 | + $panelParent = Display::div($panelTitle.$panelBody, array('id' => $id, 'class' => 'panel panel-'.$style)); |
|
1554 | 1554 | } else { |
1555 | 1555 | $panelBody = Display::div($html, array('class' => 'panel-body')); |
1556 | 1556 | $panelParent = Display::div($panelBody, array('id' => $id, 'class' => 'panel panel-'.$style)); |
@@ -1576,9 +1576,9 @@ discard block |
||
1576 | 1576 | $displayWhenUpdate = 'true' |
1577 | 1577 | ) { |
1578 | 1578 | $html = '<div class="form-group">'; |
1579 | - $html .= '<label class="col-sm-6 control-label">' . $parameterName . '</label>'; |
|
1579 | + $html .= '<label class="col-sm-6 control-label">'.$parameterName.'</label>'; |
|
1580 | 1580 | if ($installType == INSTALL_TYPE_UPDATE && $displayWhenUpdate) { |
1581 | - $html .= '<input type="hidden" name="' . $formFieldName . '" value="'. api_htmlentities($parameterValue, ENT_QUOTES). '" />' . $parameterValue; |
|
1581 | + $html .= '<input type="hidden" name="'.$formFieldName.'" value="'.api_htmlentities($parameterValue, ENT_QUOTES).'" />'.$parameterValue; |
|
1582 | 1582 | } else { |
1583 | 1583 | $html .= '<div class="col-sm-6"><input class="form-control" type="text" size="'.FORM_FIELD_DISPLAY_LENGTH.'" maxlength="'.MAX_FORM_FIELD_LENGTH.'" name="'.$formFieldName.'" value="'.api_htmlentities($parameterValue, ENT_QUOTES).'" />'."</div>"; |
1584 | 1584 | } |
@@ -1626,7 +1626,7 @@ discard block |
||
1626 | 1626 | $languageForm = $_SESSION['install_language']; |
1627 | 1627 | } |
1628 | 1628 | echo '<div class="RequirementHeading">'; |
1629 | - echo "<h2>" . display_step_sequence() . get_lang("CfgSetting") . "</h2>"; |
|
1629 | + echo "<h2>".display_step_sequence().get_lang("CfgSetting")."</h2>"; |
|
1630 | 1630 | echo '</div>'; |
1631 | 1631 | |
1632 | 1632 | echo '<p>'.get_lang('ConfigSettingsInfo').' <strong>app/config/configuration.php</strong></p>'; |
@@ -1644,14 +1644,14 @@ discard block |
||
1644 | 1644 | |
1645 | 1645 | // Parameters 3 and 4: administrator's names |
1646 | 1646 | |
1647 | - $html .= display_configuration_parameter($installType, get_lang('AdminFirstName'), 'adminFirstName', $adminFirstName); |
|
1648 | - $html .= display_configuration_parameter($installType, get_lang('AdminLastName'), 'adminLastName', $adminLastName); |
|
1647 | + $html .= display_configuration_parameter($installType, get_lang('AdminFirstName'), 'adminFirstName', $adminFirstName); |
|
1648 | + $html .= display_configuration_parameter($installType, get_lang('AdminLastName'), 'adminLastName', $adminLastName); |
|
1649 | 1649 | |
1650 | 1650 | //Parameter 3: administrator's email |
1651 | - $html .= display_configuration_parameter($installType, get_lang('AdminEmail'), 'emailForm', $emailForm); |
|
1651 | + $html .= display_configuration_parameter($installType, get_lang('AdminEmail'), 'emailForm', $emailForm); |
|
1652 | 1652 | |
1653 | 1653 | //Parameter 6: administrator's telephone |
1654 | - $html .= display_configuration_parameter($installType, get_lang('AdminPhone'), 'adminPhoneForm', $adminPhoneForm); |
|
1654 | + $html .= display_configuration_parameter($installType, get_lang('AdminPhone'), 'adminPhoneForm', $adminPhoneForm); |
|
1655 | 1655 | |
1656 | 1656 | |
1657 | 1657 | echo panel($html, get_lang('Administrator'), 'administrator'); |
@@ -1670,12 +1670,12 @@ discard block |
||
1670 | 1670 | $html .= display_language_selection_box('languageForm', $languageForm); |
1671 | 1671 | $html .= '</div>'; |
1672 | 1672 | } |
1673 | - $html.= "</div>"; |
|
1673 | + $html .= "</div>"; |
|
1674 | 1674 | |
1675 | 1675 | |
1676 | 1676 | //Second parameter: Chamilo URL |
1677 | 1677 | $html .= '<div class="form-group">'; |
1678 | - $html .= '<label class="col-sm-6 control-label">'.get_lang('ChamiloURL') .get_lang('ThisFieldIsRequired').'</label>'; |
|
1678 | + $html .= '<label class="col-sm-6 control-label">'.get_lang('ChamiloURL').get_lang('ThisFieldIsRequired').'</label>'; |
|
1679 | 1679 | |
1680 | 1680 | |
1681 | 1681 | |
@@ -1699,34 +1699,34 @@ discard block |
||
1699 | 1699 | |
1700 | 1700 | |
1701 | 1701 | $html .= '<div class="form-group"> |
1702 | - <label class="col-sm-6 control-label">' . get_lang("EncryptMethodUserPass") . '</label> |
|
1702 | + <label class="col-sm-6 control-label">' . get_lang("EncryptMethodUserPass").'</label> |
|
1703 | 1703 | <div class="col-sm-6">'; |
1704 | 1704 | if ($installType == 'update') { |
1705 | - $html .= '<input type="hidden" name="encryptPassForm" value="'. $encryptPassForm .'" />'. $encryptPassForm; |
|
1705 | + $html .= '<input type="hidden" name="encryptPassForm" value="'.$encryptPassForm.'" />'.$encryptPassForm; |
|
1706 | 1706 | } else { |
1707 | 1707 | |
1708 | 1708 | $html .= '<div class="checkbox"> |
1709 | 1709 | <label> |
1710 | - <input type="radio" name="encryptPassForm" value="bcrypt" id="encryptPass1" '. ($encryptPassForm == 'bcrypt' ? 'checked="checked" ':'') .'/> bcrypt |
|
1710 | + <input type="radio" name="encryptPassForm" value="bcrypt" id="encryptPass1" '. ($encryptPassForm == 'bcrypt' ? 'checked="checked" ' : '').'/> bcrypt |
|
1711 | 1711 | </label>'; |
1712 | 1712 | |
1713 | 1713 | $html .= '<label> |
1714 | - <input type="radio" name="encryptPassForm" value="sha1" id="encryptPass1" '. ($encryptPassForm == 'sha1' ? 'checked="checked" ':'') .'/> sha1 |
|
1714 | + <input type="radio" name="encryptPassForm" value="sha1" id="encryptPass1" '. ($encryptPassForm == 'sha1' ? 'checked="checked" ' : '').'/> sha1 |
|
1715 | 1715 | </label>'; |
1716 | 1716 | |
1717 | 1717 | $html .= '<label> |
1718 | - <input type="radio" name="encryptPassForm" value="md5" id="encryptPass0" '. ($encryptPassForm == 'md5' ? 'checked="checked" ':'') .'/> md5 |
|
1718 | + <input type="radio" name="encryptPassForm" value="md5" id="encryptPass0" '. ($encryptPassForm == 'md5' ? 'checked="checked" ' : '').'/> md5 |
|
1719 | 1719 | </label>'; |
1720 | 1720 | |
1721 | 1721 | $html .= '<label> |
1722 | - <input type="radio" name="encryptPassForm" value="none" id="encryptPass2" '. ($encryptPassForm == 'none' ? 'checked="checked" ':'') .'/>'. get_lang('None').' |
|
1722 | + <input type="radio" name="encryptPassForm" value="none" id="encryptPass2" '. ($encryptPassForm == 'none' ? 'checked="checked" ' : '').'/>'.get_lang('None').' |
|
1723 | 1723 | </label>'; |
1724 | 1724 | $html .= '</div>'; |
1725 | 1725 | } |
1726 | 1726 | $html .= '</div></div>'; |
1727 | 1727 | |
1728 | 1728 | $html .= '<div class="form-group"> |
1729 | - <label class="col-sm-6 control-label">' . get_lang('AllowSelfReg') . '</label> |
|
1729 | + <label class="col-sm-6 control-label">' . get_lang('AllowSelfReg').'</label> |
|
1730 | 1730 | <div class="col-sm-6">'; |
1731 | 1731 | if ($installType == 'update') { |
1732 | 1732 | if ($allowSelfReg == 'true') { |
@@ -1736,17 +1736,17 @@ discard block |
||
1736 | 1736 | } else { |
1737 | 1737 | $label = get_lang('AfterApproval'); |
1738 | 1738 | } |
1739 | - $html .= '<input type="hidden" name="allowSelfReg" value="'. $allowSelfReg .'" />'. $label; |
|
1739 | + $html .= '<input type="hidden" name="allowSelfReg" value="'.$allowSelfReg.'" />'.$label; |
|
1740 | 1740 | } else { |
1741 | 1741 | $html .= '<div class="control-group">'; |
1742 | 1742 | $html .= '<label class="checkbox-inline"> |
1743 | - <input type="radio" name="allowSelfReg" value="true" id="allowSelfReg1" '. ($allowSelfReg == 'true' ? 'checked="checked" ' : '') . ' /> '. get_lang('Yes') .' |
|
1743 | + <input type="radio" name="allowSelfReg" value="true" id="allowSelfReg1" '. ($allowSelfReg == 'true' ? 'checked="checked" ' : '').' /> '.get_lang('Yes').' |
|
1744 | 1744 | </label>'; |
1745 | 1745 | $html .= '<label class="checkbox-inline"> |
1746 | - <input type="radio" name="allowSelfReg" value="false" id="allowSelfReg0" '. ($allowSelfReg == 'false' ? '' : 'checked="checked" ') .' /> '. get_lang('No') .' |
|
1746 | + <input type="radio" name="allowSelfReg" value="false" id="allowSelfReg0" '. ($allowSelfReg == 'false' ? '' : 'checked="checked" ').' /> '.get_lang('No').' |
|
1747 | 1747 | </label>'; |
1748 | 1748 | $html .= '<label class="checkbox-inline"> |
1749 | - <input type="radio" name="allowSelfReg" value="approval" id="allowSelfReg2" '. ($allowSelfReg == 'approval' ? '' : 'checked="checked" ') .' /> '. get_lang('AfterApproval') .' |
|
1749 | + <input type="radio" name="allowSelfReg" value="approval" id="allowSelfReg2" '. ($allowSelfReg == 'approval' ? '' : 'checked="checked" ').' /> '.get_lang('AfterApproval').' |
|
1750 | 1750 | </label>'; |
1751 | 1751 | $html .= '</div>'; |
1752 | 1752 | } |
@@ -1754,7 +1754,7 @@ discard block |
||
1754 | 1754 | $html .= '</div>'; |
1755 | 1755 | |
1756 | 1756 | $html .= '<div class="form-group">'; |
1757 | - $html .= '<label class="col-sm-6 control-label">'. get_lang('AllowSelfRegProf') .'</label> |
|
1757 | + $html .= '<label class="col-sm-6 control-label">'.get_lang('AllowSelfRegProf').'</label> |
|
1758 | 1758 | <div class="col-sm-6">'; |
1759 | 1759 | if ($installType == 'update') { |
1760 | 1760 | if ($allowSelfRegProf == 'true') { |
@@ -1762,16 +1762,16 @@ discard block |
||
1762 | 1762 | } else { |
1763 | 1763 | $label = get_lang('No'); |
1764 | 1764 | } |
1765 | - $html .= '<input type="hidden" name="allowSelfRegProf" value="'. $allowSelfRegProf.'" />'. $label; |
|
1765 | + $html .= '<input type="hidden" name="allowSelfRegProf" value="'.$allowSelfRegProf.'" />'.$label; |
|
1766 | 1766 | } else { |
1767 | 1767 | $html .= '<div class="control-group"> |
1768 | 1768 | <label class="checkbox-inline"> |
1769 | - <input type="radio" name="allowSelfRegProf" value="1" id="allowSelfRegProf1" '. ($allowSelfRegProf ? 'checked="checked" ' : '') .'/> |
|
1770 | - ' . get_lang('Yes') .' |
|
1769 | + <input type="radio" name="allowSelfRegProf" value="1" id="allowSelfRegProf1" '. ($allowSelfRegProf ? 'checked="checked" ' : '').'/> |
|
1770 | + ' . get_lang('Yes').' |
|
1771 | 1771 | </label>'; |
1772 | 1772 | $html .= '<label class="checkbox-inline"> |
1773 | - <input type="radio" name="allowSelfRegProf" value="0" id="allowSelfRegProf0" '. ($allowSelfRegProf ? '' : 'checked="checked" ') .' /> |
|
1774 | - '. get_lang('No') .' |
|
1773 | + <input type="radio" name="allowSelfRegProf" value="0" id="allowSelfRegProf0" '. ($allowSelfRegProf ? '' : 'checked="checked" ').' /> |
|
1774 | + '. get_lang('No').' |
|
1775 | 1775 | </label>'; |
1776 | 1776 | $html .= '</div>'; |
1777 | 1777 | } |
@@ -1836,7 +1836,7 @@ discard block |
||
1836 | 1836 | "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Morocco", "Mozambique", "Myanmar", |
1837 | 1837 | "Namibia", "Nauru", "Nepa", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", |
1838 | 1838 | "Oman", |
1839 | - "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland","Portugal", |
|
1839 | + "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", |
|
1840 | 1840 | "Qatar", |
1841 | 1841 | "Romania", "Russia", "Rwanda", |
1842 | 1842 | "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", |
@@ -1883,11 +1883,11 @@ discard block |
||
1883 | 1883 | $permissions_for_new_directories = isset($_SESSION['permissions_for_new_directories']) ? $_SESSION['permissions_for_new_directories'] : 0770; |
1884 | 1884 | $permissions_for_new_files = isset($_SESSION['permissions_for_new_files']) ? $_SESSION['permissions_for_new_files'] : 0660; |
1885 | 1885 | // use decoct() to store as string |
1886 | - $sql = "UPDATE $table SET selected_value = '0" . decoct($permissions_for_new_directories) . "' |
|
1886 | + $sql = "UPDATE $table SET selected_value = '0".decoct($permissions_for_new_directories)."' |
|
1887 | 1887 | WHERE variable = 'permissions_for_new_directories'"; |
1888 | 1888 | Database::query($sql); |
1889 | 1889 | |
1890 | - $sql = "UPDATE $table SET selected_value = '0" . decoct($permissions_for_new_files) . "' WHERE variable = 'permissions_for_new_files'"; |
|
1890 | + $sql = "UPDATE $table SET selected_value = '0".decoct($permissions_for_new_files)."' WHERE variable = 'permissions_for_new_files'"; |
|
1891 | 1891 | Database::query($sql); |
1892 | 1892 | |
1893 | 1893 | if (isset($_SESSION['permissions_for_new_directories'])) { |
@@ -1907,8 +1907,8 @@ discard block |
||
1907 | 1907 | function compare_setting_values($current_value, $wanted_value) |
1908 | 1908 | { |
1909 | 1909 | $current_value_string = $current_value; |
1910 | - $current_value = (float)$current_value; |
|
1911 | - $wanted_value = (float)$wanted_value; |
|
1910 | + $current_value = (float) $current_value; |
|
1911 | + $wanted_value = (float) $wanted_value; |
|
1912 | 1912 | |
1913 | 1913 | if ($current_value >= $wanted_value) { |
1914 | 1914 | return Display::label($current_value_string, 'success'); |
@@ -1971,7 +1971,7 @@ discard block |
||
1971 | 1971 | |
1972 | 1972 | fwrite($fp, $out); |
1973 | 1973 | while (!feof($fp)) { |
1974 | - $result = str_replace("\r\n", '',fgets($fp, 128)); |
|
1974 | + $result = str_replace("\r\n", '', fgets($fp, 128)); |
|
1975 | 1975 | if (!empty($result) && $result == '123') { |
1976 | 1976 | $output = true; |
1977 | 1977 | } |
@@ -1994,7 +1994,7 @@ discard block |
||
1994 | 1994 | curl_setopt($ch, CURLOPT_URL, $url); |
1995 | 1995 | //curl_setopt($ch, CURLOPT_TIMEOUT, 30); |
1996 | 1996 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
1997 | - $result = curl_exec ($ch); |
|
1997 | + $result = curl_exec($ch); |
|
1998 | 1998 | if (!empty($result) && $result == '123') { |
1999 | 1999 | $output = true; |
2000 | 2000 | } |
@@ -2755,12 +2755,12 @@ discard block |
||
2755 | 2755 | $adminPhoneForm, |
2756 | 2756 | '', //$picture_uri = '', |
2757 | 2757 | PLATFORM_AUTH_SOURCE, |
2758 | - '',//$expirationDate, |
|
2758 | + '', //$expirationDate, |
|
2759 | 2759 | 1, |
2760 | 2760 | 0, |
2761 | 2761 | null, |
2762 | 2762 | '', |
2763 | - false, //$send_mail = false, |
|
2763 | + false, //$send_mail = false, |
|
2764 | 2764 | true //$isAdmin = false |
2765 | 2765 | ); |
2766 | 2766 | |
@@ -2782,7 +2782,7 @@ discard block |
||
2782 | 2782 | 0, |
2783 | 2783 | null, |
2784 | 2784 | '', |
2785 | - false, //$send_mail = false, |
|
2785 | + false, //$send_mail = false, |
|
2786 | 2786 | false //$isAdmin = false |
2787 | 2787 | ); |
2788 | 2788 | |
@@ -2817,7 +2817,7 @@ discard block |
||
2817 | 2817 | Database::query($sql); |
2818 | 2818 | |
2819 | 2819 | foreach ($files as $version) { |
2820 | - $version = str_replace(['Version', '.php' ], '', $version->getFilename()); |
|
2820 | + $version = str_replace(['Version', '.php'], '', $version->getFilename()); |
|
2821 | 2821 | $sql = "INSERT INTO version (version) VALUES ('$version')"; |
2822 | 2822 | Database::query($sql); |
2823 | 2823 | } |
@@ -2863,7 +2863,7 @@ discard block |
||
2863 | 2863 | SET selected_value = '".$param->selected_value."' |
2864 | 2864 | WHERE variable = '".$param->variable."'"; |
2865 | 2865 | if (!empty($param->subkey)) { |
2866 | - $sql .= " AND subkey='" . $param->subkey . "'"; |
|
2866 | + $sql .= " AND subkey='".$param->subkey."'"; |
|
2867 | 2867 | } |
2868 | 2868 | Database::query($sql); |
2869 | 2869 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | $course_plugin = 'bbb'; //needed in order to load the plugin lang variables |
10 | 10 | $cidReset = true; |
11 | 11 | |
12 | -require_once __DIR__ . '/../../main/inc/global.inc.php'; |
|
12 | +require_once __DIR__.'/../../main/inc/global.inc.php'; |
|
13 | 13 | |
14 | 14 | api_protect_admin_script(); |
15 | 15 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | /** @var User $participant */ |
52 | 52 | $participant = $meetingParticipant['participant']; |
53 | 53 | $meeting['participants'][] = $participant->getCompleteName() |
54 | - . ' (' . $participant->getEmail() . ')'; |
|
54 | + . ' ('.$participant->getEmail().')'; |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
@@ -98,9 +98,9 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | $htmlHeadXtra[] = api_get_js_simple( |
101 | - api_get_path(WEB_PLUGIN_PATH) . 'bbb/resources/utils.js' |
|
101 | + api_get_path(WEB_PLUGIN_PATH).'bbb/resources/utils.js' |
|
102 | 102 | ); |
103 | -$htmlHeadXtra[] = "<script>var _p = {web_plugin: '" . api_get_path(WEB_PLUGIN_PATH). "'}</script>"; |
|
103 | +$htmlHeadXtra[] = "<script>var _p = {web_plugin: '".api_get_path(WEB_PLUGIN_PATH)."'}</script>"; |
|
104 | 104 | |
105 | 105 | $tpl = new Template($tool_name); |
106 | 106 | $tpl->assign('meetings', $meetings); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | if ($meetings) { |
113 | 113 | $actions[] = Display::toolbarButton( |
114 | 114 | get_lang('ExportInExcel'), |
115 | - api_get_self() . '?' . http_build_query([ |
|
115 | + api_get_self().'?'.http_build_query([ |
|
116 | 116 | 'action' => 'export', |
117 | 117 | 'search_meeting_start' => $dateStart, |
118 | 118 | 'search_meeting_end' => $dateEnd |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | } |
21 | 21 | |
22 | 22 | if (!empty($gradebook) && $gradebook == 'view') { |
23 | - $interbreadcrumb[] = array ( |
|
23 | + $interbreadcrumb[] = array( |
|
24 | 24 | 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
25 | 25 | 'name' => get_lang('ToolGradebook') |
26 | 26 | ); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ); |
77 | 77 | if (api_get_setting('allow_course_theme') === 'true') { |
78 | 78 | $mycourselptheme = api_get_course_setting('allow_learning_path_theme'); |
79 | - if (!empty($mycourselptheme) && $mycourselptheme!=-1 && $mycourselptheme== 1) { |
|
79 | + if (!empty($mycourselptheme) && $mycourselptheme != -1 && $mycourselptheme == 1) { |
|
80 | 80 | //LP theme picker |
81 | 81 | $theme_select = $form->addElement('SelectTheme', 'lp_theme', get_lang('Theme')); |
82 | 82 | $form->applyFilter('lp_theme', 'trim'); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $label = ($_SESSION['oLP']->get_preview_image() != '' ? get_lang('UpdateImage') : get_lang('AddImage')); |
106 | 106 | $form->addElement('file', 'lp_preview_image', array($label, get_lang('ImageWillResizeMsg'))); |
107 | 107 | |
108 | -$form->addRule('lp_preview_image', get_lang('OnlyImagesAllowed'), 'filetype', array ('jpg', 'jpeg', 'png', 'gif')); |
|
108 | +$form->addRule('lp_preview_image', get_lang('OnlyImagesAllowed'), 'filetype', array('jpg', 'jpeg', 'png', 'gif')); |
|
109 | 109 | |
110 | 110 | // Search terms (only if search is activated). |
111 | 111 | if (api_get_setting('search_enabled') === 'true') { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $defaults['lp_author'] = Security::remove_XSS($_SESSION['oLP']->get_author()); |
135 | 135 | $defaults['hide_toc_frame'] = Security::remove_XSS($_SESSION['oLP']->get_hide_toc_frame()); |
136 | 136 | $defaults['category_id'] = intval($_SESSION['oLP']->getCategoryId()); |
137 | -$defaults['accumulate_scorm_time'] = $_SESSION['oLP']->getAccumulateScormTime(); |
|
137 | +$defaults['accumulate_scorm_time'] = $_SESSION['oLP']->getAccumulateScormTime(); |
|
138 | 138 | |
139 | 139 | $expired_on = $_SESSION['oLP']->expired_on; |
140 | 140 | $publicated_on = $_SESSION['oLP']->publicated_on; |
@@ -214,14 +214,14 @@ discard block |
||
214 | 214 | if ($enableLpExtraFields) { |
215 | 215 | $htmlHeadXtra[] = '<script> |
216 | 216 | $(function() { |
217 | - ' . $extra['jquery_ready_content'] . ' |
|
217 | + ' . $extra['jquery_ready_content'].' |
|
218 | 218 | }); |
219 | 219 | </script>'; |
220 | 220 | } |
221 | 221 | |
222 | 222 | |
223 | 223 | $defaults['publicated_on'] = !empty($publicated_on) && $publicated_on !== '0000-00-00 00:00:00' ? api_get_local_time($publicated_on) : null; |
224 | -$defaults['expired_on'] = (!empty($expired_on) )? api_get_local_time($expired_on): date('Y-m-d 12:00:00', time()+84600); |
|
224 | +$defaults['expired_on'] = (!empty($expired_on)) ? api_get_local_time($expired_on) : date('Y-m-d 12:00:00', time() + 84600); |
|
225 | 225 | $defaults['subscribe_users'] = $_SESSION['oLP']->getSubscribeUsers(); |
226 | 226 | $form->setDefaults($defaults); |
227 | 227 |
@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | public function toHtml() |
36 | 36 | { |
37 | - return parent::toHtml() . <<<JS |
|
37 | + return parent::toHtml().<<<JS |
|
38 | 38 | <script> |
39 | 39 | $(document).on('ready', function () { |
40 | 40 | var txtColor = $('#{$this->getAttribute('id')}'), |
@@ -46,14 +46,14 @@ discard block |
||
46 | 46 | return ' |
47 | 47 | <div class="input-group"> |
48 | 48 | <span class="input-group-addon cursor-pointer"> |
49 | - <input ' . $this->_getAttrString($this->_attributes) . '> |
|
49 | + <input ' . $this->_getAttrString($this->_attributes).'> |
|
50 | 50 | </span> |
51 | - <p class="form-control disabled" id="' . $id . '_alt_text">' . $value . '</p> |
|
52 | - <input class="form-control" type="hidden" id="' . $id . '_alt" value="' . $value . '"> |
|
51 | + <p class="form-control disabled" id="' . $id.'_alt_text">'.$value.'</p> |
|
52 | + <input class="form-control" type="hidden" id="' . $id.'_alt" value="'.$value.'"> |
|
53 | 53 | <span class="input-group-btn"> |
54 | 54 | <button class="btn btn-default" type="button"> |
55 | 55 | <span class="fa fa-times text-danger" aria-hidden="true"></span> |
56 | - <span class="sr-only">' . get_lang('Reset') . '</span> |
|
56 | + <span class="sr-only">' . get_lang('Reset').'</span> |
|
57 | 57 | </button> |
58 | 58 | </span> |
59 | 59 | </div> |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | txtDate |
93 | 93 | .hide() |
94 | 94 | .datepicker({ |
95 | - defaultDate: '" . $this->getValue() . "', |
|
95 | + defaultDate: '".$this->getValue()."', |
|
96 | 96 | dateFormat: 'yy-mm-dd', |
97 | 97 | altField: '#{$id}_alt', |
98 | - altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\", |
|
98 | + altFormat: \"".get_lang('DateFormatLongNoDayJS')."\", |
|
99 | 99 | showOn: 'both', |
100 | - buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "', |
|
100 | + buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."', |
|
101 | 101 | buttonImageOnly: true, |
102 | - buttonText: '" . get_lang('SelectDate') . "', |
|
102 | + buttonText: '" . get_lang('SelectDate')."', |
|
103 | 103 | changeMonth: true, |
104 | 104 | changeYear: true, |
105 | 105 | yearRange: 'c-60y:c+5y' |
@@ -39,14 +39,14 @@ discard block |
||
39 | 39 | return ' |
40 | 40 | <div class="input-group"> |
41 | 41 | <span class="input-group-addon cursor-pointer"> |
42 | - <input ' . $this->_getAttrString($this->_attributes) . '> |
|
42 | + <input ' . $this->_getAttrString($this->_attributes).'> |
|
43 | 43 | </span> |
44 | - <p class="form-control disabled" id="' . $id . '_alt_text">' . $value . '</p> |
|
45 | - <input class="form-control" type="hidden" id="' . $id . '_alt" value="' . $value . '"> |
|
44 | + <p class="form-control disabled" id="' . $id.'_alt_text">'.$value.'</p> |
|
45 | + <input class="form-control" type="hidden" id="' . $id.'_alt" value="'.$value.'"> |
|
46 | 46 | <span class="input-group-btn"> |
47 | 47 | <button class="btn btn-default" type="button"> |
48 | 48 | <span class="fa fa-times text-danger" aria-hidden="true"></span> |
49 | - <span class="sr-only">' . get_lang('Reset') . '</span> |
|
49 | + <span class="sr-only">' . get_lang('Reset').'</span> |
|
50 | 50 | </button> |
51 | 51 | </span> |
52 | 52 | </div> |
@@ -85,18 +85,18 @@ discard block |
||
85 | 85 | txtDateTime |
86 | 86 | .hide() |
87 | 87 | .datetimepicker({ |
88 | - defaultDate: '" . $this->getValue() . "', |
|
88 | + defaultDate: '".$this->getValue()."', |
|
89 | 89 | dateFormat: 'yy-mm-dd', |
90 | 90 | timeFormat: 'HH:mm', |
91 | 91 | altField: '#{$id}_alt', |
92 | - altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\", |
|
93 | - altTimeFormat: \"" . get_lang('TimeFormatNoSecJS') . "\", |
|
94 | - altSeparator: \" " . get_lang('AtTime') . " \", |
|
92 | + altFormat: \"".get_lang('DateFormatLongNoDayJS')."\", |
|
93 | + altTimeFormat: \"" . get_lang('TimeFormatNoSecJS')."\", |
|
94 | + altSeparator: \" " . get_lang('AtTime')." \", |
|
95 | 95 | altFieldTimeOnly: false, |
96 | 96 | showOn: 'both', |
97 | - buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "', |
|
97 | + buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."', |
|
98 | 98 | buttonImageOnly: true, |
99 | - buttonText: '" . get_lang('SelectDate') . "', |
|
99 | + buttonText: '" . get_lang('SelectDate')."', |
|
100 | 100 | changeMonth: true, |
101 | 101 | changeYear: true |
102 | 102 | }) |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if ($surveyData['survey_type'] == 1) { |
65 | 65 | $table_survey_question_group = Database::get_course_table(TABLE_SURVEY_QUESTION_GROUP); |
66 | 66 | $sql = 'SELECT id,name FROM '.$table_survey_question_group.' |
67 | - WHERE survey_id = '.(int)$_GET['survey_id'].' |
|
67 | + WHERE survey_id = '.(int) $_GET['survey_id'].' |
|
68 | 68 | ORDER BY name'; |
69 | 69 | $rs = Database::query($sql); |
70 | 70 | $glist = null; |
@@ -75,15 +75,15 @@ discard block |
||
75 | 75 | $grouplist = $grouplist1 = $grouplist2 = $glist; |
76 | 76 | |
77 | 77 | if (!empty($formData['assigned'])) { |
78 | - $grouplist = str_replace('<option value="'.$formData['assigned'].'"','<option value="'.$formData['assigned'].'" selected',$glist); |
|
78 | + $grouplist = str_replace('<option value="'.$formData['assigned'].'"', '<option value="'.$formData['assigned'].'" selected', $glist); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | if (!empty($formData['assigned1'])) { |
82 | - $grouplist1 = str_replace('<option value="'.$formData['assigned1'].'"','<option value="'.$formData['assigned1'].'" selected',$glist); |
|
82 | + $grouplist1 = str_replace('<option value="'.$formData['assigned1'].'"', '<option value="'.$formData['assigned1'].'" selected', $glist); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | if (!empty($formData['assigned2'])) { |
86 | - $grouplist2 = str_replace('<option value="'.$formData['assigned2'].'"','<option value="'.$formData['assigned2'].'" selected',$glist); |
|
86 | + $grouplist2 = str_replace('<option value="'.$formData['assigned2'].'"', '<option value="'.$formData['assigned2'].'" selected', $glist); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | $this->html .= ' <tr><td colspan=""> |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | $this->html .= ' |
97 | 97 | <b>'.get_lang('Secondary').'</b><br /> |
98 | - '.'<input type="radio" name="choose" value="2" '.(($formData['choose']==2)?'checked':''). |
|
98 | + '.'<input type="radio" name="choose" value="2" '.(($formData['choose'] == 2) ? 'checked' : ''). |
|
99 | 99 | '><select name="assigned1">'.$grouplist1.'</select> '. |
100 | 100 | '<select name="assigned2">'.$grouplist2.'</select>' |
101 | 101 | .'</fieldset><br />'; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | <div class="form-group"> |
132 | 132 | <label class="col-sm-2 control-label"></label> |
133 | 133 | <div class="col-sm-8"> |
134 | - <div class="alert alert-info">' . get_lang('YouCantNotEditThisQuestionBecauseAlreadyExistAnswers') . '</div> |
|
134 | + <div class="alert alert-info">' . get_lang('YouCantNotEditThisQuestionBecauseAlreadyExistAnswers').'</div> |
|
135 | 135 | </div> |
136 | 136 | <div class="col-sm-2"></div> |
137 | 137 | </div> |