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

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 10 22:18:20 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:  blocker                 |   Resolution:       
 Keywords:  installer theme plugin  |  
Comment (by DD32):

 >  can confirm that all my plugins were deleted, including custom ones. :(
 Was that before or after the last commit?

 I ran a file-recovery software over my local computer when i managed to
 delete all the plugins.. there was a reason i stressed backups on the
 testers list..

 >This last diff is an improvement, but it's not foolproof.


 > I tested it with a plugin that was a single file in the plugins folder.
 But the update was multiple files in a subfolder.

 Thats *VERY* common, infact, thats how all plugins coming from
 wordpress.org will be installed, into a subfolder, even if theres only one
 file in it.

 Actually, Now its morning, Something has poped out at me, and i'm
 wondering why its not being used instead..
 $plugin_file = akismet/akismet.php || hello.php
 if( strpos($plugin_file, '/') > 0 )
 or even:
 if( empty(trim(dirname($plugin_file), '/')) )

 I think there may've been a reason why this wouldnt work, But i honestly
 cant see one?

 Its much more reliable than checking to see if the working directory is
 not the plugins folder, And with the adition of the error if the WP base
 is not found, it should never come accross the wrong folder..

 While i'm at it, Should WP be running a hook for plugins to link, so they
 can tell if their plugin has been upgraded? What about running
 Deactivation, followed by Re-activation? (Exept.. i guess unless it did a
 redirect, or a iframe, it'd still be running the old plugin at that point)

 > shouldn't we be using type="password" in the FTP login screen.
 Probably, With autocomplete="off", it'll invalidate the html i think, but
 better to block IE from saving it.

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

More information about the wp-trac mailing list