[buddypress-trac] [BuddyPress Trac] #6278: Attachment Library

buddypress-trac noreply at wordpress.org
Fri Mar 27 15:57:41 UTC 2015


#6278: Attachment Library
------------------------------------+------------------
 Reporter:  imath                   |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  2.3
Component:  API                     |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by imath):

 In 6278.08.patch, i'm trying to improve the code following DJPaul's
 recommandations (we've been talking about it at #wcldn) :
 1. Improve i18n for the avatar file types error message and allow people
 to restrict the image types for avatar.
 2. abstract the BP_Attachment class, so it must be extended.
 3. avoid using {{{get_class_vars( __CLASS__ )}}} to get the default values
 in the BP_Attachment constructor
 4. Sanitize the base_dir if set
 5. Make sure the action and file_input parameters are also sanitized
 6. use a {{{is_dir()}}} check instead of a {{{file_exists()}}} one when
 checking if the upload_path exists
 7. Use bp_parse_args in the BP_Attachment crop method

 I'm also suggesting unit tests (actually there were already in 07.patch,
 but i am hesitating). I'm adding some files in assets: 1 pdf, 2 images ;
 and i'm simulating some uploads : is that Ok with Travis ?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6278#comment:57>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list