fixed photo upload

This commit is contained in:
Roland Gruber 2011-12-08 19:17:37 +00:00
parent 1d25cbe797
commit 8e2419aa04
1 changed files with 3 additions and 1 deletions

View File

@ -1284,7 +1284,9 @@ class inetOrgPerson extends baseModule implements passwordService {
* Sets a new photo.
*/
function process_photo() {
if ($_POST['form_subpage_' . get_class($this) . '_attributes_back']) return array();
if (!isset($_POST['form_subpage_' . get_class($this) . '_attributes_submit'])) {
return array();
}
$messages = array();
if ($_FILES['photoFile'] && ($_FILES['photoFile']['size'] > 0)) {
$handle = fopen($_FILES['photoFile']['tmp_name'], "r");