Disabling sublanguage #3761

pull/3768/head
Julio Montoya 4 years ago
parent fec0317aab
commit 8aabc5b980
  1. 3
      public/main/admin/sub_language.php
  2. 6
      public/main/admin/sub_language_add.php
  3. 3
      public/main/admin/sub_language_ajax.inc.php
  4. 4
      public/main/inc/lib/sub_language.class.php

@ -1,5 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
exit;
/**
* Script for sub-language administration.
*/

@ -22,7 +22,7 @@ $interbreadcrumb[] = ['url' => 'languages.php', 'name' => get_lang('Chamilo Port
/**
* Add sub-language.
*
* @deprecated
* @param string Original language name (Occitan, Wallon, Vlaams)
* @param string English language name (occitan, wallon, flanders)
* @param string ISO code (fr_FR, ...)
@ -70,9 +70,9 @@ function add_sub_language($original_name, $english_name, $isocode, $sublanguage_
function check_if_language_exist($original_name, $english_name, $isocode, $sublanguage_available)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql_original_name = 'SELECT count(*) AS count_original_name FROM '.$tbl_admin_languages.'
$sql_original_name = 'SELECT count(*) AS count_original_name FROM '.$tbl_admin_languages.'
WHERE original_name="'.Database::escape_string($original_name).'" ';
$sql_english_name = 'SELECT count(*) AS count_english_name FROM '.$tbl_admin_languages.'
$sql_english_name = 'SELECT count(*) AS count_english_name FROM '.$tbl_admin_languages.'
WHERE english_name="'.Database::escape_string($english_name).'" ';
$rs_original_name = Database::query($sql_original_name);
$rs_english_name = Database::query($sql_english_name);

@ -1,6 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
exit;
use Chamilo\CoreBundle\Entity\ExtraField;
/**

@ -210,7 +210,7 @@ class SubLanguageManager
/**
* Delete sub-language.
* In order to avoid deletion of main laguages, we check the existence of a parent.
*
* @deprecated
* @param int $parent_id The parent id
* @param bool $sub_language_id
*
@ -468,7 +468,7 @@ class SubLanguageManager
/**
* Get parent language path (or null if no parent).
*
* @deprecated
* @param string $language_path Children language path
*
* @return string Parent language path or null

Loading…
Cancel
Save