Commit Graph

12 Commits

Author SHA1 Message Date
Mikael Nordfeldth
fcba540a14 Removed legacy OMB. Use OStatus for remote profiles. 2013-10-28 16:22:09 +01:00
Mikael Nordfeldth
29d0871e5a Making many of the API actions more consistent with coding style
clientError and serverError exit after they're done so no need for
break or return. Also, $this->format is default.

We also got rid of the incredibly verbose version of $this->isPost()
which was spread all over the place.

Not all of this cleaning up is done yet.
2013-10-15 03:07:40 +02:00
Mikael Nordfeldth
a9c4bcd71f Removing unnecessary require_once lines (autoload!) 2013-09-09 23:06:56 +02:00
Siebrand Mazeland
a2e4a1803c Harmonize message for 'User has no profile.' and update translator documentation. 2011-04-25 22:44:19 +02:00
Brion Vibber
0a3c05feb0 Fix XML API output for several profile update methods that returned a <user> entry but didn't set namespaces, causing XML parse failures. 2011-01-24 12:41:30 -08:00
Brion Vibber
820dd293c9 Fix for ticket #3007: .bmp avatar uploads weren't being properly converted to PNG in all cases
Part of the reported issue was previuosly fixed by dc497ed0 (smaller size images being blanked).
This commit fixes the remaining bug with original-size avatars being left as BMP (which could include the 96px size for instance, which could cause problems in browsers not supporting BMP natively)

Added ImageFile::copyTo() as a convenient alias for resizeTo() when not resizing; this performs the BMP/XPM/XBM->PNG conversion if needed, or copies the original file.
Copying instead of using move_uploaded_file() is fine here since:
a) the files are cleaned up on script completion anyway (vs moving to remove it)
b) we're already performing getimagesize() and possibly load/resize on the file before this point (vs needing to move the file into a usable area to work with open_basedir restrictions that prevent working directly with uploaded files in the temp dir; since this would fail anyway, we lose nothing)

ImageFile::preferredType() now works on $this->type instead of asking for one, to make it handier to use from outside. (This is still needed in order for calling code to generate a target filename.)

Recommended for future:
* additional consolidation between the various ways of uploading avatars (touched avatarsettings, grouplogo, and apiaccountupdateprofileimage with similar minor changes)
* consolidate type checks and file naming into Avatar class
2011-01-24 12:22:47 -08:00
Siebrand Mazeland
a12474a99d * i18n/L10n fixes.
* translator documentation updated.
* superfluous whitespace removed.
2010-10-28 01:21:09 +02:00
Siebrand Mazeland
cb74822e7a i18n/L10n consistency updates. 2010-10-21 13:20:21 +02:00
Siebrand Mazeland
a9fad9a7ac Add translator hint. 2010-09-12 17:08:49 +02:00
Zach Copley
c8bd6d9f7a Make /api/account/update_profile_background_image.format work even
when there isn't an existing Design for the user. Plus a few other
fixups.
2009-11-09 23:56:02 -08:00
Zach Copley
b522c401e6 Better workaround for PHP returning empty $_POST and $_FILES when
POST length > post_max_size in php.ini. I also added this check to
avatar upload, which was failing with huge files.
2009-11-06 17:21:08 -08:00
Zach Copley
527427d3e0 Implement update avatar via API (/api/account/update_profile_image.format) 2009-11-04 21:00:26 -08:00