* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-if (!defined('LACONICA')) { exit(1) }
+if (!defined('LACONICA')) { exit(1); }
+
+require_once(INSTALLDIR.'/lib/settingsaction.php');
class AvatarAction extends SettingsAction {
'height' => AVATAR_PROFILE_SIZE));
}
- common_start_element('form', array('enctype' => 'multipart/form-data',
+ common_element_start('form', array('enctype' => 'multipart/form-data',
'method' => 'POST',
'id' => 'avatar',
'action' =>
'type' => 'submit',
'id' => 'submit'),
_t('Upload'));
+ common_element_end('form');
}
function handle_post() {
$avatar->filename = $filename;
$avatar->original = true;
$avatar->url = common_avatar_url($filename);
-
+ $avatar->created = date(DATE_RFC822); # current time
foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) {
$scaled[] = $this->scale_avatar($user, $avatar, $size);
}
$scaled->mediatype = ($avatar->mediattype == 'image/jpeg') ? 'image/jpeg' : 'image/png';
$scaled->filename = $filename;
$scaled->url = common_avatar_url($filename);
+ $scaled->created = date(DATE_RFC822); # current time
return $scaled;
}