1
0
mirror of https://github.com/moodle/moodle.git synced 2025-05-12 11:15:49 +02:00

Undoing hack from David ... it can't be just switched off

without making existing sites look crap
This commit is contained in:
moodler 2005-07-06 13:24:43 +00:00
parent 18a1868bd1
commit 34ea06ece4

@ -182,6 +182,18 @@ function save_profile_image($id, $uploadmanager, $dir='users') {
ImageCopyBicubic($im1, $im, 0, 0, $cx-$half, $cy-$half, 100, 100, $half*2, $half*2);
ImageCopyBicubic($im2, $im, 0, 0, $cx-$half, $cy-$half, 35, 35, $half*2, $half*2);
// Draw borders over the top.
$black1 = ImageColorAllocate ($im1, 0, 0, 0);
$black2 = ImageColorAllocate ($im2, 0, 0, 0);
ImageLine ($im1, 0, 0, 0, 99, $black1);
ImageLine ($im1, 0, 99, 99, 99, $black1);
ImageLine ($im1, 99, 99, 99, 0, $black1);
ImageLine ($im1, 99, 0, 0, 0, $black1);
ImageLine ($im2, 0, 0, 0, 34, $black2);
ImageLine ($im2, 0, 34, 34, 34, $black2);
ImageLine ($im2, 34, 34, 34, 0, $black2);
ImageLine ($im2, 34, 0, 0, 0, $black2);
if (ImageJpeg($im1, $CFG->dataroot .'/'. $dir .'/'. $id .'/f1.jpg', 90) and
ImageJpeg($im2, $CFG->dataroot .'/'. $dir .'/'. $id .'/f2.jpg', 95) ) {
@chmod($CFG->dataroot .'/'. $dir .'/'. $id .'/f1.jpg', 0666);
@ -193,4 +205,4 @@ function save_profile_image($id, $uploadmanager, $dir='users') {
}
?>
?>