MDL-18078 adding docs links from detailed security overview report; merged from MOODLE_19_STABLE

This commit is contained in:
skodak
2009-02-15 09:45:34 +00:00
parent ff721259ca
commit be22a5c16c
2 changed files with 16 additions and 1 deletions
+1 -1
View 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) ? ' ' : $result->link;
+15
View 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
///=============================================