aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/profile/actions/cropicon.php5
-rw-r--r--mod/profile/actions/iconupload.php5
-rw-r--r--mod/profile/icon.php2
-rw-r--r--mod/profile/views/default/profile/icon.php2
4 files changed, 12 insertions, 2 deletions
diff --git a/mod/profile/actions/cropicon.php b/mod/profile/actions/cropicon.php
index bcd8ea756..d52c6b02c 100644
--- a/mod/profile/actions/cropicon.php
+++ b/mod/profile/actions/cropicon.php
@@ -22,6 +22,7 @@
$filehandler->setFilename("profile/" . $user->username . "master" . ".jpg");
$filename = $filehandler->getFilenameOnFilestore();
+ $toolbar = get_resized_image_from_existing_file($filename,16,16, true, $x1, $y1, $x2, $y2);
$tiny = get_resized_image_from_existing_file($filename,25,25, true, $x1, $y1, $x2, $y2);
$small = get_resized_image_from_existing_file($filename,40,40, true, $x1, $y1, $x2, $y2);
$medium = get_resized_image_from_existing_file($filename,100,100, true, $x1, $y1, $x2, $y2);
@@ -44,6 +45,10 @@
$filehandler->open("write");
$filehandler->write($tiny);
$filehandler->close();
+ $filehandler->setFilename("profile/" . $_SESSION['user']->username . "toolbar.jpg");
+ $filehandler->open("write");
+ $filehandler->write($toolbar);
+ $filehandler->close();
$user->x1 = $x1;
$user->x2 = $x2;
diff --git a/mod/profile/actions/iconupload.php b/mod/profile/actions/iconupload.php
index bb3b19528..a82327825 100644
--- a/mod/profile/actions/iconupload.php
+++ b/mod/profile/actions/iconupload.php
@@ -15,6 +15,7 @@
isloggedin()
) {
+ $toolbar = get_resized_image_from_uploaded_file('profileicon',16,16, true);
$tiny = get_resized_image_from_uploaded_file('profileicon',25,25, true);
$small = get_resized_image_from_uploaded_file('profileicon',40,40, true);
$medium = get_resized_image_from_uploaded_file('profileicon',100,100, true);
@@ -44,6 +45,10 @@
$filehandler->open("write");
$filehandler->write($tiny);
$filehandler->close();
+ $filehandler->setFilename("profile/" . $_SESSION['user']->username . "toolbar.jpg");
+ $filehandler->open("write");
+ $filehandler->write($toolbar);
+ $filehandler->close();
$filehandler->setFilename("profile/" . $_SESSION['user']->username . "master.jpg");
$filehandler->open("write");
$filehandler->write($master);
diff --git a/mod/profile/icon.php b/mod/profile/icon.php
index 4a9c8cbfe..fc4f377ce 100644
--- a/mod/profile/icon.php
+++ b/mod/profile/icon.php
@@ -20,7 +20,7 @@
// Get the size
$size = strtolower(get_input('size'));
- if (!in_array($size,array('large','medium','small','tiny','master')))
+ if (!in_array($size,array('large','medium','small','tiny','master','toolbar')))
$size = "medium";
// Try and get the icon
diff --git a/mod/profile/views/default/profile/icon.php b/mod/profile/views/default/profile/icon.php
index 22fc86305..426b8d9bb 100644
--- a/mod/profile/views/default/profile/icon.php
+++ b/mod/profile/views/default/profile/icon.php
@@ -27,7 +27,7 @@
}
// Get size
- if (!in_array($vars['size'],array('small','medium','large','tiny','master')))
+ if (!in_array($vars['size'],array('small','medium','large','tiny','master','toolbar')))
$vars['size'] = "medium";
// Get any align and js