FIx for bug 3181 - empty files are no longer created - make your own! :-)

This commit is contained in:
moodler
2005-07-14 16:00:23 +00:00
parent bd8a4f07f0
commit 145ec44bf7
+9 -10
View File
@@ -90,23 +90,22 @@
// For each file, check that a counterpart exists, then check all the strings
foreach ($stringfiles as $file) {
if (!file_exists("$langdir/$file")) {
if (!touch("$langdir/$file")) {
echo "<p><font color=\"red\">".get_string("filemissing", "", "$langdir/$file")."</font></p>";
continue;
}
}
unset($string);
include("$enlangdir/$file");
$enstring = $string;
unset($string);
include("$langdir/$file");
if (file_exists("$langdir/$file")) {
include("$langdir/$file");
} else {
notify(get_string("filemissing", "", "$langdir/$file"));
$string = array();
}
$first = true;
foreach ($enstring as $key => $value) {
if (!isset($string[$key]) or $string[$key] == "") {
if (empty($string[$key])) {
$value = htmlspecialchars($value);
$value = str_replace("$"."a", "\\$"."a", $value);
$value = str_replace("%%","%",$value);