Fix static page editing.

git-svn-id: https://develop.svn.wordpress.org/trunk@1633 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2004-09-10 01:32:20 +00:00
parent 3c7fe8a8d0
commit 0a1aa31389
1 changed files with 12 additions and 4 deletions

View File

@ -1,8 +1,14 @@
<div class="wrap">
<?php
$form_action = 'post';
$form_extra = '';
if (0 == $post_ID) {
$form_action = 'post';
$form_extra = '';
} else {
$form_action = 'editpost';
$form_extra = "<input type='hidden' name='post_ID' value='$post_ID' />";
}
?>
<form name="post" action="post.php" method="post" id="post">
@ -13,7 +19,9 @@ if (isset($mode) && 'bookmarklet' == $mode) {
}
?>
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
<input type="hidden" name="action" value='<?php echo $form_action ?>' />
<?php echo $form_extra ?>
<input type="hidden" name="post_status" value="static" />
<script type="text/javascript">
<!--
@ -53,7 +61,7 @@ edCanvas = document.getElementById('content');
<p class="submit">
<input name="savepage" type="submit" id="savepage" tabindex="6" style="font-weight: bold;" value="<?php _e('Save') ?>" />
<input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo urlencode($_SERVER['HTTP_REFERER']); ?>" />
<input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo htmlspecialchars($_SERVER['HTTP_REFERER']); ?>" />
</p>
<?php do_action('edit_page_form', ''); ?>
</div>