Ticket #19268: htaccesscheck_extractmarkers.diff
| File htaccesscheck_extractmarkers.diff, 2.7 KB (added by ldebrouwer, 18 months ago) |
|---|
-
wp-admin/options-permalink.php
124 124 else 125 125 $usingpi = false; 126 126 127 if (isset($_POST['submit'])) : 128 $requpdate = true; 129 if ( ! $iis7_permalinks ) { 130 $content = extract_from_markers( $home_path . '.htaccess', 'WordPress' ); 131 foreach ( $content as $key => $value ) { 132 if ( empty( $value ) ) { 133 unset( $content[ $key ] ); 134 } 135 } 136 $new = explode( "\n", trim( $wp_rewrite->mod_rewrite_rules() ) ); 137 if ( $new === $content ) { 138 $requpdate = false; 139 } 140 } 141 endif; 142 127 143 $wp_rewrite->flush_rules(); 128 144 129 130 if (isset($_POST['submit'])) : ?> 145 if (isset($_POST['submit'])) : 146 if ( $requpdate ) { 147 ?> 131 148 <div id="message" class="updated"><p><?php 132 if ( ! is_multisite() ) { 133 if ( $iis7_permalinks ) { 134 if ( $permalink_structure && ! $usingpi && ! $writable ) 135 _e('You should update your web.config now'); 136 else if ( $permalink_structure && ! $usingpi && $writable ) 137 _e('Permalink structure updated. Remove write access on web.config file now!'); 138 else 139 _e('Permalink structure updated'); 149 if ( ! is_multisite() ) { 150 if ( $iis7_permalinks ) { 151 if ( $permalink_structure && ! $usingpi && ! $writable ) 152 _e('You should update your web.config now'); 153 else if ( $permalink_structure && ! $usingpi && $writable ) 154 _e('Permalink structure updated. Remove write access on web.config file now!'); 155 else 156 _e('Permalink structure updated'); 157 } else { 158 if ( $permalink_structure && ! $usingpi && ! $writable ) 159 _e('You should update your .htaccess now.'); 160 else 161 _e('Permalink structure updated.'); 162 } 140 163 } else { 141 if ( $permalink_structure && ! $usingpi && ! $writable ) 142 _e('You should update your .htaccess now.'); 143 else 144 _e('Permalink structure updated.'); 164 _e('Permalink structure updated.'); 145 165 } 146 } else {147 _e('Permalink structure updated.');148 }149 166 ?> 150 167 </p></div> 168 <?php } ?> 151 169 <?php endif; ?> 152 170 153 171 <div class="wrap"> … … 252 270 <?php endif; ?> 253 271 <?php endif; ?> 254 272 <?php else : 255 if ( $permalink_structure && ! $usingpi && ! $writable ) : ?>273 if ( $permalink_structure && ! $usingpi && ! $writable && $requpdate ) : ?> 256 274 <p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p> 257 275 <form action="options-permalink.php" method="post"> 258 276 <?php wp_nonce_field('update-permalink') ?>
