mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
prevent the attempt of editting packs located in $CFG->dirroot/lang (from get_list_of_languages() used in 1.6 sites that are not uncodedb)
This commit is contained in:
parent
bcfe401e39
commit
7988d9e75a
@ -98,8 +98,11 @@
|
||||
}
|
||||
|
||||
if ($mode == "missing") {
|
||||
if (!file_exists($langdir)) {
|
||||
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
|
||||
}
|
||||
|
||||
// For each file, check that a counterpart exists, then check all the strings
|
||||
|
||||
foreach ($stringfiles as $file) {
|
||||
unset($string);
|
||||
include("$enlangdir/$file");
|
||||
@ -164,6 +167,11 @@
|
||||
|
||||
} else if ($mode == "compare") {
|
||||
|
||||
if (!file_exists($langdir)) {
|
||||
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
|
||||
}
|
||||
|
||||
|
||||
if (isset($_POST['currentfile'])){ // Save a file
|
||||
if (!confirm_sesskey()) {
|
||||
error(get_string('confirmsesskeybad', 'error'));
|
||||
|
@ -52,6 +52,10 @@ Thanks: Jaime Villate for important bug fixing, koen roggemans for his job a
|
||||
$langdir = "$CFG->dataroot/lang/$currentlang";
|
||||
$enlangdir = "$CFG->dirroot/lang/en_utf8";
|
||||
|
||||
|
||||
if (!file_exists($langdir)) {
|
||||
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
|
||||
}
|
||||
// Shall I save POSTed data?
|
||||
|
||||
if (isset($_POST['currentfile'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user