]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/options-permalink.php
Wordpress 2.0.4
[autoinstalls/wordpress.git] / wp-admin / options-permalink.php
index ff65875b0df44e5d622c2aa56df845db51882a33..cf16d89b43f04476525178d7f04de459ef09607d 100644 (file)
@@ -57,7 +57,9 @@ include('admin-header.php');
 
 $home_path = get_home_path();
 
-if ( isset($_POST) ) {
+if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
+       check_admin_referer('update-permalink');
+
        if ( isset($_POST['permalink_structure']) ) {
                $permalink_structure = $_POST['permalink_structure'];
                if (! empty($permalink_structure) )
@@ -115,6 +117,7 @@ $structures = array(
        );
 ?>
 <form name="form" action="options-permalink.php" method="post"> 
+<?php wp_nonce_field('update-permalink') ?>
 <h3><?php _e('Common options:'); ?></h3>
 <p>
        <label>
@@ -163,6 +166,7 @@ checked="checked"
 <?php if ( $permalink_structure && !$usingpi && !$writable ) : ?>
   <p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Make_a_Directory_Writable">writable</a>, we could do this automatically, but it isn&#8217;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>
 <form action="options-permalink.php" method="post">
+<?php wp_nonce_field('update-permalink') ?>
    <p>
 <textarea rows="5" style="width: 98%;" name="rules"><?php echo $wp_rewrite->mod_rewrite_rules(); ?>
 </textarea>