Changes to log view page so that infected files comes under 'site errors'.
These patches are maintained in an publicly accessible Arch repository, see: http://lists.eduforge.org/cgi-bin/archzoom.cgi/[email protected]/moodle--eduforge--1.3.3 Index of arch patches in this commit: [email protected]/moodle--eduforge--1.3.3--patch-73 2004-09-17 00:05:28 GMT Penny Leach <[email protected]> better logging for uploads and infected files, as well as changing the log page view slightly so that site errors yields infected files as well Full logs: Revision: moodle--eduforge--1.3.3--patch-73 Archive: [email protected] Creator: Penny Leach <[email protected]> Date: Fri Sep 17 12:05:28 NZST 2004 Standard-date: 2004-09-17 00:05:28 GMT Modified-files: course/lib.php lib/uploadlib.php lib/weblib.php New-patches: [email protected]/moodle--eduforge--1.3.3--patch-73 Summary: better logging for uploads and infected files, as well as changing the log page view slightly so that site errors yields infected files as well Keywords:
This commit is contained in:
+10
-8
@@ -320,15 +320,14 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate="today"
|
||||
$selectedactivity = "$mod->cm";
|
||||
}
|
||||
}
|
||||
|
||||
if (isadmin() && !$course->category) {
|
||||
$activities["site_errors"] = get_string("siteerrors");
|
||||
if ($modid === "site_errors") {
|
||||
$selectedactivity = "site_errors";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isadmin() && !$course->category) {
|
||||
$activities["site_errors"] = get_string("siteerrors");
|
||||
if ($modid === "site_errors") {
|
||||
$selectedactivity = "site_errors";
|
||||
}
|
||||
}
|
||||
|
||||
$strftimedate = get_string("strftimedate");
|
||||
$strftimedaydate = get_string("strftimedaydate");
|
||||
@@ -398,6 +397,9 @@ function make_log_url($module, $url) {
|
||||
case "admin":
|
||||
return "/$module/$url";
|
||||
break;
|
||||
case "upload":
|
||||
return "$url";
|
||||
break;
|
||||
case "library":
|
||||
case "":
|
||||
return "/";
|
||||
@@ -448,7 +450,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per
|
||||
}
|
||||
|
||||
if ('site_errors' === $modid) {
|
||||
$joins[] = "l.action='error'";
|
||||
$joins[] = "l.action='error' OR l.action='infected'";
|
||||
} else if ($modid) {
|
||||
$joins[] = "l.cmid = '$modid'";
|
||||
}
|
||||
|
||||
+2
-2
@@ -607,7 +607,7 @@ function clam_log_upload($newfilepath,$course=null) {
|
||||
if ($course) {
|
||||
$courseid = $course->id;
|
||||
}
|
||||
add_to_log($courseid,"upload","upload","",$newfilepath);
|
||||
add_to_log($courseid,"upload","upload",$_SERVER['HTTP_REFERER'],$newfilepath);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -618,7 +618,7 @@ function clam_log_upload($newfilepath,$course=null) {
|
||||
*/
|
||||
function clam_log_infected($oldfilepath='',$newfilepath='',$userid=0) {
|
||||
|
||||
add_to_log(0,"upload","infected","",$oldfilepath,0,$userid);
|
||||
add_to_log(0,"upload","infected",$_SERVER['HTTP_REFERER'],$oldfilepath,0,$userid);
|
||||
|
||||
$user = get_record('user','id',$userid);
|
||||
|
||||
|
||||
@@ -336,6 +336,10 @@ function link_to_popup_window ($url, $name="popup", $linkname="click here",
|
||||
}
|
||||
$fullscreen = 0;
|
||||
|
||||
if (!(strpos($url,$CFG->wwwroot) === false)) { // some log url entries contain _SERVER[HTTP_REFERRER] in which case wwwroot is already there.
|
||||
$url = substr($url,strlen($CFG->wwwroot)+1);
|
||||
}
|
||||
|
||||
$link = "<a target=\"$name\" title=\"$title\" href=\"$CFG->wwwroot$url\" ".
|
||||
"onclick=\"return openpopup('$url', '$name', '$options', $fullscreen);\">$linkname</a>\n";
|
||||
if ($return) {
|
||||
|
||||
Reference in New Issue
Block a user