[wp-trac] Re: [WordPress Trac] #7875: consolidate plugin/theme/core upgrade/install functions

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 8 23:07:54 GMT 2009


#7875: consolidate plugin/theme/core upgrade/install functions
-----------------------------+----------------------------------------------
 Reporter:  DD32             |       Owner:  anonymous              
     Type:  enhancement      |      Status:  new                    
 Priority:  highest omg bbq  |   Milestone:  2.8                    
Component:  Administration   |     Version:  2.7                    
 Severity:  major            |    Keywords:  has-patch needs-testing
-----------------------------+----------------------------------------------

Comment(by DD32):

 > Changes to wp-admin/includes/class-wp-filesystem-base.php, as far as I
 can tell, move bits of code around *and* adds trailingslashit() calls.
 Might this not be rejected for backwards compatibility reasons due to the
 fact that it translates to API changes?

 I've been debugging a few related issues over the last while, And have
 been making small fixes to the code, but not submitting patches. This
 wasnt a final patch so I've just submitted them along with it. I'll make a
 patch to fix up the FS stuff once i finish testing.

 > WP_Upgrader::download_package(): "$download_file =
 download_url($package); //TODO, move to class?" -- probably not, as it
 would break backward compat

 I probably will move it to the class, Its not used anywhere else by core..
 I'll leave a stub function which redirects it to this class though..

 > WP_Upgrader::unpack_package(): You're not using the $delete_package
 variable
 I noticed that myself :)

 > WP_Upgrader::install_package(): "Please always pass these" -- maybe
 switch the comment to: A WP error will be returned if these aren't set
 Already done

 > Theme_Upgrader::upgrade_strings(): "Maintainence mode?" -- yeyeye, +1 to
 that.
 (Theres a trac ticket -somewhere- for this)

 > Theme_Upgrader::install(): Probably just a copy/past, but... shouldn't
 the strings be $theme_files? :-)
 Probably :P

 > @set_time_limit( 300 );
 I guess its a possibility, we already set a memory limit of 256MB for zip
 unziping..

 > In your opinion, how shareable are the check_for_update functions?
 Not sure, Not very i dont think, I've done some UI work since this patch,
 and am still trying to work out if it looks cleaner afterwards or not :P

 It might be possible to streamline the update checks a bit, but i dont
 think so (But i'll come back to that)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/7875#comment:15>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list