aboutsummaryrefslogtreecommitdiff
path: root/actions/avatar
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-10-02 11:17:56 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-10-02 11:17:56 -0700
commitdd55b4b87cb1c89ceeb45ccf49ce648339a86041 (patch)
tree035059f5f06a2f6595110aff7c620380b46af103 /actions/avatar
parentbfdb9bb8a87a29038ba1ae25355684ae19678fdd (diff)
parentad016fd1254aa03afa7c24fdb82b35faa3c5019f (diff)
downloadelgg-dd55b4b87cb1c89ceeb45ccf49ce648339a86041.tar.gz
elgg-dd55b4b87cb1c89ceeb45ccf49ce648339a86041.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'actions/avatar')
-rw-r--r--actions/avatar/upload.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/avatar/upload.php b/actions/avatar/upload.php
index 19976ea87..885a16557 100644
--- a/actions/avatar/upload.php
+++ b/actions/avatar/upload.php
@@ -11,6 +11,11 @@ if (!$owner || !($owner instanceof ElggUser) || !$owner->canEdit()) {
forward(REFERER);
}
+if ($_FILES['avatar']['error'] != 0) {
+ register_error(elgg_echo('avatar:upload:fail'));
+ forward(REFERER);
+}
+
//@todo make this configurable?
$icon_sizes = array(
'topbar' => array('w'=>16, 'h'=>16, 'square'=>TRUE, 'upscale'=>TRUE),
@@ -42,7 +47,7 @@ foreach ($icon_sizes as $name => $size_info) {
$file->delete();
}
- system_message(elgg_echo('avatar:resize:fail'));
+ register_error(elgg_echo('avatar:resize:fail'));
forward(REFERER);
}
}