From: skodak Date: Sun, 15 Feb 2009 09:45:34 +0000 (+0000) Subject: MDL-18078 adding docs links from detailed security overview report; merged from MOODL... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=be22a5c16cdeb6198cc25855bb63b0f87e04f0ea;p=moodle.git MDL-18078 adding docs links from detailed security overview report; merged from MOODLE_19_STABLE --- 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 ///=============================================