Removed PHP_SELF checking in sub_language management (used better mechanism)

skala
Yannick Warnier 13 years ago
parent 2166df8d8a
commit dd34d4e7c7
  1. 1
      main/admin/sub_language.php
  2. 3
      main/admin/sub_language_ajax.inc.php
  3. 2
      main/inc/global.inc.php

@ -4,6 +4,7 @@
// name of the language file that needs to be included
$language_file = 'admin';
$cidReset = true;
$this_script = 'sub_language';
require_once '../inc/global.inc.php';
require_once 'sub_language.class.php';
$this_section = SECTION_PLATFORM_ADMIN;

@ -1,6 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
$language_file = 'admin';
$this_script = 'sub_language';
require_once '../inc/global.inc.php';
require_once 'sub_language.class.php';
@ -41,4 +42,4 @@ if (isset($new_language) && isset($language_variable) && isset($file_id)) {
} else {
echo 1;
}
}
}

@ -395,7 +395,7 @@ if (!empty($_POST['language_list'])) {
$langpath = api_get_path(SYS_LANG_PATH);
/* This will only work if we are in the page to edit a sub_language */
if (api_get_self() == api_get_path(REL_PATH).'main/admin/sub_language.php' || api_get_self() == api_get_path(REL_PATH).'main/admin/sub_language_ajax.inc.php') {
if (isset($this_script) && $this_script == 'sub_language') {
require_once '../admin/sub_language.class.php';
// getting the arrays of files i.e notification, trad4all, etc
$language_files_to_load = SubLanguageManager:: get_lang_folder_files_list(api_get_path(SYS_LANG_PATH).'english', true);

Loading…
Cancel
Save