1: <?php
2: /**
3: * Copyright 2005-2007 Andrew Hosie <ahosie@gmail.com>
4: *
5: * See the enclosed file COPYING for license information (GPL). If you
6: * did not receive this file, see http://www.horde.org/licenses/gpl.
7: */
8:
9: function handle_avatarselect($updated)
10: {
11: if ($GLOBALS['conf']['avatar']['allow_avatars']) {
12: $avatar_path = Horde_Util::getFormData('avatar_path');
13: $avatar_path = Agora::validateAvatar($avatar_path) ? $avatar_path : null;
14: if ($avatar_path) {
15: $GLOBALS['prefs']->setValue('avatar_path', $avatar_path);
16: $updated = true;
17: }
18: }
19:
20: return $updated;
21: }
22: