Make WordPress Core

Changeset 958


Ignore:
Timestamp:
03/04/2004 03:56:02 PM (21 years ago)
Author:
emc3
Message:

Fixed posting problems when 'advanced controls' is the default writing option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r956 r958  
    55$allowed_users = explode(" ", trim(get_settings('fileupload_allowedusers')));
    66
     7$post_ID = intval($postdata['ID']);
     8
    79$submitbutton_text = 'Save';
    8 $toprow_title = 'Editing Post #' . $postdata['ID'];
    9 $form_action = 'editpost';
    10 $form_extra = "' />\n<input type='hidden' name='post_ID' value='$post->ID";
     10$toprow_title = 'Editing Post #' . $post_ID;
     11if (0 == $post_ID) {
     12    $form_action = 'post';
     13} else {
     14    $form_action = 'editpost';
     15    $form_extra = "<input type='hidden' name='post_ID' value='$post_ID' />";
     16}
     17
    1118$colspan = 2;
    1219$form_pingback = '<input type="hidden" name="post_pingback" value="0" />';
     
    3441<form name="post" action="post.php" method="post" id="post">
    3542<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
    36 <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
     43<input type="hidden" name="action" value='<?php echo $form_action ?>' />
     44<?php echo $form_extra ?>
    3745
    3846<script type="text/javascript">
     
    154162}
    155163if ('edit' == $action) echo "
    156 <p><a href='post.php?action=delete&amp;post=$post->ID' onclick=\"return confirm('You are about to delete this post \'".addslashes($edited_post_title)."\'\\n  \'Cancel\' to stop, \'OK\' to delete.')\">Delete this post</a></p>";
     164<p><a href='post.php?action=delete&amp;post=$post_ID' onclick=\"return confirm('You are about to delete this post \'".addslashes($edited_post_title)."\'\\n  \'Cancel\' to stop, \'OK\' to delete.')\">Delete this post</a></p>";
    157165?>
    158166
Note: See TracChangeset for help on using the changeset viewer.