[wp-trac] [WordPress Trac] #3068: Normalize working directory for plug-ins

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 24 22:11:55 GMT 2006


#3068: Normalize working directory for plug-ins
-------------------------+--------------------------------------------------
 Reporter:  shadytrees   |       Owner:  anonymous
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:           
Component:  General      |     Version:           
 Severity:  minor        |    Keywords:           
-------------------------+--------------------------------------------------
 For plug-ins, the working directory can vary for similar actions.
 `comment_post` can have a cwd of ''/'' (when a guest posts a comment to a
 post) while `delete_comment` can have a cwd of ''/wp-admin'' (when an
 administrator deletes a comment).

 I ran into this when trying to figure out why a file to which I was
 (over)writing from a plug-in wasn't changing for all hooks. It
 (embarrassingly) took me a while to realize the file was in two different
 locations, ''/'' and ''/wp-admin'', depending on the hook.

 Could Wordpress normalize the cwd to ''/'' or something similar for plug-
 ins? For example, change the working directory to ''/'' before firing
 plug-in hooks.

 Sorry if duplicate; my Trac search-fu isn't up to snuff.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3068>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list