mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Various little fixes to remove warnings (usually about empty variables)
when error_reporting is turned up to 15 or so ... more of these to come ...
This commit is contained in:
parent
a900458749
commit
9c9f7d7790
28 changed files with 1600 additions and 65 deletions
|
@ -75,13 +75,16 @@
|
|||
if (!isset($config)) {
|
||||
$config = $CFG;
|
||||
}
|
||||
if (!isset($focus)) {
|
||||
$focus = "";
|
||||
}
|
||||
|
||||
$stradmin = get_string("administration");
|
||||
$strconfigvariables = get_string("configvariables");
|
||||
|
||||
if ($site) {
|
||||
print_header("$site->shortname: $strconfigvariables", "$site->fullname",
|
||||
"<A HREF=\"index.php\">$stradmin</A> -> $strconfigvariables", "$focus");
|
||||
print_header("$site->shortname: $strconfigvariables", $site->fullname,
|
||||
"<A HREF=\"index.php\">$stradmin</A> -> $strconfigvariables", $focus);
|
||||
print_heading($strconfigvariables);
|
||||
} else {
|
||||
print_header();
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
}
|
||||
print_continue("index.php");
|
||||
print_simple_box_start("CENTER");
|
||||
include("$CFG->dirroot/doc/release.html");
|
||||
include("$CFG->dirroot/lang/en/docs/release.html");
|
||||
print_simple_box_end();
|
||||
print_continue("index.php");
|
||||
exit;
|
||||
|
@ -192,7 +192,7 @@
|
|||
}
|
||||
|
||||
} else { // module not installed yet, so install it
|
||||
if (!$updated_modules) {
|
||||
if (!empty($updated_modules)) {
|
||||
$strmodulesetup = get_string("modulesetup");
|
||||
print_header($strmodulesetup, $strmodulesetup, $strmodulesetup);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
if ($updated_modules) {
|
||||
if (!empty($updated_modules)) {
|
||||
print_continue("index.php");
|
||||
die;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@
|
|||
|
||||
/// If any new configurations were found then send to the config page to check
|
||||
|
||||
if ($configchange) {
|
||||
if (!empty($configchange)) {
|
||||
redirect("config.php");
|
||||
}
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ function lang_save_file($path, $file, $strings) {
|
|||
$value = str_replace("\\","",$value); // Delete all slashes
|
||||
$value = str_replace("$"."a", "\\$"."a", $value); // Add slashes for $a
|
||||
$value = str_replace("\"", "\\\"", $value); // Add slashes for "
|
||||
if ($id == "string"){
|
||||
if ($id == "string" and $value != ""){
|
||||
fwrite($f,"\$string['$stringname'] = \"$value\";\n");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue