[wp-trac] Re: [WordPress Trac] #5090: maybe_create_table call to config.php issue

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 2 19:40:21 GMT 2008


#5090: maybe_create_table call to config.php issue
----------------------------+-----------------------------------------------
 Reporter:  mattyrob        |        Owner:  ryan  
     Type:  defect          |       Status:  closed
 Priority:  high            |    Milestone:  2.3.3 
Component:  Administration  |      Version:  2.3   
 Severity:  normal          |   Resolution:  fixed 
 Keywords:  has-patch       |  
----------------------------+-----------------------------------------------
Comment (by darkdragon):

 I would refer to the discussion on wp-hackers on why dirname(dirname(...))
 is pointless when {{{dirname(__FILE__).'/../wp-config.php');}}} could be
 used instead. I think there is less confusion, since in my experience it
 takes me a while reading dirname(dirname()) that it means get the base
 folder of this file and then get the directory above this one.

 By using the second method, if someone knows what dirname(__FILE__) means,
 then they can realize what '../' does. The only problem with the second
 method is that you absolutely must have the '/' before the '../', which
 you need anyway. It also gets pretty optimization nightmare, because
 coders might look at that and decide to use it everywhere not realizing
 that each dirname() call causes additional overhead. However, how many
 actually look in wp-blog-header.php I don't know.

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


More information about the wp-trac mailing list