diff --git a/main/inc/lib/database.lib.php b/main/inc/lib/database.lib.php index b3577e8cc9..35a39393e3 100755 --- a/main/inc/lib/database.lib.php +++ b/main/inc/lib/database.lib.php @@ -776,6 +776,41 @@ class Database { return mysql_free_result($result); } + /** + * Returns the database client library version. + * @return strung Returns a string that represents the client library version. + */ + public function get_client_info() { + return mysql_get_client_info(); + } + + /** + * Returns information about the type of the current connection and the server host name. + * @param resource $connection (optional) The database server connection, for detailed description see the method query(). + * @return string/boolean Returns string data on success or FALSE on failure. + */ + public function get_host_info($connection = null) { + return self::use_default_connection($connection) ? mysql_get_host_info() : mysql_get_host_info($connection); + } + + /** + * Retrieves database client/server protocol version. + * @param resource $connection (optional) The database server connection, for detailed description see the method query(). + * @return int/boolean Returns the protocol version on success or FALSE on failure. + */ + public function get_proto_info($connection = null) { + return self::use_default_connection($connection) ? mysql_get_proto_info() : mysql_get_proto_info($connection); + } + + /** + * Retrieves the database server version. + * @param resource $connection (optional) The database server connection, for detailed description see the method query(). + * @return string/boolean Returns the MySQL server version on success or FALSE on failure. + */ + public function get_server_info($connection = null) { + return self::use_default_connection($connection) ? mysql_get_server_info() : mysql_get_server_info($connection); + } + /** * Gets the ID of the last item inserted into the database * @param resource $connection (optional) The database server connection, for detailed description see the method query(). diff --git a/main/install/index.php b/main/install/index.php index cbbfba0f2b..65854bffcb 100755 --- a/main/install/index.php +++ b/main/install/index.php @@ -131,7 +131,7 @@ foreach ($_POST as $request_index => $request_value) { $badUpdatePath = false; $emptyUpdatePath = true; $proposedUpdatePath = ''; -if(!empty($_POST['updatePath'])) { +if (!empty($_POST['updatePath'])) { $proposedUpdatePath = $_POST['updatePath']; } @@ -341,15 +341,14 @@ if ($encryptPassForm == '1') { if(init_visibility == 0) { document.getElementById('optional_param1').style.display = ''; document.getElementById('optional_param2').style.display = ''; - if(document.getElementById('optional_param3')) - { + if(document.getElementById('optional_param3')) { document.getElementById('optional_param3').style.display = ''; } document.getElementById('optional_param4').style.display = ''; document.getElementById('optional_param5').style.display = ''; document.getElementById('optional_param6').style.display = ''; init_visibility = 1; - document.getElementById('optionalparameters').innerHTML=' '; + document.getElementById('optionalparameters').innerHTML=' '; } else { document.getElementById('optional_param1').style.display = 'none'; document.getElementById('optional_param2').style.display = 'none'; @@ -359,7 +358,7 @@ if ($encryptPassForm == '1') { document.getElementById('optional_param4').style.display = 'none'; document.getElementById('optional_param5').style.display = 'none'; document.getElementById('optional_param6').style.display = 'none'; - document.getElementById('optionalparameters').innerHTML=' '; + document.getElementById('optionalparameters').innerHTML=' '; init_visibility = 0; } } @@ -552,7 +551,7 @@ if ($_POST['step2']) {

'; ?> - '.$dbNameForm; ?>'.get_lang('ReadWarningBelow').')'; ?>
+ '.$dbNameForm; ?>'.get_lang('ReadWarningBelow').')'; ?>
'.$dbStatsForm.''; @@ -568,10 +567,10 @@ if ($_POST['step2']) { echo '
'; } ?> -
-

+
+

-
+


diff --git a/main/install/install_functions.inc.php b/main/install/install_functions.inc.php index 56997d8b26..819f4f1f50 100755 --- a/main/install/install_functions.inc.php +++ b/main/install/install_functions.inc.php @@ -269,10 +269,10 @@ function get_config_param_from_db($host, $login, $pass, $db_name, $param = '') { } /** -* Return a list of language directories. -* @todo function does not belong here, move to code library, -* also see infocours.php which contains similar function -*/ + * Return a list of language directories. + * @todo function does not belong here, move to code library, + * also see infocours.php which contains similar function + */ function get_language_folder_list($dirname) { if ($dirname[strlen($dirname)-1] != '/') { $dirname .= '/'; @@ -359,7 +359,7 @@ function display_language_selection() { ?> * * @author unknow * @author Patrick Cool , Ghent University -*/ + */ function display_requirements($installType, $badUpdatePath, $updatePath = '', $update_from_version_8 = array(), $update_from_version_6 = array()) { echo '

'.display_step_sequence().get_lang('Requirements')."

\n"; @@ -633,12 +633,14 @@ function display_requirements($installType, $badUpdatePath, $updatePath = '', $u echo ''; echo ''; } - // check wether a Dokeos configuration file already exists. - elseif(file_exists('../inc/conf/configuration.php')) { - echo '
'; - echo get_lang('WarningExistingDokeosInstallationDetected'); - echo '
'; + + // check wether a Chamilo configuration file already exists. + elseif (file_exists('../inc/conf/configuration.php')) { + echo '
'; + echo get_lang('WarningExistingDokeosInstallationDetected'); + echo '
'; } + //and now display the choice buttons (go back or install) ?>

@@ -662,10 +664,10 @@ function display_requirements($installType, $badUpdatePath, $updatePath = '', $u } /** -* Displays the license (GNU GPL) as step 2, with -* - an "I accept" button named step3 to proceed to step 3; -* - a "Back" button named step1 to go back to the first step. -*/ + * Displays the license (GNU GPL) as step 2, with + * - an "I accept" button named step3 to proceed to step 3; + * - a "Back" button named step1 to go back to the first step. + */ function display_license_agreement() { echo '

'.display_step_sequence().get_lang('Licence').'

'; echo '

'.get_lang('DokeosLicenseInfo').'

'; @@ -696,19 +698,18 @@ function display_license_agreement() { } /** -* Displays a parameter in a table row. -* Used by the display_database_settings_form function. -* @param string Type of install -* @param string Name of parameter -* @param string Field name (in the HTML form) -* @param string Field value -* @param string Extra notice (to show on the right side) -* @param boolean Whether to display in update mode -* @param string Additional attribute for the element -* @return void Direct output -*/ -function display_database_parameter($install_type, $parameter_name, $form_field_name, $parameter_value, $extra_notice, $display_when_update = true, $tr_attribute = '') -{ + * Displays a parameter in a table row. + * Used by the display_database_settings_form function. + * @param string Type of install + * @param string Name of parameter + * @param string Field name (in the HTML form) + * @param string Field value + * @param string Extra notice (to show on the right side) + * @param boolean Whether to display in update mode + * @param string Additional attribute for the element + * @return void Direct output + */ +function display_database_parameter($install_type, $parameter_name, $form_field_name, $parameter_value, $extra_notice, $display_when_update = true, $tr_attribute = '') { echo "\n"; echo "$parameter_name  \n"; if ($install_type == INSTALL_TYPE_UPDATE && $display_when_update) { @@ -863,16 +864,17 @@ function display_database_settings_form($installType, $dbHostForm, $dbUsernameFo + if ($dbConnect == 1): ?>
- MySQL host info:
- MySQL server version:
- MySQL protocol version: + MySQL host info:
+ MySQL server version:
+ MySQL client version:
+ MySQL protocol version:
@@ -884,8 +886,8 @@ function display_database_settings_form($installType, $dbHostForm, $dbUsernameFo Error -->
- MySQL error:
- '; ?> + MySQL error:
+ '; ?>
@@ -902,9 +904,9 @@ function display_database_settings_form($installType, $dbHostForm, $dbUsernameFo } /** -* Displays a parameter in a table row. -* Used by the display_configuration_settings_form function. -*/ + * Displays a parameter in a table row. + * Used by the display_configuration_settings_form function. + */ function display_configuration_parameter($install_type, $parameter_name, $form_field_name, $parameter_value, $display_when_update = 'true') { echo "\n"; echo "$parameter_name  \n"; @@ -1093,8 +1095,8 @@ function display_configuration_settings_form($installType, $urlForm, $languageFo } /** -* After installation is completed (step 6), this message is displayed. -*/ + * After installation is completed (step 6), this message is displayed. + */ function display_after_install_message($installType, $nbr_courses) { ?>

@@ -1116,16 +1118,17 @@ function display_after_install_message($installType, $nbr_courses) { echo ''; ?> -