]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18078 adding docs links from detailed security overview report; merged from MOODL...
authorskodak <skodak>
Sun, 15 Feb 2009 09:45:34 +0000 (09:45 +0000)
committerskodak <skodak>
Sun, 15 Feb 2009 09:45:34 +0000 (09:45 +0000)
admin/report/security/index.php
admin/report/security/lib.php

index 789e373c68e1e60664970d146a8e584d796d6b37..4a003130a61c4cd20ff29dd335a6f0a31c14c32f 100644 (file)
@@ -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) ? '&nbsp;' : $result->link;
index d2fdb75ce251f342095228407bc07eee882922ac..a819d0b785276d1cd390e54149304a1cdc85a670 100644 (file)
@@ -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 = "<a onclick=\"this.target='docspopup'\" href=\"$CFG->docroot/$lang/report/security/$issue\">";
+    $str .= "<img class=\"iconhelp\" src=\"$CFG->httpswwwroot/pix/docs.gif\" alt=\"\" />$name</a>";
+
+    return $str;
+}
+
 ///=============================================
 ///               Issue checks
 ///=============================================