Commit cc0e492
committed
Smarter frontControllerDirectory method
The previous method simply returned `web` if there was a file named `craft` in the $sitePath (which means we’re running Craft 3).
The problem is that many sites, especially upgraded ones, will be serving out of `public`. This is also in line with the default Forge/ServerPilot default dirs.
So we test to see if either `/web` or `/public` exist, and return them if so. Otherwise default to the current method.
Signed-off-by: Andrew Welch <[email protected]>1 parent e5f9914 commit cc0e492
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| |||
0 commit comments