Opened 13 years ago
Closed 11 years ago
#19268 closed defect (bug) (fixed)
Even if .htaccess isn't writable, WP shouldn't prompt if there are no changes.
Reported by: | markjaquith | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Permalinks | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
When you visit the permalinks settings screen, and .htaccess isn't writable, it prompts you to manually update. But it does that even if the current rules it is suggesting are already present. It should only prompt if the rules it is suggesting are different from what you have.
Attachments (5)
Change History (13)
#2
@
13 years ago
We could probably use extract_from_markers()
:
http://core.trac.wordpress.org/browser/tags/3.2.1/wp-admin/includes/misc.php#L21
#4
@
13 years ago
I also attached a version using extract_from_markers as Sergey suggested, however this requires exploding the newly generated rewrite rules which could be unfavorable.
#5
@
13 years ago
Another possibility, for the extract_from_markers version, could be to use array_filter to filter out the empty line that is in there by default, however that could lead to a possible false positive for one of the lines.
#6
@
11 years ago
- Component changed from General to Permalinks
- Milestone changed from Future Release to 3.9
Would be cool to clean this up and commit it.
#7
@
11 years ago
- Keywords commit added; reporter-feedback needs-testing removed
19628.3.diff should be good to go.
Something like I've attached above? I have no clue if it would work for IIS in the same way ( depends on the structure and content of the web.config file I guess ). And maybe it should be moved to a separate function in the wp_rewrite class, but I feel like that should be discussed first.