From be22a5c16cdeb6198cc25855bb63b0f87e04f0ea Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 15 Feb 2009 09:45:34 +0000 Subject: [PATCH] MDL-18078 adding docs links from detailed security overview report; merged from MOODLE_19_STABLE --- admin/report/security/index.php | 2 +- admin/report/security/lib.php | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/admin/report/security/index.php b/admin/report/security/index.php index 789e373c68..4a003130a6 100644 --- a/admin/report/security/index.php +++ b/admin/report/security/index.php @@ -83,7 +83,7 @@ if ($issue and ($result = $issue(true))) { // print detail of one issue only $row = array(); - $row[0] = $result->name; + $row[0] = report_security_doc_link($issue, $result->name); $row[1] = $statusarr[$result->status]; $row[2] = $result->info; $row[3] = is_null($result->link) ? ' ' : $result->link; diff --git a/admin/report/security/lib.php b/admin/report/security/lib.php index d2fdb75ce2..a819d0b785 100644 --- a/admin/report/security/lib.php +++ b/admin/report/security/lib.php @@ -67,6 +67,21 @@ function report_security_get_issue_list() { ); } +function report_security_doc_link($issue, $name) { + global $CFG; + + if (empty($CFG->docroot)) { + return $name; + } + + $lang = str_replace('_utf8', '', current_language()); + + $str = "docroot/$lang/report/security/$issue\">"; + $str .= "httpswwwroot/pix/docs.gif\" alt=\"\" />$name"; + + return $str; +} + ///============================================= /// Issue checks ///============================================= -- 2.39.5