These patches are maintained in an publicly accessible Arch repository, see: http://lists.eduforge.org/cgi-bin/archzoom.cgi/arch-eduforge@catalyst.net.nz--2004-MIRROR/moodle--eduforge--1.3.3
Index of arch patches in this commit:
arch-eduforge@catalyst.net.nz--2004/moodle--eduforge--1.3.3--patch-73
2004-09-17 00:05:28 GMT
Penny Leach <penny@catalyst.net.nz>
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: arch-eduforge@catalyst.net.nz--2004
Creator: Penny Leach <penny@catalyst.net.nz>
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: arch-eduforge@catalyst.net.nz--2004/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:
$selectedactivity = "$mod->cm";
}
}
+ }
- if (isadmin() && !$course->category) {
- $activities["site_errors"] = get_string("siteerrors");
- if ($modid === "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");
case "admin":
return "/$module/$url";
break;
+ case "upload":
+ return "$url";
+ break;
case "library":
case "":
return "/";
}
if ('site_errors' === $modid) {
- $joins[] = "l.action='error'";
+ $joins[] = "l.action='error' OR l.action='infected'";
} else if ($modid) {
$joins[] = "l.cmid = '$modid'";
}
if ($course) {
$courseid = $course->id;
}
- add_to_log($courseid,"upload","upload","",$newfilepath);
+ add_to_log($courseid,"upload","upload",$_SERVER['HTTP_REFERER'],$newfilepath);
}
/**
*/
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);
}
$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) {