From 022dfbbbe3215917d84708eb09acca93b21ae9e0 Mon Sep 17 00:00:00 2001
From: "Edward Z. Yang" $welcome " . __('Please note that this importer does not work with Blogger (using your Google account).') . " '.sprintf('%s in progress, please wait...', $blog_opt)." '.sprintf(__('%s in progress, please wait...'), $blog_opt)." $blog_opt Please tell the devs. '.__('Please tell the devs.').' '.__('Steps may take a few minutes depending on the size of your database. Please be patient.').' '.__('Howdy! This importer allows you to extract posts from a Dotclear database into your blog. Mileage may vary.').' '.__('Your Dotclear Configuration settings are as follows:').' '.__('Howdy! This importer allows you to extract posts from a DotClear database into your blog. Mileage may vary.').' '.__('Your DotClear Configuration settings are as follows:').' '.__('Importing Categories...').' '.sprintf(__('Done! %1$s categories imported.'), $count).' '.sprintf(__('Done! %1$s users imported.'), $count).' '.sprintf(__('Done! %1$s posts imported.'), $count).' '.sprintf(__('Done! %1$s comments imported.'), $count).' '.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from Dotclear, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').' '.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from DotClear, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').' '.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password. Forget it. You didn\'t have that login in Dotclear, why should you have it here? Instead we have taken care to import all of your users into our system. Unfortunately there is one downside. Because both WordPress and Dotclear uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users. Every user has the same username, but their passwords are reset to password123. So Login and change it.'), '/wp-login.php').' '.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password. Forget it. You didn\'t have that login in DotClear, why should you have it here? Instead we have taken care to import all of your users into our system. Unfortunately there is one downside. Because both WordPress and DotClear uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users. Every user has the same username, but their passwords are reset to password123. So Login and change it.'), '/wp-login.php').' '.__('Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').' '.__('Also, since you\'re coming from Dotclear, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress. Trust me... You\'ll want it.').' '.__('Also, since you\'re coming from DotClear, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress. Trust me... You\'ll want it.').' '.__('Finally, there are numerous WordPress resources around the internet. Some of them are:').' '.sprintf(__('That\'s it! What are you waiting for? Go login!'), '/wp-login.php').' '.sprintf(__('That\'s it! What are you waiting for? Go login!'), '../wp-login.php').' System Recommendations
diff --git a/wp-admin/admin-db.php b/wp-admin/admin-db.php
index d81b6b84..d909ee67 100644
--- a/wp-admin/admin-db.php
+++ b/wp-admin/admin-db.php
@@ -34,7 +34,7 @@ function get_editable_authors( $user_id ) {
return false;
} else {
$editable = join(',', $editable);
- $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable)" );
+ $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" );
}
return apply_filters('get_editable_authors', $authors);
@@ -110,7 +110,7 @@ function wp_insert_category($catarr) {
if (!$update) {
$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$category_parent')");
- $cat_ID = $wpdb->insert_id;
+ $cat_ID = (int) $wpdb->insert_id;
} else {
$wpdb->query ("UPDATE $wpdb->categories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = '$category_parent' WHERE cat_ID = '$cat_ID'");
}
@@ -207,7 +207,7 @@ function category_exists($cat_name) {
if (!$category_nicename = sanitize_title($cat_name))
return 0;
- return $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'");
+ return (int) $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'");
}
function wp_delete_user($id, $reassign = 'novalue') {
@@ -266,23 +266,57 @@ function wp_insert_link($linkdata) {
extract($linkdata);
$update = false;
+
if ( !empty($link_id) )
$update = true;
+ $link_id = (int) $link_id;
+
+ if( trim( $link_name ) == '' )
+ return 0;
+ $link_name = apply_filters('pre_link_name', $link_name);
+
+ if( trim( $link_url ) == '' )
+ return 0;
+ $link_url = apply_filters('pre_link_url', $link_url);
+
if ( empty($link_rating) )
$link_rating = 0;
+ else
+ $link_rating = (int) $link_rating;
+
+ if ( empty($link_image) )
+ $link_image = '';
+ $link_image = apply_filters('pre_link_image', $link_image);
if ( empty($link_target) )
$link_target = '';
+ $link_target = apply_filters('pre_link_target', $link_target);
if ( empty($link_visible) )
$link_visible = 'Y';
-
+ $link_visibile = preg_replace('/[^YNyn]/', '', $link_visible);
+
if ( empty($link_owner) )
$link_owner = $current_user->id;
+ else
+ $link_owner = (int) $link_owner;
if ( empty($link_notes) )
$link_notes = '';
+ $link_notes = apply_filters('pre_link_notes', $link_notes);
+
+ if ( empty($link_description) )
+ $link_description = '';
+ $link_description = apply_filters('pre_link_description', $link_description);
+
+ if ( empty($link_rss) )
+ $link_rss = '';
+ $link_rss = apply_filters('pre_link_rss', $link_rss);
+
+ if ( empty($link_rel) )
+ $link_rel = '';
+ $link_rel = apply_filters('pre_link_rel', $link_rel);
if ( $update ) {
$wpdb->query("UPDATE $wpdb->links SET link_url='$link_url',
@@ -294,7 +328,7 @@ function wp_insert_link($linkdata) {
WHERE link_id='$link_id'");
} else {
$wpdb->query("INSERT INTO $wpdb->links (link_url, link_name, link_image, link_target, link_category, link_description, link_visible, link_owner, link_rating, link_rel, link_notes, link_rss) VALUES('$link_url','$link_name', '$link_image', '$link_target', '$link_category', '$link_description', '$link_visible', '$link_owner', '$link_rating', '$link_rel', '$link_notes', '$link_rss')");
- $link_id = $wpdb->insert_id;
+ $link_id = (int) $wpdb->insert_id;
}
if ( $update )
diff --git a/wp-admin/admin-footer.php b/wp-admin/admin-footer.php
index e660be28..88e69ae4 100644
--- a/wp-admin/admin-footer.php
+++ b/wp-admin/admin-footer.php
@@ -2,7 +2,7 @@
diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php
index 6b9be754..641ed1e2 100644
--- a/wp-admin/admin-functions.php
+++ b/wp-admin/admin-functions.php
@@ -265,6 +265,8 @@ function get_post_to_edit($id) {
$post->post_title = format_to_edit($post->post_title);
$post->post_title = apply_filters('title_edit_pre', $post->post_title);
+ $post->post_password = format_to_edit($post->post_password);
+
if ($post->post_status == 'static')
$post->page_template = get_post_meta($id, '_wp_page_template', true);
@@ -287,7 +289,7 @@ function get_default_post_to_edit() {
else if ( !empty($post_title) ) {
$text = wp_specialchars(stripslashes(urldecode($_REQUEST['text'])));
$text = funky_javascript_fix($text);
- $popupurl = wp_specialchars($_REQUEST['popupurl']);
+ $popupurl = clean_url(stripslashes($_REQUEST['popupurl']));
$post_content = ''.$post_title.''."\n$text";
}
@@ -317,11 +319,15 @@ function get_comment_to_edit($id) {
$comment = get_comment($id);
- $comment->comment_content = format_to_edit($comment->comment_content, $richedit);
+ $comment->comment_ID = (int) $comment->comment_ID;
+ $comment->comment_post_ID = (int) $comment->comment_post_ID;
+
+ $comment->comment_content = format_to_edit($comment->comment_content);
$comment->comment_content = apply_filters('comment_edit_pre', $comment->comment_content);
$comment->comment_author = format_to_edit($comment->comment_author);
$comment->comment_author_email = format_to_edit($comment->comment_author_email);
+ $comment->comment_author_url = clean_url($comment->comment_author_url);
$comment->comment_author_url = format_to_edit($comment->comment_author_url);
return $comment;
@@ -333,6 +339,23 @@ function get_category_to_edit($id) {
return $category;
}
+function get_user_to_edit($user_id) {
+ $user = new WP_User($user_id);
+ $user->user_login = attribute_escape($user->user_login);
+ $user->user_email = attribute_escape($user->user_email);
+ $user->user_url = clean_url($user->user_url);
+ $user->first_name = attribute_escape($user->first_name);
+ $user->last_name = attribute_escape($user->last_name);
+ $user->display_name = attribute_escape($user->display_name);
+ $user->nickname = attribute_escape($user->nickname);
+ $user->aim = attribute_escape($user->aim);
+ $user->yim = attribute_escape($user->yim);
+ $user->jabber = attribute_escape($user->jabber);
+ $user->description = wp_specialchars($user->description);
+
+ return $user;
+}
+
// Creates a new user from the "Users" form using $_POST information.
function add_user() {
@@ -344,7 +367,7 @@ function edit_user($user_id = 0) {
if ($user_id != 0) {
$update = true;
- $user->ID = $user_id;
+ $user->ID = (int) $user_id;
$userdata = get_userdata($user_id);
$user->user_login = $wpdb->escape($userdata->user_login);
} else {
@@ -369,7 +392,7 @@ function edit_user($user_id = 0) {
if (isset ($_POST['email']))
$user->user_email = wp_specialchars(trim($_POST['email']));
if (isset ($_POST['url'])) {
- $user->user_url = wp_specialchars(trim($_POST['url']));
+ $user->user_url = clean_url(trim($_POST['url']));
$user->user_url = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url;
}
if (isset ($_POST['first_name']))
@@ -381,7 +404,7 @@ function edit_user($user_id = 0) {
if (isset ($_POST['display_name']))
$user->display_name = wp_specialchars(trim($_POST['display_name']));
if (isset ($_POST['description']))
- $user->description = wp_specialchars(trim($_POST['description']));
+ $user->description = trim($_POST['description']);
if (isset ($_POST['jabber']))
$user->jabber = wp_specialchars(trim($_POST['jabber']));
if (isset ($_POST['aim']))
@@ -447,24 +470,27 @@ function edit_user($user_id = 0) {
function get_link_to_edit($link_id) {
$link = get_link($link_id);
-
- $link->link_url = wp_specialchars($link->link_url, 1);
- $link->link_name = wp_specialchars($link->link_name, 1);
- $link->link_description = wp_specialchars($link->link_description);
- $link->link_notes = wp_specialchars($link->link_notes);
- $link->link_rss = wp_specialchars($link->link_rss);
-
+
+ $link->link_url = clean_url($link->link_url);
+ $link->link_name = attribute_escape($link->link_name);
+ $link->link_image = attribute_escape($link->link_image);
+ $link->link_description = attribute_escape($link->link_description);
+ $link->link_rss = clean_url($link->link_rss);
+ $link->link_rel = attribute_escape($link->link_rel);
+ $link->link_notes = wp_specialchars($link->link_notes);
+ $link->post_category = $link->link_category;
+
return $link;
}
function get_default_link_to_edit() {
if ( isset($_GET['linkurl']) )
- $link->link_url = wp_specialchars($_GET['linkurl'], 1);
+ $link->link_url = clean_url($_GET['linkurl']);
else
$link->link_url = '';
if ( isset($_GET['name']) )
- $link->link_name = wp_specialchars($_GET['name'], 1);
+ $link->link_name = attribute_escape($_GET['name']);
else
$link->link_name = '';
@@ -480,10 +506,10 @@ function edit_link($link_id = '') {
die(__("Cheatin' uh ?"));
$_POST['link_url'] = wp_specialchars($_POST['link_url']);
- $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url'];
+ $_POST['link_url'] = clean_url($_POST['link_url']);
$_POST['link_name'] = wp_specialchars($_POST['link_name']);
$_POST['link_image'] = wp_specialchars($_POST['link_image']);
- $_POST['link_rss'] = wp_specialchars($_POST['link_rss']);
+ $_POST['link_rss'] = clean_url($_POST['link_rss']);
$auto_toggle = get_autotoggle($_POST['link_category']);
// if we are in an auto toggle category and this one is visible then we
@@ -826,12 +852,27 @@ function list_meta($meta) {
$style = '';
if ('_' == $entry['meta_key'] { 0 })
$style .= ' hidden';
+
+ if ( is_serialized($entry['meta_value']) ) {
+ if ( is_serialized_string($entry['meta_value']) ) {
+ // this is a serialized string, so we should display it
+ $entry['meta_value'] = maybe_unserialize($entry['meta_value']);
+ } else {
+ // this is a serialized array/object so we should NOT display it
+ --$count;
+ continue;
+ }
+ }
+
+ $entry['meta_key'] = attribute_escape( $entry['meta_key']);
+ $entry['meta_value'] = attribute_escape( $entry['meta_value']);
+ $entry['meta_id'] = (int) $entry['meta_id'];
echo "
";
}
@@ -876,6 +917,7 @@ function meta_form() {
$key";
}
?>
@@ -894,10 +936,14 @@ function meta_form() {
function add_meta($post_ID) {
global $wpdb;
+ $post_ID = (int) $post_ID;
+
+ $protected = array( '_wp_attached_file', '_wp_attachment_metadata', '_wp_old_slug', '_wp_page_template' );
$metakeyselect = $wpdb->escape(stripslashes(trim($_POST['metakeyselect'])));
$metakeyinput = $wpdb->escape(stripslashes(trim($_POST['metakeyinput'])));
- $metavalue = $wpdb->escape(stripslashes(trim($_POST['metavalue'])));
+ $metavalue = maybe_serialize(stripslashes((trim($_POST['metavalue']))));
+ $metavalue = $wpdb->escape($metavalue);
if ( ('0' === $metavalue || !empty ($metavalue)) && ((('#NONE#' != $metakeyselect) && !empty ($metakeyselect)) || !empty ($metakeyinput)) ) {
// We have a key/value pair. If both the select and the
@@ -909,6 +955,9 @@ function add_meta($post_ID) {
if ($metakeyinput)
$metakey = $metakeyinput; // default
+ if ( in_array($metakey, $protected) )
+ return false;
+
$result = $wpdb->query("
INSERT INTO $wpdb->postmeta
(post_id,meta_key,meta_value)
@@ -919,6 +968,7 @@ function add_meta($post_ID) {
function delete_meta($mid) {
global $wpdb;
+ $mid = (int) $mid;
$result = $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_id = '$mid'");
}
@@ -926,6 +976,14 @@ function delete_meta($mid) {
function update_meta($mid, $mkey, $mvalue) {
global $wpdb;
+ $protected = array( '_wp_attached_file', '_wp_attachment_metadata', '_wp_old_slug', '_wp_page_template' );
+
+ if ( in_array($mkey, $protected) )
+ return false;
+
+ $mvalue = maybe_serialize(stripslashes($mvalue));
+ $mvalue = $wpdb->escape($mvalue);
+ $mid = (int) $mid;
return $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '$mkey', meta_value = '$mvalue' WHERE meta_id = '$mid'");
}
@@ -1081,15 +1139,13 @@ function save_mod_rewrite_rules() {
}
function the_quicktags() {
- // Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP
- if (!strstr($_SERVER['HTTP_USER_AGENT'], 'Safari'))
echo '
';
- else echo '
+ echo '
-
+
diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php
index 9dc89d78..e108407d 100644
--- a/wp-admin/edit-pages.php
+++ b/wp-admin/edit-pages.php
@@ -13,7 +13,7 @@ require_once('admin-header.php');
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index eb67c80a..df86317e 100644
--- a/wp-admin/edit.php
+++ b/wp-admin/edit.php
@@ -79,7 +79,7 @@ if ( is_month() ) {
diff --git a/wp-admin/import/blogger.php b/wp-admin/import/blogger.php
index d35f8421..0772eb1d 100644
--- a/wp-admin/import/blogger.php
+++ b/wp-admin/import/blogger.php
@@ -7,14 +7,15 @@ class Blogger_Import {
// Shows the welcome screen and the magic iframe.
function greet() {
- $title = __('Import Blogger');
- $welcome = __('Howdy! This importer allows you to import posts and comments from your Blogger account into your WordPress blog.');
+ $title = __('Import Old Blogger');
+ $welcome = __('Howdy! This importer allows you to import posts and comments from your Old Blogger account into your WordPress blog.');
$noiframes = __('This feature requires iframe support.');
$warning = __('This will delete everything saved by the Blogger importer except your posts and comments. Are you sure you want to do this?');
$reset = __('Reset this importer');
$incompat = __('Your web server is not properly configured to use this importer. Please enable the CURL extension for PHP and then reload this page.');
echo "
-
+
-
+ $title
');
}
-
- // Try logging in. If we get an array of cookies back, we at least connected.
+
+ // Try logging in. If we get an array of cookies back, we at least connected.
$this->import['cookies'] = $this->login_blogger($_POST['user'], $_POST['pass']);
if ( !is_array( $this->import['cookies'] ) ) {
$this->login_form(__('Login failed. Please enter your credentials again.'));
}
-
+
// Save the password so we can log the browser in when it's time to publish.
$this->import['pass'] = $_POST['pass'];
$this->import['user'] = $_POST['user'];
@@ -341,7 +342,7 @@ class Blogger_Import {
$form = " ";
- $output.= '
','
','
','
','
','
'), "\n", $post_content); // the XHTML touch... ;)
-
+
$post_title = addslashes($post_title);
-
+
$post_status = 'publish';
-
+
if ( $ID = post_exists($post_title, '', $post_date) ) {
$post_array[$i]['ID'] = $ID;
$skippedpostcount++;
@@ -509,7 +510,7 @@ class Blogger_Import {
}
}
$status = sprintf(__('%s post(s) parsed, %s skipped...'), $postcount, $skippedpostcount).' '.
- sprintf(__('%s comment(s) parsed, %s skipped...'), $commentcoun, $skippedcommentcount).' '.
+ sprintf(__('%s comment(s) parsed, %s skipped...'), $commentcount, $skippedcommentcount).' '.
' '.__('Done').'';
$import = $this->import;
$import['blogs'][$_GET['blog']]['archives']["$url"] = $status;
@@ -546,7 +547,7 @@ class Blogger_Import {
$response = $this->get_blogger("http://www.blogger.com/blog-publishing.g?blogID={$_GET['blog']}&publishMode={$optary['backup']['publishMode']}", $headers);
sleep(2);
if ( $response['code'] >= 400 )
- die('Error restoring publishMode.
'.__('Error restoring publishMode').'
'.__('Import Dotclear').'
';
+ echo ''.__('Import DotClear').'
';
echo ''.__('Users').'
';
- echo ''.__('Preserving Authors').'
';
echo ''.__('Textile').'
';
- echo ''.__('WordPress Resources').'
';
echo '';
echo '
';
- echo '';
- printf('
';
+ echo '';
+ printf('
';
}
-
- function dispatch()
+
+ function dispatch()
{
if (empty ($_GET['step']))
@@ -657,51 +670,53 @@ class Dotclear_Import {
else
$step = (int) $_GET['step'];
$this->header();
-
- if ( $step > 0 )
+
+ if ( $step > 0 )
{
+ check_admin_referer('import-dotclear');
+
if($_POST['dbuser'])
{
if(get_option('dcuser'))
- delete_option('dcuser');
- add_option('dcuser',$_POST['dbuser']);
+ delete_option('dcuser');
+ add_option('dcuser', sanitize_user($_POST['dbuser'], true));
}
if($_POST['dbpass'])
{
if(get_option('dcpass'))
- delete_option('dcpass');
- add_option('dcpass',$_POST['dbpass']);
+ delete_option('dcpass');
+ add_option('dcpass', sanitize_user($_POST['dbpass'], true));
}
-
+
if($_POST['dbname'])
{
if(get_option('dcname'))
- delete_option('dcname');
- add_option('dcname',$_POST['dbname']);
+ delete_option('dcname');
+ add_option('dcname', sanitize_user($_POST['dbname'], true));
}
if($_POST['dbhost'])
{
if(get_option('dchost'))
delete_option('dchost');
- add_option('dchost',$_POST['dbhost']);
+ add_option('dchost', sanitize_user($_POST['dbhost'], true));
}
if($_POST['dccharset'])
{
if(get_option('dccharset'))
delete_option('dccharset');
- add_option('dccharset',$_POST['dccharset']);
- }
+ add_option('dccharset', sanitize_user($_POST['dccharset'], true));
+ }
if($_POST['dbprefix'])
{
- if(get_option('tpre'))
- delete_option('tpre');
- add_option('tpre',$_POST['dbprefix']);
- }
+ if(get_option('dcdbprefix'))
+ delete_option('dcdbprefix');
+ add_option('dcdbprefix', sanitize_user($_POST['dbprefix'], true));
+ }
}
- switch ($step)
+ switch ($step)
{
default:
case 0 :
@@ -726,16 +741,16 @@ class Dotclear_Import {
$this->cleanup_dcimport();
break;
}
-
+
$this->footer();
}
- function Dotclear_Import()
+ function Dotclear_Import()
{
- // Nothing.
+ // Nothing.
}
}
$dc_import = new Dotclear_Import();
-register_importer('dotclear', 'Dotclear', __('Import posts from a Dotclear Blog'), array ($dc_import, 'dispatch'));
+register_importer('dotclear', __('DotClear'), __('Import categories, users, posts, comments, and links from a DotClear blog'), array ($dc_import, 'dispatch'));
?>
diff --git a/wp-admin/import/greymatter.php b/wp-admin/import/greymatter.php
index e69de29b..4305cd18 100644
--- a/wp-admin/import/greymatter.php
+++ b/wp-admin/import/greymatter.php
@@ -0,0 +1,317 @@
+';
+ echo ' ', __('DotClear Database User:'));
+ printf(' ', __('DotClear Database Password:'));
+ printf(' ', __('DotClear Database Name:'));
+ printf(' ', __('DotClear Database Host:'));
+ printf(' ', __('DotClear Table prefix:'));
+ printf(' ', __('Originating character set:'));
+ echo ''.__('Import GreyMatter').'
';
+ }
+
+ function footer() {
+ echo '
+
+
+
+
+
+
+
+
+
 
+footer(); + } + + + + function gm2autobr($string) { // transforms GM's |*| into b2's+ +footer(); + } + + function dispatch() { + if (empty ($_GET['step'])) + $step = 0; + else + $step = (int) $_GET['step']; + + switch ($step) { + case 0 : + $this->greet(); + break; + case 1: + check_admin_referer('import-greymatter'); + $this->import(); + break; + } + } + + function GM_Import() { + // Nothing. + } +} + +$gm_import = new GM_Import(); + +register_importer('greymatter', __('GreyMatter'), __('Import users, posts, and comments from a Greymatter blog'), array ($gm_import, 'dispatch')); +?> diff --git a/wp-admin/import/livejournal.php b/wp-admin/import/livejournal.php index e8c48c4a..3c9cdab7 100644 --- a/wp-admin/import/livejournal.php +++ b/wp-admin/import/livejournal.php @@ -80,7 +80,7 @@ class LJ_Import { $comments = $comments[1]; if ( $comments ) { - $comment_post_ID = $post_id; + $comment_post_ID = (int) $post_id; $num_comments = 0; foreach ($comments as $comment) { preg_match('|
'.__('Howdy! This importer allows you to extract posts from any Textpattern 4.0.2+ into your blog. This has not been tested on previous versions of Textpattern. Mileage may vary.').'
'; + + function greet() { + echo ''.__('Howdy! This imports categories, users, posts, comments, and links from any Textpattern 4.0.2+ into this blog.').'
'; + echo ''.__('This has not been tested on previous versions of Textpattern. Mileage may vary.').'
'; echo ''.__('Your Textpattern Configuration settings are as follows:').'
'; echo ''; + echo ''.__('Importing Categories...').'
'.sprintf(__('Done! %1$s categories imported.'), $count).'
'.sprintf(__('Done! %1$s users imported.'), $count).'
'.sprintf(__('Done! %1$s posts imported.'), $count).'
'.sprintf(__('Done! %1$s comments imported.'), $count).'
'.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from Textpattern, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').'
'; @@ -555,29 +563,29 @@ class Textpattern_Import { echo ''.__('Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'
'; echo ''.__('Also, since you\'re coming from Textpattern, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress. Trust me... You\'ll want it.').'
'; + echo ''.__('Also, since you\'re coming from Textpattern, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing Textile for WordPress. Trust me... You\'ll want it.').'
'; echo ''.__('Finally, there are numerous WordPress resources around the internet. Some of them are:').'
'; echo ''.sprintf(__('That\'s it! What are you waiting for? Go login!'), '/wp-login.php').'
'; } - + function db_form() { - echo '- | + | |||
---|---|---|---|---|
@@ -309,7 +309,7 @@ $results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle, show_images . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, " . " text_after_all, list_limit FROM $wpdb->linkcategories ORDER BY cat_id"); $i = 1; -foreach ($results as $row) { +foreach ( (array) $results as $row) { if ($row->list_limit == -1) { $row->list_limit = __('none'); } @@ -356,8 +356,14 @@ foreach ($results as $row) { | text_after_all)?> | list_limit ?> | - | cat_id?>&action=Delete", 'delete-link-category_' . $row->cat_id) ?>" onclick="return deleteSomething( 'link category', cat_id . ", '" . sprintf(__("You are about to delete the "%s" link category.\\n"Cancel" to stop, "OK" to delete."), js_escape($row->cat_name)); ?>' );" class="delete"> | -+ cat_id ) { + _e('Default'); + } else { ?> + cat_id?>&action=Delete", 'delete-link-category_' . $row->cat_id) ?>" onclick="return deleteSomething( 'link category', cat_id . ", '" . sprintf(__("You are about to delete the "%s" link category.\\n"Cancel" to stop, "OK" to delete."), js_escape($row->cat_name)); ?>' );" class="delete"> + + | + -
- | Documentation on date formatting. Save option to update sample output.') ?> | +Documentation on date formatting. Click "Update options" to update sample output.') ?> | |
---|---|---|---|
diff --git a/wp-admin/options-misc.php b/wp-admin/options-misc.php index b4ff4efb..2b6e33a5 100644 --- a/wp-admin/options-misc.php +++ b/wp-admin/options-misc.php @@ -17,7 +17,7 @@ include('admin-header.php'); |
: | -+ |
wp-content/uploads'); ?> |
diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php
index cf16d89b..68c44aaa 100644
--- a/wp-admin/options-permalink.php
+++ b/wp-admin/options-permalink.php
@@ -148,7 +148,7 @@ checked="checked"
---|