[wp-trac] Re: [WordPress Trac] #5586: Auto installer for themes and plugins

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 10 01:48:47 GMT 2008


#5586: Auto installer for themes and plugins
------------------------------------+---------------------------------------
 Reporter:  lawrencejob             |        Owner:  ryan 
     Type:  enhancement             |       Status:  new  
 Priority:  normal                  |    Milestone:  2.5  
Component:  Administration          |      Version:  2.3.1
 Severity:  normal                  |   Resolution:       
 Keywords:  installer theme plugin  |  
------------------------------------+---------------------------------------
Comment (by DD32):

 > attachment 5586.7.diff added.

 Patch makes show_message() show any error data which was passed through to
 it.

 Its useful in debugging issues where the Zip class cannot handle a zip
 file. Eg:
 {{{
 Before:
 Incompatible archive
 After:
 Incompatible archive: Unable to find End of Central Dir Record signature
 }}}

 It will hopefully allow testers & users to report back the bugs which they
 come accross, "Incompatible Archive" is really a rather bland error to
 debug from.

 Also, I've been told that the OneClick plugins zip routines DO work on a
 host that recieved that "Incompatible Archive" message, So looking at that
 plugin, Heres the code its using:
 {{{
         if ($archive->extract(PCLZIP_OPT_PATH, '../wp-content/plugins/')
 == 0)
         {
             if (function_exists('exec'))
             {
                 exec("unzip -d ../wp-content/plugins/ ../wp-
 content/plugins/oneclick/$uploadedfile");
             }
         }
     }
 }}}

 My guess is that its falling back to the unzip program in the case where
 PclZip was failing - I dont like the idea of using exec() though.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5586#comment:46>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list