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') . '" />';
|
$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
|
<?php
|
||||||
if ($permalink_structure) {
|
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
|
<?php
|
||||||
$site_root = str_replace('http://', '', trim(get_settings('siteurl')));
|
$site_root = str_replace('http://', '', trim(get_settings('siteurl')));
|
||||||
$site_root = preg_replace('|([^/]*)(.*)|i', '$2', $site_root);
|
$site_root = preg_replace('|([^/]*)(.*)|i', '$2', $site_root);
|
||||||
@ -119,13 +119,13 @@ if ('/' != substr($home_root, -1)) $home_root = $home_root . '/';
|
|||||||
?>
|
?>
|
||||||
<form action="">
|
<form action="">
|
||||||
<p>
|
<p>
|
||||||
<textarea rows="5" style="width: 100%;">RewriteEngine On
|
<textarea rows="5" style="width: 98%;">RewriteEngine On
|
||||||
RewriteBase <?php echo $home_root; ?>
|
RewriteBase <?php echo $home_root; ?>
|
||||||
<?php
|
<?php
|
||||||
$rewrite = rewrite_rules('', $permalink_structure);
|
$rewrite = rewrite_rules('', $permalink_structure);
|
||||||
foreach ($rewrite as $match => $query) {
|
foreach ($rewrite as $match => $query) {
|
||||||
if (strstr($query, 'index.php')) echo 'RewriteRule ^' . $match . ' ' . $home_root . $query . " [QSA]\n";
|
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>
|
</textarea>
|
||||||
@ -139,9 +139,9 @@ foreach ($rewrite as $match => $query) {
|
|||||||
<p>
|
<p>
|
||||||
<?php _e('You are not currently using customized permalinks. No special mod_rewrite rules are needed.') ?>
|
<?php _e('You are not currently using customized permalinks. No special mod_rewrite rules are needed.') ?>
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php } ?>
|
||||||
}
|
</div>
|
||||||
echo "</div>\n";
|
|
||||||
|
|
||||||
|
<?php
|
||||||
require('./admin-footer.php');
|
require('./admin-footer.php');
|
||||||
?>
|
?>
|
@ -109,7 +109,8 @@ $nonbools = array('default_ping_status', 'default_comment_status');
|
|||||||
$message .= $dB_errors . '<br />' . $validation_message;
|
$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';
|
else $goback = str_replace('?updated=true', '', $_SERVER['HTTP_REFERER']) . '?updated=true';
|
||||||
header('Location: ' . $goback);
|
header('Location: ' . $goback);
|
||||||
break;
|
break;
|
||||||
|
@ -61,7 +61,7 @@ case 'post':
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$post_status = $_POST['post_status'];
|
$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'];
|
$comment_status = $_POST['comment_status'];
|
||||||
if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
|
if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
|
||||||
$ping_status = $_POST['ping_status'];
|
$ping_status = $_POST['ping_status'];
|
||||||
@ -133,7 +133,7 @@ case 'post':
|
|||||||
} else {
|
} else {
|
||||||
$location = 'post.php';
|
$location = 'post.php';
|
||||||
}
|
}
|
||||||
if ('' != $_POST['advanced'])
|
if ( '' != $_POST['advanced'] || isset($_POST['save']) )
|
||||||
$location = "post.php?action=edit&post=$post_ID";
|
$location = "post.php?action=edit&post=$post_ID";
|
||||||
|
|
||||||
header("Location: $location"); // Send user on their way while we keep working
|
header("Location: $location"); // Send user on their way while we keep working
|
||||||
@ -724,7 +724,7 @@ default:
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
//set defaults
|
//set defaults
|
||||||
$post_status = get_settings('default_post_status');
|
$post_status = 'draft';
|
||||||
$comment_status = get_settings('default_comment_status');
|
$comment_status = get_settings('default_comment_status');
|
||||||
$ping_status = get_settings('default_ping_status');
|
$ping_status = get_settings('default_ping_status');
|
||||||
$post_pingback = get_settings('default_pingback_flag');
|
$post_pingback = get_settings('default_pingback_flag');
|
||||||
|
Loading…
Reference in New Issue
Block a user