[wp-cvs]
wordpress/wp-admin edit-page-form.php, 1.18, 1.19 post.php,
1.130, 1.131
Matthew Mullenweg
saxmatt at users.sourceforge.net
Mon Feb 14 09:46:11 GMT 2005
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23437/wp-admin
Modified Files:
edit-page-form.php post.php
Log Message:
Redirect to the right place - http://mosquito.wordpress.org/view.php?id=510
Index: edit-page-form.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/edit-page-form.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** edit-page-form.php 12 Feb 2005 09:25:54 -0000 1.18
--- edit-page-form.php 14 Feb 2005 09:46:08 -0000 1.19
***************
*** 10,13 ****
--- 10,20 ----
$form_extra = "<input type='hidden' name='post_ID' value='$post_ID' />";
}
+
+ $sendto = $_SERVER['HTTP_REFERER'];
+
+ if ( $sendto == get_permalink($post) )
+ $sendto = 'redo';
+ $sendto = wp_specialchars( $sendto );
+
?>
***************
*** 80,84 ****
<p class="submit">
<input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php $post_ID ? _e('Edit Page') :_e('Create New Page') ?> »" />
! <input name="referredby" type="hidden" id="referredby" value="<?php if (isset($_SERVER['HTTP_REFERER'])) echo wp_specialchars($_SERVER['HTTP_REFERER']); ?>" />
</p>
--- 87,91 ----
<p class="submit">
<input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php $post_ID ? _e('Edit Page') :_e('Create New Page') ?> »" />
! <input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" />
</p>
Index: post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/post.php,v
retrieving revision 1.130
retrieving revision 1.131
diff -C2 -d -r1.130 -r1.131
*** post.php 14 Feb 2005 04:51:14 -0000 1.130
--- post.php 14 Feb 2005 09:46:08 -0000 1.131
***************
*** 343,361 ****
}
! if ($_POST['save']) {
! $location = $_SERVER['HTTP_REFERER'];
! } elseif ($_POST['updatemeta']) {
! $location = $_SERVER['HTTP_REFERER'] . '&message=2#postcustom';
! } elseif ($_POST['deletemeta']) {
! $location = $_SERVER['HTTP_REFERER'] . '&message=3#postcustom';
! } elseif (isset($_POST['referredby']) && $_POST['referredby'] != $_SERVER['HTTP_REFERER']) {
! $location = $_POST['referredby'];
! } else {
! $location = 'post.php';
! }
! header ('Location: ' . $location); // Send user on their way while we keep working
!
! $now = current_time('mysql');
! $now_gmt = current_time('mysql', 1);
$result = $wpdb->query("
--- 343,348 ----
}
! $now = current_time('mysql');
! $now_gmt = current_time('mysql', 1);
$result = $wpdb->query("
***************
*** 379,382 ****
--- 366,384 ----
WHERE ID = $post_ID ");
+ if ($_POST['save']) {
+ $location = $_SERVER['HTTP_REFERER'];
+ } elseif ($_POST['updatemeta']) {
+ $location = $_SERVER['HTTP_REFERER'] . '&message=2#postcustom';
+ } elseif ($_POST['deletemeta']) {
+ $location = $_SERVER['HTTP_REFERER'] . '&message=3#postcustom';
+ } elseif (isset($_POST['referredby']) && $_POST['referredby'] != $_SERVER['HTTP_REFERER']) {
+ $location = $_POST['referredby'];
+ if ( $_POST['referredby'] == 'redo' )
+ $location = get_permalink( $post_ID );
+ } else {
+ $location = 'post.php';
+ }
+ header ('Location: ' . $location); // Send user on their way while we keep working
+
// Meta Stuff
if ($_POST['meta']) :
More information about the cvs
mailing list