Skip to content

Commit

Permalink
MDL-18078 adding docs links from detailed security overview report; m…
Browse files Browse the repository at this point in the history
…erged from MOODLE_19_STABLE
  • Loading branch information
skodak committed Feb 15, 2009
1 parent ff72125 commit be22a5c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion admin/report/security/index.php
Expand Up @@ -83,7 +83,7 @@

// 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;
Expand Down
15 changes: 15 additions & 0 deletions admin/report/security/lib.php
Expand Up @@ -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
///=============================================
Expand Down

0 comments on commit be22a5c

Please sign in to comment.