Mikael Nordfeldth
a23c4aa236
Avatar resizing improvements and better code reuse
...
* getOriginal added to Avatar class
This is a static function that retrieves the original avatar in a leaner
way than Profile->getOriginalAvatar() did (see below).
This will throw an Exception if there was none to be found.
* getProfileAvatars added to Avatar class
This gets all Avatars from a profile and returns them in an array.
* newSize added to Avatar class
This will scale an original avatar or throw an Exception (originally from
Avatar::getOriginal) if one wasn't found.
* deleteFromProfile added to Avatar class
Deletes all avatars for a Profile. This makes the code much smarter when
removing all avatars from a user.
Previously only specific, hardcoded (through constants) sizes would be
deleted. If you ever changed lib/framework.php then many oddsized avatars
would remain with the old method.
* Migrated Profile class to new Avatar::getOriginal support
Profile class now uses Avatar::getOriginal through its own
$this->getOriginalAvatar and thus remains backwards compatible.
* Updating stock GNU Social to use Avatar::getOriginal
All places where core StatusNet code used the
$profile->getOriginalAvatar, it will now useAvatar::getOriginal with
proper error handling.
* Updated Profile class to use Avatar::newSize
When doing setOriginal, the scaling will be done with the new method
introduced in this merge.
This also edits the _fillAvatar function to avoid adding NULL values to
the array (which causes errors when attempting to access array entries as
objects). See issue #3478 at http://status.net/open-source/issues/3478
2013-09-30 22:23:03 +02:00
..
2011-08-18 15:11:10 +02:00
2013-09-24 02:32:17 +02:00
2012-10-17 10:10:42 -04:00
2013-08-18 13:13:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-19 17:29:05 +02:00
2013-09-09 23:06:56 +02:00
2010-11-07 22:31:02 +01:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2011-04-05 13:16:28 -04:00
2011-04-04 00:12:52 +02:00
2013-09-09 23:06:56 +02:00
2013-08-18 13:13:56 +02:00
2011-04-04 00:12:52 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2011-04-10 19:59:55 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2011-04-10 19:59:55 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2011-02-17 00:40:47 +01:00
2011-07-15 12:13:57 -07:00
2010-10-28 01:21:21 +02:00
2010-10-28 01:21:21 +02:00
2011-12-30 22:23:50 -08:00
2013-08-18 13:13:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-08-18 13:13:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-19 01:11:47 +02:00
2011-04-04 00:12:52 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2011-09-18 17:33:25 -04:00
2013-09-09 23:06:56 +02:00
2011-04-10 19:59:55 +02:00
2013-09-09 23:06:56 +02:00
2011-08-25 11:50:45 -04:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2011-06-23 11:38:46 -04:00
2013-09-09 23:06:56 +02:00
2010-10-28 01:21:21 +02:00
2013-09-09 23:06:56 +02:00
2013-09-21 18:38:14 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-09-24 02:32:17 +02:00
2013-09-24 02:32:17 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2013-09-09 23:06:56 +02:00
2010-10-31 00:58:35 +02:00
2013-08-18 13:13:56 +02:00
2013-09-10 11:16:34 +02:00
2013-08-18 13:13:56 +02:00
2013-09-30 22:23:03 +02:00
2011-02-25 12:24:18 -08:00
2011-02-17 00:40:47 +01:00
2013-08-18 13:13:56 +02:00
2010-10-31 00:58:35 +02:00
2013-09-24 02:32:17 +02:00
2013-09-24 02:32:17 +02:00
2013-08-18 13:13:56 +02:00
2011-09-24 09:29:12 -04:00
2013-09-24 01:18:33 +02:00
2011-08-18 15:11:10 +02:00
2013-08-18 13:13:56 +02:00
2013-09-24 02:32:17 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-09-24 02:32:17 +02:00
2011-09-30 14:24:27 -04:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-09-24 02:32:17 +02:00
2011-10-20 10:40:39 -04:00
2013-08-18 13:13:56 +02:00
2011-03-01 16:11:59 -05:00
2013-08-18 13:13:56 +02:00
2013-09-30 22:23:03 +02:00
2013-08-18 13:13:56 +02:00
2011-04-03 23:47:46 +02:00
2011-02-28 15:39:43 -08:00
2011-01-31 16:39:54 +01:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-09-14 13:31:16 +02:00
2012-07-04 14:45:50 -04:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2011-03-01 16:18:33 -05:00
2011-01-31 18:16:55 +01:00
2013-08-18 13:13:56 +02:00
2011-08-18 14:21:43 +02:00
2011-02-17 00:40:47 +01:00
2013-09-19 17:29:05 +02:00
2013-09-24 02:32:17 +02:00
2013-09-24 02:32:17 +02:00
2011-03-05 00:13:04 +01:00
2011-09-21 16:33:10 -04:00
2011-09-17 15:08:04 -04:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-09-02 12:13:46 +02:00
2013-09-02 11:58:47 +02:00
2013-09-24 02:32:17 +02:00
2013-09-24 02:32:17 +02:00
2011-04-12 14:29:12 -04:00
2011-02-17 20:58:22 +01:00
2013-09-24 02:32:17 +02:00
2013-06-15 14:19:15 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2011-03-05 00:13:04 +01:00
2013-08-18 13:13:56 +02:00
2011-02-17 00:40:47 +01:00
2011-04-03 23:47:46 +02:00
2011-08-27 19:22:02 -07:00
2011-02-17 20:58:22 +01:00
2011-04-17 02:11:46 +02:00
2011-04-16 00:52:58 +05:30
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2011-03-11 17:07:27 +01:00
2013-09-24 02:32:17 +02:00
2011-03-11 17:07:27 +01:00
2013-09-24 02:32:17 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2012-10-17 10:10:42 -04:00
2011-02-17 20:58:22 +01:00
2011-03-22 11:54:23 -04:00
2011-03-11 17:07:27 +01:00
2013-08-18 13:13:56 +02:00
2010-10-12 23:38:16 -04:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-09-24 02:32:17 +02:00
2013-09-24 02:32:17 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2011-08-15 15:57:36 +02:00
2011-03-18 20:37:04 +01:00
2011-02-17 21:10:48 +01:00
2013-08-18 13:13:56 +02:00
2011-03-24 11:48:53 +01:00
2011-04-17 20:08:03 +02:00
2011-03-24 11:48:53 +01:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2012-01-26 11:02:29 -05:00
2013-08-18 13:13:56 +02:00
2013-09-24 01:18:33 +02:00
2013-08-18 13:13:56 +02:00
2012-01-26 11:02:29 -05:00
2011-03-24 12:09:50 +01:00
2011-06-15 13:25:40 +02:00
2011-08-18 15:11:10 +02:00
2013-08-18 13:13:56 +02:00
2011-08-18 15:11:10 +02:00
2013-08-18 13:13:56 +02:00
2011-03-28 17:08:04 -07:00
2013-09-24 02:32:17 +02:00
2013-09-24 02:32:17 +02:00
2011-04-14 15:51:00 -04:00
2013-09-21 18:38:14 +02:00
2011-03-22 11:54:23 -04:00
2011-09-18 12:52:38 -04:00
2013-09-24 02:32:17 +02:00
2013-08-18 13:13:56 +02:00
2011-09-30 09:45:17 -04:00
2011-02-17 20:58:22 +01:00
2011-03-29 21:30:35 +02:00
2011-03-29 21:30:35 +02:00
2013-09-24 02:32:17 +02:00
2013-09-24 02:32:17 +02:00
2013-09-25 22:48:32 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2013-08-18 13:13:56 +02:00
2011-10-29 14:34:50 +02:00