From c35b90ebed8358facf2d729bf24391e3a61a1f4d Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 11 Jan 2008 23:24:00 +0000 Subject: [PATCH] MDL-12914 Register globals trouble; backported from MOODLE_19_STABLE --- admin/index.php | 4 ++-- lang/en_utf8/admin.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/index.php b/admin/index.php index 264cb758e02..a319bea824b 100644 --- a/admin/index.php +++ b/admin/index.php @@ -547,8 +547,8 @@ print_box(get_string("upgrade$CFG->upgrade", "admin", "$CFG->wwwroot/$CFG->admin/upgrade$CFG->upgrade.php")); } - if (ini_get_bool('register_globals') && !ini_get_bool('magic_quotes_gpc')) { - print_box(get_string('globalsquoteswarning', 'admin'), 'generalbox adminwarning'); + if (ini_get_bool('register_globals')) { + print_box(get_string('globalswarning', 'admin'), 'generalbox adminwarning'); } if (is_dataroot_insecure()) { diff --git a/lang/en_utf8/admin.php b/lang/en_utf8/admin.php index 29c8f98ee2e..695df9f7b1f 100644 --- a/lang/en_utf8/admin.php +++ b/lang/en_utf8/admin.php @@ -303,6 +303,7 @@ $string['fullnamedisplay'] = 'Full Name Format'; $string['gdversion'] = 'GD version'; $string['generalsettings'] = 'General settings'; $string['globalsquoteswarning'] = '

Security Warning: to operate properly, Moodle requires
that you make certain changes to your current PHP settings.

You must set register_globals=off and/or magic_quotes_gpc=on.
If possible, you should set register_globals=off to improve general
server security, setting magic_quotes_gpc=on is also recommended.

These settings are controlled by editing your php.ini, Apache/IIS
configuration or .htaccess file.

'; +$string['globalswarning'] = '

Security Warning: to operate properly, Moodle requires
that you make certain changes to your current PHP settings.

You must set register_globals=off.

This setting is controlled by editing your php.ini, Apache/IIS
configuration or .htaccess file.

'; $string['gotofirst'] = 'Go to first missing string'; $string['gradebook'] = 'Gradebook'; $string['gradebookroles'] = 'Graded roles';