MDL-8319 avatar image is now deleted from disk, user/pix.php redirects to default picture if user picture not present(===deleted)

This commit is contained in:
skodak
2007-01-26 20:15:54 +00:00
parent 77b09448b3
commit 9d85247dab
2 changed files with 9 additions and 10 deletions
+5 -9
View File
@@ -19,15 +19,11 @@
$userid = (integer)$args[0];
$image = $args[1];
$pathname = $CFG->dataroot.'/users/'.$userid.'/'.$image;
} else {
$image = 'f1.png';
$pathname = $CFG->dirroot.'/pix/u/f1.png';
if (file_exists($pathname) and !is_dir($pathname)) {
send_file($pathname, $image);
}
}
if (file_exists($pathname) and !is_dir($pathname)) {
send_file($pathname, $image);
} else {
header('HTTP/1.0 404 not found');
error(get_string('filenotfound', 'error')); //this is not displayed on IIS??
}
// picture was deleted - use default instead
redirect($CFG->pixpath.'/u/f1.png');
?>