Opened 18 years ago
Closed 17 years ago
#3349 closed enhancement (fixed)
wp-config pickup consistency fixes
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.3 | Priority: | normal |
Severity: | normal | Version: | 2.1 |
Component: | Optimization | Keywords: | 2nd-opinion |
Focuses: | Cc: |
Description
What this patch does:
- calls WP's wp-config.php consistently throughout WP (before it was a mixture of ../'s and dirname(FILE)'s)
- lets anyone use a WordPress tree composed out of symlinks without issues (perfect for those who host hundreds of WPs in a single server for hundreds of customers, and who by any reasons won't use WP-MU)
These fixes work OK on my setup, and should work OK on others' setups. Just tested creating a new blog and it's all good.
Attachments (1)
Change History (16)
#2
@
18 years ago
- Keywords 2nd-opinion added
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
#3
@
18 years ago
Thanks, Mark. I did work on other plugins and submitted them to their respective authors. The last author I will contact is the wonderful FireStats plugin's, where my fixes initially didn't work because the "offending file" was already being included via a dirname(FILE), thus I had to use getcwd(). It worked with getcwd() though.
#4
@
18 years ago
+1 on consistency
-1 on ./ it is obtuse, leads me to do a double take to ensure it is not ../
#5
@
18 years ago
+-0 for consistency, the whole codebase is inconsistent, and I don't care any more.
-1 for anything that requires any plugin under any condition to have to use getcwd. Its not reliable.
#6
@
18 years ago
foolswisdom: I based the ./ on the fact that some WP files already used it. it seems to work fine, whereas under some (admittedly not common, but possible) conditions, the famed dirname(FILE) fails.
this patch does not introduce any usage of getcwd(). Only my FireStats patch (mailed to the author) did. As you say, getcwd() is not reliable, but it was the only way I could get FireStats to work, and the getcwd() mod went only into FireStats.
#7
@
18 years ago
The fact that we are breaking plugins like this one and maybe others that we don't know about is unacceptable. If getcwd is the only way something will work with this patch applied, thenI don't think it should be applied.
#8
@
18 years ago
I think the FireStats issue was a result of him using Symlinks... not this change. Obviously I don't want anything going in that breaks plugins on normal installs. But if this leaves normal installs alone but allows more creative setups, I don't mind it. RuddO, can you clear up the reason for having to use getcwd() ? Because of symlinks or this patch?
#9
@
18 years ago
Nothing to do with this particular issue, but the K2 Sidebar Modules broke for me as well, due to the fact that I symlinked the K2 theme directory from my blog to my Dad's blog and was wondering why the "K2 Sidebar Modules" option showed up on my blog, but not Dad's. A long time later, I realised it was because of the dreaded __FILE__
which resolved the symlinks and broke the path names.
At first glance, this looks fine.