[wp-trac] [WordPress Trac] #20589: domain_exists should add trailing slash to path

WordPress Trac noreply at wordpress.org
Sat Jan 11 07:09:53 UTC 2014


#20589: domain_exists should add trailing slash to path
----------------------------------------+------------------
 Reporter:  ejdanderson                 |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  3.9
Component:  Multisite                   |     Version:  3.0
 Severity:  minor                       |  Resolution:
 Keywords:  has-patch needs-unit-tests  |
----------------------------------------+------------------
Changes (by jeremyfelt):

 * keywords:  has-patch => has-patch needs-unit-tests
 * milestone:  Awaiting Review => 3.9


Comment:

 In both places that `insert_blog()` is used in core, `domain_exists()` is
 used immediately before. If we continue to enforce `/` on sites as they
 are inserted, we should use the same checks in both functions.

 [attachment:20589.diff] is a refresh of the original patch that applies to
 trunk. Unit tests would need to be refreshed as we don't expect a trailing
 slash at this point.

 Another answer may be to deprecate `domain_exists()` in favor of something
 more comprehensive. `site_id` is currently checked along with `domain` and
 `path` on every request. Using this with another `site_id` would not
 identify possible conflicts across multiple networks. This may be a bigger
 workflow to figure out in another ticket.

 Moving to 3.9 for discussion. This could likely apply to an overall
 domain/path strategy as well.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/20589#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list