Skip to content

Commit

Permalink
Fix installation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed May 11, 2021
1 parent 4aaf8c6 commit 32c676f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion main/install/index.php
Expand Up @@ -216,6 +216,7 @@
}

$session_lifetime = 360000;
$institutionUrlForm = 'http://www.chamilo.org';

if (!isset($_GET['running'])) {
$dbHostForm = 'localhost';
Expand Down Expand Up @@ -435,6 +436,14 @@ function send_contact_information() {
$installationProfile = api_htmlentities($_POST['installationProfile']);
}
}

$institutionUrlFormResult = '';
if (api_stristr($institutionUrlForm, 'http://') || api_stristr($institutionUrlForm, 'https://')) {
$institutionUrlFormResult = api_htmlentities($institutionUrlForm, ENT_QUOTES);
} else {
$institutionUrlFormResult = api_htmlentities($institutionUrlForm, ENT_QUOTES);
}

?>
<input type="hidden" name="updatePath" value="<?php if (!$badUpdatePath) {
echo api_htmlentities($proposedUpdatePath, ENT_QUOTES);
Expand All @@ -459,7 +468,7 @@ function send_contact_information() {
<input type="hidden" name="campusForm" value="<?php echo api_htmlentities($campusForm, ENT_QUOTES); ?>" />
<input type="hidden" name="educationForm" value="<?php echo api_htmlentities($educationForm, ENT_QUOTES); ?>" />
<input type="hidden" name="institutionForm" value="<?php echo api_htmlentities($institutionForm, ENT_QUOTES); ?>" />
<input type="hidden" name="institutionUrlForm" value="<?php echo api_stristr($institutionUrlForm, 'http://', false) ? api_htmlentities($institutionUrlForm, ENT_QUOTES) : api_stristr($institutionUrlForm, 'https://', false) ? api_htmlentities($institutionUrlForm, ENT_QUOTES) : 'http://'.api_htmlentities($institutionUrlForm, ENT_QUOTES); ?>" />
<input type="hidden" name="institutionUrlForm" value="<?php echo $institutionUrlFormResult; ?>" />
<input type="hidden" name="checkEmailByHashSent" value="<?php echo api_htmlentities($checkEmailByHashSent, ENT_QUOTES); ?>" />
<input type="hidden" name="ShowEmailNotCheckedToStudent" value="<?php echo api_htmlentities($ShowEmailNotCheckedToStudent, ENT_QUOTES); ?>" />
<input type="hidden" name="userMailCanBeEmpty" value="<?php echo api_htmlentities($userMailCanBeEmpty, ENT_QUOTES); ?>" />
Expand Down
2 changes: 1 addition & 1 deletion main/install/install.lib.php
Expand Up @@ -778,7 +778,7 @@ function display_requirements(
if (!$properlyAccessUrl) {
echo '
<div class="alert alert-danger">
'.Display::return_icon('error.png', get_lang('Error'), [], ICON_SIZE_MEDIUM, true, false, true).
'.Display::return_icon('error.png', get_lang('Error'), [], ICON_SIZE_MEDIUM, true, false, false).
' '.
sprintf(get_lang('InstallMultiURLDetectedNotMainURL'), api_get_configuration_value('root_web')).'
</div>
Expand Down

0 comments on commit 32c676f

Please sign in to comment.