Pārlūkot izejas kodu

Feature #306 - Replacing Database::get_language_isocode() with api_get_language_isocode().

Ivan Tcholakov 15 gadi atpakaļ
vecāks
revīzija
c938905398

+ 1 - 1
main/calendar/calendar.php

@@ -36,7 +36,7 @@ $DaysShort = api_get_week_days_short();
 $DaysLong = api_get_week_days_long();
 // Defining the months of the year to allow translation of the months
 $MonthsLong = api_get_months_long();
-@ $iso_lang = Database :: get_language_isocode($language_interface);
+@ $iso_lang = api_get_language_isocode($language_interface);
 if (empty ($iso_lang) )
 {
 	//if there was no valid iso-code, use the english one

+ 1 - 1
main/exercice/exercise_result.php

@@ -295,7 +295,7 @@ if ($origin != 'learnpath') {
 	}
 	header('Content-Type: text/html; charset='. $charset);
 
-	@$document_language = Database::get_language_isocode($language_interface);
+	@$document_language = api_get_language_isocode($language_interface);
 	if(empty($document_language))
 	{
 	  //if there was no valid iso-code, use the english one

+ 1 - 1
main/help/allowed_html_tags.php

@@ -33,7 +33,7 @@ $language_file = 'help';
 include ('../inc/global.inc.php');
 require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
 require_once (api_get_path(LIBRARY_PATH).'formvalidator/Rule/HTML.php');
-$language_code = Database :: get_language_isocode($language_interface);
+$language_code = api_get_language_isocode($language_interface);
 header('Content-Type: text/html; charset='.$charset);
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

+ 1 - 1
main/help/faq.php

@@ -35,7 +35,7 @@ $language_file='help';
 $helpName=$_GET['open'];
 include('../inc/global.inc.php');
 include_once(api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php');
-$language_code = Database::get_language_isocode($language_interface);
+$language_code = api_get_language_isocode($language_interface);
 header('Content-Type: text/html; charset='. $charset);
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

+ 1 - 1
main/help/help.php

@@ -34,7 +34,7 @@
 $language_file='help';
 $helpName=$_GET['open'];
 include('../inc/global.inc.php');
-$language_code = Database::get_language_isocode($language_interface);
+$language_code = api_get_language_isocode($language_interface);
 header('Content-Type: text/html; charset='. $charset);
 
 

+ 1 - 3
main/inc/header.inc.php

@@ -38,9 +38,7 @@ if ( isset($httpHeadXtra) && $httpHeadXtra )
 }
 
 // Get language iso-code for this page - ignore errors
-// The error ignorance is due to the non compatibility of function_exists()
-// with the object syntax of Database::get_language_isocode()
-@$document_language = Database::get_language_isocode($language_interface);
+@$document_language = api_get_language_isocode($language_interface);
 if(empty($document_language))
 {
   //if there was no valid iso-code, use the english one

+ 1 - 1
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php

@@ -213,7 +213,7 @@
 	}
 	*/
 
-	@ $langajaxfilemanager = Database :: get_language_isocode($language_interface);
+	@ $langajaxfilemanager = api_get_language_isocode($language_interface);
 
 	// Some code translations are needed.
 	$langajaxfilemanager = strtolower(str_replace('_', '-', $langajaxfilemanager));

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

@@ -458,7 +458,7 @@ class FCKeditor
 		static $config;
 		if (!is_array($config)) {
 			global $language_interface;
-			@ $editor_lang = Database :: get_language_isocode($language_interface);
+			@ $editor_lang = api_get_language_isocode($language_interface);
 			$editor_lang = strtolower(str_replace('_', '-', $editor_lang));
 			if (empty ($editor_lang)) {
 				$editor_lang = 'en';

+ 1 - 1
main/inc/lib/formvalidator/Element/calendar_popup.php

@@ -36,7 +36,7 @@ $DaysShort = api_get_week_days_short();
 $DaysLong = api_get_week_days_long();
 // Defining the months of the year to allow translation of the months
 $MonthsLong = api_get_months_long();
-@ $iso_lang = Database :: get_language_isocode($language_interface);
+@ $iso_lang = api_get_language_isocode($language_interface);
 if (empty ($iso_lang) )
 {
 	//if there was no valid iso-code, use the english one

+ 1 - 1
main/inc/lib/formvalidator/Element/datepicker.php

@@ -47,7 +47,7 @@ class HTML_QuickForm_datepicker extends HTML_QuickForm_date
 			$popup_link = str_replace($char, "\\".$char, $popup_link);
 			$hour_minute_devider = str_replace($char, "\\".$char, $hour_minute_devider);
 		}
-		@ $editor_lang = Database :: get_language_isocode($language_interface);
+		@ $editor_lang = api_get_language_isocode($language_interface);
 		if (empty ($editor_lang) )
 		{
 			//if there was no valid iso-code, use the english one

+ 1 - 1
main/inc/lib/formvalidator/Element/datepickerdate.php

@@ -44,7 +44,7 @@ class HTML_QuickForm_datepickerdate extends HTML_QuickForm_date
 		{
 			$popup_link = str_replace($char, "\\".$char, $popup_link);
 		}
-		@ $editor_lang = Database :: get_language_isocode($language_interface);
+		@ $editor_lang = api_get_language_isocode($language_interface);
 		if (empty ($editor_lang) )
 		{
 			//if there was no valid iso-code, use the english one

+ 1 - 3
main/inc/reduced_header.inc.php

@@ -37,9 +37,7 @@ if ( isset($httpHeadXtra) && $httpHeadXtra )
 }
 
 // Get language iso-code for this page - ignore errors
-// The error ignorance is due to the non compatibility of function_exists()
-// with the object syntax of Database::get_language_isocode()
-@$document_language = Database::get_language_isocode($language_interface);
+@$document_language = api_get_language_isocode($language_interface);
 if(empty($document_language))
 {
   //if there was no valid iso-code, use the english one

+ 1 - 1
main/wiki/export_html2pdf.php

@@ -54,7 +54,7 @@ $htmlbuffer=ob_get_contents();// Store Output-Buffer in one variable
 ob_end_clean();// delete Output-Buffer
 
 /////bridge to  dokeos lang
-	@ $langhtml2pdf = Database :: get_language_isocode($language_interface);
+	@ $langhtml2pdf = api_get_language_isocode($language_interface);
 
 	// Some code translations are needed.
 	$langhtml2pdf = strtolower(str_replace('_', '-', $langhtml2pdf));