aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/actions/groups/edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/actions/groups/edit.php')
-rw-r--r--mod/groups/actions/groups/edit.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/mod/groups/actions/groups/edit.php b/mod/groups/actions/groups/edit.php
index 3a0376497..c4cf6667e 100644
--- a/mod/groups/actions/groups/edit.php
+++ b/mod/groups/actions/groups/edit.php
@@ -91,7 +91,7 @@ $group->save();
// group creator needs to be member of new group and river entry created
if ($new_group_flag) {
- set_page_owner($group->guid);
+ elgg_set_page_owner_guid($group->guid);
$group->join($user);
add_to_river('river/group/create', 'create', $user->guid, $group->guid);
}
@@ -111,7 +111,10 @@ if (elgg_get_plugin_setting('hidden_groups', 'groups') == 'yes') {
// Now see if we have a file icon
if ((isset($_FILES['icon'])) && (substr_count($_FILES['icon']['type'],'image/'))) {
- $prefix = "groups/".$group->guid;
+
+ $icon_sizes = elgg_get_config('icon_sizes');
+
+ $prefix = "groups/" . $group->guid;
$filehandler = new ElggFile();
$filehandler->owner_guid = $group->owner_guid;
@@ -120,10 +123,10 @@ if ((isset($_FILES['icon'])) && (substr_count($_FILES['icon']['type'],'image/'))
$filehandler->write(get_uploaded_file('icon'));
$filehandler->close();
- $thumbtiny = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(),25,25, true);
- $thumbsmall = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(),40,40, true);
- $thumbmedium = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(),100,100, true);
- $thumblarge = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(),200,200, false);
+ $thumbtiny = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(), $icon_sizes['tiny']['w'], $icon_sizes['tiny']['h'], $icon_sizes['tiny']['square']);
+ $thumbsmall = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(), $icon_sizes['small']['w'], $icon_sizes['small']['h'], $icon_sizes['small']['square']);
+ $thumbmedium = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(), $icon_sizes['medium']['w'], $icon_sizes['medium']['h'], $icon_sizes['medium']['square']);
+ $thumblarge = get_resized_image_from_existing_file($filehandler->getFilenameOnFilestore(), $icon_sizes['large']['w'], $icon_sizes['large']['h'], $icon_sizes['large']['square']);
if ($thumbtiny) {
$thumb = new ElggFile();