Some fixes.
git-svn-id: https://develop.svn.wordpress.org/trunk@1273 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
37fe28a6da
commit
31cf5b8871
@ -45,6 +45,7 @@ if (get_settings('use_trackback')) {
|
||||
}
|
||||
$saveasdraft = '<input name="save" type="submit" id="save" tabindex="6" value="' . __('Save and Continue Editing') . '" />';
|
||||
|
||||
if (empty($post_status)) $post_status = 'draft';
|
||||
|
||||
?>
|
||||
|
||||
|
@ -106,7 +106,7 @@ if (isset($_POST['submit'])) {
|
||||
<?php
|
||||
if ($permalink_structure) {
|
||||
?>
|
||||
<?php printf(__('<p>Using the permalink structure value you currently have, <code>%s</code>, these are the mod_rewrite rules you should have in your <code>.htaccess</code> file.</p>'), $permalink_structure) ?>
|
||||
<p><?php printf(__('Using the permalink structure value you currently have, <code>%s</code>, 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.'), $permalink_structure) ?></p>
|
||||
<?php
|
||||
$site_root = str_replace('http://', '', trim(get_settings('siteurl')));
|
||||
$site_root = preg_replace('|([^/]*)(.*)|i', '$2', $site_root);
|
||||
@ -119,13 +119,13 @@ if ('/' != substr($home_root, -1)) $home_root = $home_root . '/';
|
||||
?>
|
||||
<form action="">
|
||||
<p>
|
||||
<textarea rows="5" style="width: 100%;">RewriteEngine On
|
||||
<textarea rows="5" style="width: 98%;">RewriteEngine On
|
||||
RewriteBase <?php echo $home_root; ?>
|
||||
<?php
|
||||
$rewrite = rewrite_rules('', $permalink_structure);
|
||||
foreach ($rewrite as $match => $query) {
|
||||
if (strstr($query, 'index.php')) echo 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA]\n";
|
||||
echo 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA]\n";
|
||||
else echo 'RewriteRule ^' . $match . ' ' . $site_root . $query . " [QSA]\n";
|
||||
}
|
||||
?>
|
||||
</textarea>
|
||||
@ -139,9 +139,9 @@ foreach ($rewrite as $match => $query) {
|
||||
<p>
|
||||
<?php _e('You are not currently using customized permalinks. No special mod_rewrite rules are needed.') ?>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
echo "</div>\n";
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
require('./admin-footer.php');
|
||||
?>
|
@ -109,7 +109,8 @@ $nonbools = array('default_ping_status', 'default_comment_status');
|
||||
$message .= $dB_errors . '<br />' . $validation_message;
|
||||
}
|
||||
|
||||
if (strstr($_SERVER['HTTP_REFERER'], '?')) $goback = str_replace('&updated=true', '', $_SERVER['HTTP_REFERER']) . '&updated=true';
|
||||
$referred = str_replace(array('&updated=true', '?updated=true') , '', $_SERVER['HTTP_REFERER']);
|
||||
if (strstr($referred, '?')) $goback = $referred . '&updated=true';
|
||||
else $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true';
|
||||
header('Location: ' . $goback);
|
||||
break;
|
||||
|
@ -61,7 +61,7 @@ case 'post':
|
||||
}
|
||||
}
|
||||
$post_status = $_POST['post_status'];
|
||||
if (empty($post_status)) $post_status = get_settings('default_post_status');
|
||||
if (empty($post_status)) $post_status = 'draft';
|
||||
$comment_status = $_POST['comment_status'];
|
||||
if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
|
||||
$ping_status = $_POST['ping_status'];
|
||||
@ -133,7 +133,7 @@ case 'post':
|
||||
} else {
|
||||
$location = 'post.php';
|
||||
}
|
||||
if ('' != $_POST['advanced'])
|
||||
if ( '' != $_POST['advanced'] || isset($_POST['save']) )
|
||||
$location = "post.php?action=edit&post=$post_ID";
|
||||
|
||||
header("Location: $location"); // Send user on their way while we keep working
|
||||
@ -724,7 +724,7 @@ default:
|
||||
<?php
|
||||
}
|
||||
//set defaults
|
||||
$post_status = get_settings('default_post_status');
|
||||
$post_status = 'draft';
|
||||
$comment_status = get_settings('default_comment_status');
|
||||
$ping_status = get_settings('default_ping_status');
|
||||
$post_pingback = get_settings('default_pingback_flag');
|
||||
|
Loading…
Reference in New Issue
Block a user