From 828b6d1067f933fde8c10721cc9370e60e5ac113 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 27 Jan 2009 16:21:56 +0000 Subject: [PATCH] MDL-18040 adding warning that the security report processing may take a long time --- admin/report/security/index.php | 8 ++++++++ admin/report/security/lib.php | 9 +++++++++ lang/en_utf8/report_security.php | 1 + theme/standard/styles_layout.css | 8 ++++++++ 4 files changed, 26 insertions(+) diff --git a/admin/report/security/index.php b/admin/report/security/index.php index b0de42d2f9..789e373c68 100644 --- a/admin/report/security/index.php +++ b/admin/report/security/index.php @@ -48,6 +48,10 @@ admin_externalpage_print_header(); print_heading(get_string('reportsecurity', 'report_security')); +echo '
'.get_string('timewarning', 'report_security').'
'; +while(@ob_end_flush()); +@flush(); + $strok = ''.get_string('statusok', 'report_security').''; $strinfo = ''.get_string('statusinfo', 'report_security').''; $strwarning = ''.get_string('statuswarning', 'report_security').''; @@ -68,6 +72,8 @@ $statusarr = array(REPORT_SECURITY_OK => $strok, $url = "$CFG->wwwroot/$CFG->admin/report/security/index.php"; if ($issue and ($result = $issue(true))) { + report_security_hide_timearning(); + $table = new object(); $table->head = array($strissue, $strstatus, $strdesc, $strconfig); $table->size = array('30%', '10%', '50%', '10%' ); @@ -91,6 +97,8 @@ if ($issue and ($result = $issue(true))) { print_continue($url); } else { + report_security_hide_timearning(); + $table = new object(); $table->head = array($strissue, $strstatus, $strdesc); $table->size = array('30%', '10%', '60%' ); diff --git a/admin/report/security/lib.php b/admin/report/security/lib.php index 75561b761b..0891ce3b1c 100644 --- a/admin/report/security/lib.php +++ b/admin/report/security/lib.php @@ -32,6 +32,15 @@ define('REPORT_SECURITY_WARNING', 'warning'); define('REPORT_SECURITY_SERIOUS', 'serious'); define('REPORT_SECURITY_CRITICAL', 'critical'); +function report_security_hide_timearning() { + echo ''; + +} function report_security_get_issue_list() { return array( diff --git a/lang/en_utf8/report_security.php b/lang/en_utf8/report_security.php index 14a170ad28..80029c1fa6 100644 --- a/lang/en_utf8/report_security.php +++ b/lang/en_utf8/report_security.php @@ -15,6 +15,7 @@ $string['statusinfo'] = 'Information'; $string['statusok'] = 'OK'; $string['statusserious'] = 'Serious'; $string['statuswarning'] = 'Warning'; +$string['timewarning'] = 'Data processing may take a long time, please be patient...'; $string['check_configrw_details'] = '

It is recommended that the file permissions of config.php are changed after installation so that the file cannot be modified by the web server. Please note that this measure does not improve security of the server significantly, though it may slow down or limit general exploits.

'; diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index 9ddc98a980..b7fd946846 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -1026,6 +1026,14 @@ body#admin-modules table.generaltable td.c0 margin-top: 1em; } +#admin-report-security-index #timewarning { + text-align:center; +} + +#admin-report-security-index .timewarninghidden { + display:none; +} + #admin-report-capability-index .rolecaps th { text-align: left; } -- 2.39.5