Fix GUID generation

git-svn-id: http://svn.automattic.com/wordpress/trunk@1746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-10-05 07:36:50 +00:00
parent 1114fab5b6
commit 3be6575475
3 changed files with 7 additions and 7 deletions

View File

@ -6,7 +6,7 @@ $parent_file = 'edit.php';
require_once('admin-header.php');
if (empty($_GET['mode'])) $mode = 'view';
else $mode = $_GET['mode'];
else $mode = htmlspecialchars($_GET['mode']);
?>
<script type="text/javascript">
@ -106,7 +106,7 @@ if ('view' == $mode) {
</ol>
<form action="" method="get">
<p class="submit">
<input type="hidden" name="offset" value="<?php echo $_GET['offset']+ 1; ?>" />
<input type="hidden" name="offset" value="<?php echo $_GET['offset'] + 1; ?>" />
<input type="submit" name="submit" value="<?php _e('View Next 20 Comments &raquo;');?>" />
</p>
</form>

View File

@ -33,8 +33,8 @@ function upgrade_100() {
$wpdb->query("UPDATE $wpdb->options SET option_value = REPLACE(option_value, 'wp-links/links-images/', 'wp-images/links/')
WHERE option_name LIKE 'links_rating_image%'
AND option_value LIKE 'wp-links/links-images/%'");
WHERE option_name LIKE 'links_rating_image%'
AND option_value LIKE 'wp-links/links-images/%'");
$done_ids = $wpdb->get_results("SELECT DISTINCT post_id FROM $wpdb->post2cat");
if ($done_ids) :
@ -148,7 +148,7 @@ function upgrade_130() {
$post_title = addslashes(deslash($post->post_title));
$post_excerpt = addslashes(deslash($post->post_excerpt));
if ( empty($post->guid) )
$guid = get_option('home') . '/' . get_permalink();
$guid = get_permalink($post->ID);
else
$guid = $post->guid;
@ -194,7 +194,7 @@ function upgrade_130() {
// Update comments table to use comment_type
$wpdb->query("UPDATE $wpdb->comments SET comment_type='trackback', comment_content = REPLACE(comment_content, '<trackback />', '') WHERE comment_content LIKE '<trackback />%'");
$wpdb->query("UPDATE $wpdb->comments SET comment_type='trackback', comment_content = REPLACE(comment_content, '<pingback />', '') WHERE comment_content LIKE '<pingback />%'");
$wpdb->query("UPDATE $wpdb->comments SET comment_type='pingback', comment_content = REPLACE(comment_content, '<pingback />', '') WHERE comment_content LIKE '<pingback />%'");
}

View File

@ -300,7 +300,7 @@ function url_to_postid($url = '') {
function get_settings($setting) {
global $wpdb, $cache_settings, $cache_nonexistantoptions;
if ( strstr($_SERVER['REQUEST_URI'], 'wp-admin/install.php') || strstr($_SERVER['REQUEST_URI'], 'wp-admin/upgrade.php') )
if ( strstr($_SERVER['REQUEST_URI'], 'wp-admin/install.php') )
return false;
if ( empty($cache_settings) )