Browse Source

[svn r21471] FS#306 - Renaming the function api_initialize_internal_encoding() to api_set_default_encoding(). Other minor changes in comments.

Ivan Tcholakov 15 years ago
parent
commit
911255f364

+ 2 - 1
main/inc/global.inc.php

@@ -218,7 +218,8 @@ while ($row = @mysql_fetch_array($result)) {
 if (empty($charset)) {
 	$charset = "ISO-8859-15";
 }
-api_initialize_internal_encoding($charset);
+// Initialization of the default encoding that will be used by the string routines.
+api_set_default_encoding($charset);
 
 /*
 --------------------------------------------

+ 2 - 3
main/inc/lib/database.lib.php

@@ -1,4 +1,4 @@
-<?php // $Id: database.lib.php 21467 2009-06-17 10:02:12Z ivantcholakov $
+<?php // $Id: database.lib.php 21471 2009-06-17 14:13:43Z ivantcholakov $
 /* See license terms in /dokeos_license.txt */
 /**
 ==============================================================================
@@ -437,9 +437,8 @@ class Database
 		return Database::format_table_name($database, $short_table_name);
 	}
 	/**
-	 * @param string Name of the folder (e.g arabic, english)
 	 * Returns the isocode corresponding to the language directory given.
-	 * @param string $language	This is the name of the folder containing translations for the corresponding language.
+	 * @param string $language	This is the name of the folder containing translations for the corresponding language (e.g arabic, english).
 	 * If $language is omitted, interface language is assumed then.
 	 * @return string			The found isocode or null on error..
 	 * Returned codes are according to the following standards (in order of preference):

+ 1 - 1
main/inc/lib/main_api.lib.php

@@ -2137,7 +2137,7 @@ function api_get_languages() {
 }
 /**
  * Gets language isocode column from the language table, taking the current language as a query parameter.
- * @param string $language	This is the name of the folder containing translations for the corresponding language.
+ * @param string $language	This is the name of the folder containing translations for the corresponding language (e.g arabic, english).
  * If $language is omitted, interface language is assumed then.
  * @return string			The found isocode or null on error.
  * Returned codes are according to the following standards (in order of preference):

+ 1 - 1
main/inc/lib/multibyte_string_functions.lib.php

@@ -1236,7 +1236,7 @@ function api_get_file_system_encoding() {
  * @return void
  * Note: This function should be called once the initialization. Please, avoid further manipulation of the internal default encodings.
  */
-function api_initialize_internal_encoding($encoding) {
+function api_set_default_encoding($encoding) {
 	api_mb_internal_encoding($encoding);
 	api_mb_regex_encoding($encoding);
 	api_iconv_set_encoding('iconv_internal_encoding', $encoding);

+ 1 - 1
main/install/index.php

@@ -140,7 +140,7 @@ if (isset($install_language))
 	}
 }
 header('Content-Type: text/html; charset='. $charset);
-api_initialize_internal_encoding($charset); // Initialization of the multi-byte string library.
+api_set_default_encoding($charset); // Initialization of the default encoding that will be used by the string routines.
 
 require_once('install_upgrade.lib.php'); //also defines constants
 require_once('install_functions.inc.php');