diff --git a/wp-admin/import/blogger.php b/wp-admin/import/blogger.php index c200fba114..0495a7ade3 100644 --- a/wp-admin/import/blogger.php +++ b/wp-admin/import/blogger.php @@ -1,663 +1,663 @@ -
$welcome
"; - if ( function_exists('curl_init') ) - echo ""; - else - echo "$incompat
"; - echo "\n"; - } - - // Deletes saved data and redirect. - function restart() { - delete_option('import-blogger'); - header("Location: admin.php?import=blogger"); - die(); - } - - // Generates a string that will make the page reload in a specified interval. - function refresher($msec) { - if ( $msec ) - return "\n\n\n"; - else - return "\n\n\n"; - } - - // Returns associative array of code, header, cookies, body. Based on code from php.net. - function parse_response($this_response) { - // Split response into header and body sections - list($response_headers, $response_body) = explode("\r\n\r\n", $this_response, 2); - $response_header_lines = explode("\r\n", $response_headers); - - // First line of headers is the HTTP response code - $http_response_line = array_shift($response_header_lines); - if(preg_match('@^HTTP/[0-9]\.[0-9] ([0-9]{3})@',$http_response_line, $matches)) { $response_code = $matches[1]; } - - // put the rest of the headers in an array - $response_header_array = array(); - foreach($response_header_lines as $header_line) { - list($header,$value) = explode(': ', $header_line, 2); - $response_header_array[$header] .= $value."\n"; - } - - $cookie_array = array(); - $cookies = explode("\n", $response_header_array["Set-Cookie"]); - foreach($cookies as $this_cookie) { array_push($cookie_array, "Cookie: ".$this_cookie); } - - return array("code" => $response_code, "header" => $response_header_array, "cookies" => $cookie_array, "body" => $response_body); - } - - // Prints a form for the user to enter Blogger creds. - function login_form($text='') { - echo '.*
#U', $response['body'], $matches); - $progress = $matches[0]; - die($head . $progress); - } else { - $this->import['blogs'][$_GET['blog']]['publish'][$i] = false; - update_option('import-blogger', $this->import); - die($head); - } - } else { - // Subsequent call. Keep checking status until Blogger reports publish complete. - $url = $this->import['blogs'][$_GET['blog']]['publish'][$i]; - $response = $this->get_blogger($url, $this->import['cookies']); - if ( preg_match('#.*
#U', $response['body'], $matches) ) { - $progress = $matches[0]; - if ( strstr($progress, '100%') ) { - $this->set_next_step($i); - $progress .= ''.__('Moving on...').'
'; - } - die($head . $progress); - } else { - $this->import['blogs'][$_GET['blog']]['publish'][$i] = false; - update_option('import-blogger', $this->import); - die("$head" . __('Trying again...') . '
'); - } - } - } - - // Sets next step, saves options - function set_next_step($step) { - $this->import['blogs'][$_GET['blog']]['nextstep'] = $step; - update_option('import-blogger', $this->import); - } - - // Redirects to next step - function do_next_step() { - header("Location: admin.php?import=blogger&noheader=true&blog={$_GET['blog']}"); - die(); - } - - // Step 0: Do Blogger login, get blogid/title pairs. - function do_login() { - if ( ( ! $this->import['user'] && ! is_array($this->import['cookies']) ) ) { - // The user must provide a Blogger username and password. - if ( ! ( $_POST['user'] && $_POST['pass'] ) ) { - $this->login_form(__('The script will log into your Blogger account, change some settings so it can read your blog, and restore the original settings when it\'s done. Here\'s what you do:'.__('Are you looking for %title%? It is temporarily out of service. Please try again in a few minutes. Meanwhile, discover a better blogging tool.').'
' . addslashes(print_r($headers, 1)) . addslashes(print_r($response, 1)) . ''); - $this->import['blogs'][$_GET['blog']]['url'] = 'http://' . $optary['modify']['subdomain'] . '.blogspot.com/'; - sleep(2); - } else { - $this->import['blogs'][$_GET['blog']]['url'] = 'http://' . $_POST['subdomain'] . '.blogspot.com/'; - update_option('import-blogger', $this->import); - $output .= "
$blog_opt
'.__('Error on form submission. Retry or reset the importer.').'
' . addslashes(print_r($response, 1))); - } - $output .= "$blog_opt
$blog_opt
$blog_opt in progress, please wait...
\n"; - } else { - $output.= "$blog_opt
\n"; - } - } - if ( $form ) - die($output . $form); - - $this->set_next_step(4); - $this->do_next_step(); - } - - // Step 3: Cancelled :-) - - // Step 4: Publish with the new template and settings. - function publish_blog() { - $this->publish_blogger(5, __('Publishing with new template and options')); - } - - // Step 5: Get the archive URLs from the new blog. - function get_archive_urls() { - $bloghtml = $this->get_blogger($this->import['blogs'][$_GET['blog']]['url']); - if (! strstr($bloghtml['body'], 'import['blogs'][$_GET['blog']]['archives'][$archive] = false; - } - $this->set_next_step(6); - $this->do_next_step(); - } - - // Step 6: Get each monthly archive, import it, mark it done. - function get_archive() { - global $wpdb; - $output = '$archivename $status
\n"; - } - if ( ! $did_one ) - $this->set_next_step(7); - die( $this->refresher(1000) . $output ); - } - - // Step 7: Restore the backed-up settings to Blogger - function restore_settings() { - $output = '$blog_opt
\n"; - } elseif ( $optary['restored'] || ! $optary['modify'] ) { - $output .= "$blog_opt
Please tell the devs.
' . addslashes(print_r($response, 1)) ); - } - } - if ( $optary['backup'] != $optary['modify'] ) { - $response = $this->post_blogger($posturl, $headers, $optary['backup']); - if ( $response['code'] >= 400 || strstr($response['body'], 'There are errors on this form') ) { - $this->import['blogs'][$_GET['blog']]['options']["$blog_opt"]['error'] = true; - update_option('import-blogger', $this->import); - $output .= "$blog_opt ".__('failed. Trying again.').'
'; - } else { - $this->import['blogs'][$_GET['blog']]['options']["$blog_opt"]['restored'] = true; - update_option('import-blogger', $this->import); - $output .= "$blog_opt ".__('restored.').'
'; - } - } - $did_one = true; - } - } - - if ( $did_one ) { - die( $this->refresher(1000) . $output ); - } elseif ( $this->import['blogs'][$_GET['blog']]['options']['blog-publishing']['backup']['publishMode'] > 0 ) { - $this->set_next_step(9); - } else { - $this->set_next_step(8); - } - - $this->do_next_step(); - } - - // Step 8: Republish, all back to normal - function republish_blog() { - $this->publish_blogger(9, __('Publishing with original template and options')); - } - - // Step 9: Congratulate the user - function congrats() { - echo ''.__('Now that you have imported your Blogger blog into WordPress, what are you going to do? Here are some suggestions:').'
'.print_r($this->import,1).'do_login(); - break; - case 1 : - $this->select_blog(); - break; - case 2 : - $this->backup_settings(); - break; - case 3 : - $this->wait_for_blogger(); - break; - case 4 : - $this->publish_blog(); - break; - case 5 : - $this->get_archive_urls(); - break; - case 6 : - $this->get_archive(); - break; - case 7 : - $this->restore_settings(); - break; - case 8 : - $this->republish_blog(); - break; - case 9 : - $this->congrats(); - break; - } - die; - - } else { - $this->greet(); - } - } - - function Blogger_Import() { - // This space intentionally left blank. - } -} - -$blogger_import = new Blogger_Import(); - -register_importer('blogger', 'Blogger', __('Import posts and comments from a Blogger account'), array ($blogger_import, 'start')); - -?> +
$welcome
"; + if ( function_exists('curl_init') ) + echo ""; + else + echo "$incompat
"; + echo "\n"; + } + + // Deletes saved data and redirect. + function restart() { + delete_option('import-blogger'); + header("Location: admin.php?import=blogger"); + die(); + } + + // Generates a string that will make the page reload in a specified interval. + function refresher($msec) { + if ( $msec ) + return "\n\n\n"; + else + return "\n\n\n"; + } + + // Returns associative array of code, header, cookies, body. Based on code from php.net. + function parse_response($this_response) { + // Split response into header and body sections + list($response_headers, $response_body) = explode("\r\n\r\n", $this_response, 2); + $response_header_lines = explode("\r\n", $response_headers); + + // First line of headers is the HTTP response code + $http_response_line = array_shift($response_header_lines); + if(preg_match('@^HTTP/[0-9]\.[0-9] ([0-9]{3})@',$http_response_line, $matches)) { $response_code = $matches[1]; } + + // put the rest of the headers in an array + $response_header_array = array(); + foreach($response_header_lines as $header_line) { + list($header,$value) = explode(': ', $header_line, 2); + $response_header_array[$header] .= $value."\n"; + } + + $cookie_array = array(); + $cookies = explode("\n", $response_header_array["Set-Cookie"]); + foreach($cookies as $this_cookie) { array_push($cookie_array, "Cookie: ".$this_cookie); } + + return array("code" => $response_code, "header" => $response_header_array, "cookies" => $cookie_array, "body" => $response_body); + } + + // Prints a form for the user to enter Blogger creds. + function login_form($text='') { + echo '.*
#U', $response['body'], $matches); + $progress = $matches[0]; + die($head . $progress); + } else { + $this->import['blogs'][$_GET['blog']]['publish'][$i] = false; + update_option('import-blogger', $this->import); + die($head); + } + } else { + // Subsequent call. Keep checking status until Blogger reports publish complete. + $url = $this->import['blogs'][$_GET['blog']]['publish'][$i]; + $response = $this->get_blogger($url, $this->import['cookies']); + if ( preg_match('#.*
#U', $response['body'], $matches) ) { + $progress = $matches[0]; + if ( strstr($progress, '100%') ) { + $this->set_next_step($i); + $progress .= ''.__('Moving on...').'
'; + } + die($head . $progress); + } else { + $this->import['blogs'][$_GET['blog']]['publish'][$i] = false; + update_option('import-blogger', $this->import); + die("$head" . __('Trying again...') . '
'); + } + } + } + + // Sets next step, saves options + function set_next_step($step) { + $this->import['blogs'][$_GET['blog']]['nextstep'] = $step; + update_option('import-blogger', $this->import); + } + + // Redirects to next step + function do_next_step() { + header("Location: admin.php?import=blogger&noheader=true&blog={$_GET['blog']}"); + die(); + } + + // Step 0: Do Blogger login, get blogid/title pairs. + function do_login() { + if ( ( ! $this->import['user'] && ! is_array($this->import['cookies']) ) ) { + // The user must provide a Blogger username and password. + if ( ! ( $_POST['user'] && $_POST['pass'] ) ) { + $this->login_form(__('The script will log into your Blogger account, change some settings so it can read your blog, and restore the original settings when it\'s done. Here\'s what you do:'.__('Are you looking for %title%? It is temporarily out of service. Please try again in a few minutes. Meanwhile, discover a better blogging tool.').'
' . addslashes(print_r($headers, 1)) . addslashes(print_r($response, 1)) . ''); + $this->import['blogs'][$_GET['blog']]['url'] = 'http://' . $optary['modify']['subdomain'] . '.blogspot.com/'; + sleep(2); + } else { + $this->import['blogs'][$_GET['blog']]['url'] = 'http://' . $_POST['subdomain'] . '.blogspot.com/'; + update_option('import-blogger', $this->import); + $output .= "
$blog_opt
'.__('Error on form submission. Retry or reset the importer.').'
' . addslashes(print_r($response, 1))); + } + $output .= "$blog_opt
$blog_opt
$blog_opt in progress, please wait...
\n"; + } else { + $output.= "$blog_opt
\n"; + } + } + if ( $form ) + die($output . $form); + + $this->set_next_step(4); + $this->do_next_step(); + } + + // Step 3: Cancelled :-) + + // Step 4: Publish with the new template and settings. + function publish_blog() { + $this->publish_blogger(5, __('Publishing with new template and options')); + } + + // Step 5: Get the archive URLs from the new blog. + function get_archive_urls() { + $bloghtml = $this->get_blogger($this->import['blogs'][$_GET['blog']]['url']); + if (! strstr($bloghtml['body'], 'import['blogs'][$_GET['blog']]['archives'][$archive] = false; + } + $this->set_next_step(6); + $this->do_next_step(); + } + + // Step 6: Get each monthly archive, import it, mark it done. + function get_archive() { + global $wpdb; + $output = '$archivename $status
\n"; + } + if ( ! $did_one ) + $this->set_next_step(7); + die( $this->refresher(1000) . $output ); + } + + // Step 7: Restore the backed-up settings to Blogger + function restore_settings() { + $output = '$blog_opt
\n"; + } elseif ( $optary['restored'] || ! $optary['modify'] ) { + $output .= "$blog_opt
Please tell the devs.
' . addslashes(print_r($response, 1)) ); + } + } + if ( $optary['backup'] != $optary['modify'] ) { + $response = $this->post_blogger($posturl, $headers, $optary['backup']); + if ( $response['code'] >= 400 || strstr($response['body'], 'There are errors on this form') ) { + $this->import['blogs'][$_GET['blog']]['options']["$blog_opt"]['error'] = true; + update_option('import-blogger', $this->import); + $output .= "$blog_opt ".__('failed. Trying again.').'
'; + } else { + $this->import['blogs'][$_GET['blog']]['options']["$blog_opt"]['restored'] = true; + update_option('import-blogger', $this->import); + $output .= "$blog_opt ".__('restored.').'
'; + } + } + $did_one = true; + } + } + + if ( $did_one ) { + die( $this->refresher(1000) . $output ); + } elseif ( $this->import['blogs'][$_GET['blog']]['options']['blog-publishing']['backup']['publishMode'] > 0 ) { + $this->set_next_step(9); + } else { + $this->set_next_step(8); + } + + $this->do_next_step(); + } + + // Step 8: Republish, all back to normal + function republish_blog() { + $this->publish_blogger(9, __('Publishing with original template and options')); + } + + // Step 9: Congratulate the user + function congrats() { + echo ''.__('Now that you have imported your Blogger blog into WordPress, what are you going to do? Here are some suggestions:').'
'.print_r($this->import,1).'do_login(); + break; + case 1 : + $this->select_blog(); + break; + case 2 : + $this->backup_settings(); + break; + case 3 : + $this->wait_for_blogger(); + break; + case 4 : + $this->publish_blog(); + break; + case 5 : + $this->get_archive_urls(); + break; + case 6 : + $this->get_archive(); + break; + case 7 : + $this->restore_settings(); + break; + case 8 : + $this->republish_blog(); + break; + case 9 : + $this->congrats(); + break; + } + die; + + } else { + $this->greet(); + } + } + + function Blogger_Import() { + // This space intentionally left blank. + } +} + +$blogger_import = new Blogger_Import(); + +register_importer('blogger', 'Blogger', __('Import posts and comments from a Blogger account'), array ($blogger_import, 'start')); + +?> diff --git a/wp-includes/js/tinymce/themes/advanced/about.htm b/wp-includes/js/tinymce/themes/advanced/about.htm index f4130fdfe4..bbd8d1389a 100644 --- a/wp-includes/js/tinymce/themes/advanced/about.htm +++ b/wp-includes/js/tinymce/themes/advanced/about.htm @@ -1,52 +1,52 @@ - - -
Version: {$tinymce_version} ({$tinymce_releasedate})
-TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL - by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.
-Copyright © 2005, Moxiecode Systems AB, All rights reserved.
-For more information about this software visit the TinyMCE website.
- - --
Version: {$tinymce_version} ({$tinymce_releasedate})
+TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL + by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.
+Copyright © 2005, Moxiecode Systems AB, All rights reserved.
+For more information about this software visit the TinyMCE website.
+ + ++
{$lang_theme_charmap_title} | -|||||
- - | -
-
|
- ||||
-
|
-
{$lang_theme_charmap_title} | +|||||
+ + | +
+
|
+ ||||
+
|
+
' + tinyMCE.getLang('lang_plugin') + ' | '; - html += '' + tinyMCE.getLang('lang_author') + ' | '; - html += '' + tinyMCE.getLang('lang_version') + ' | '; - html += '' + info.longname + ' | '; - else - html += '' + info.longname + ' | '; - - if (info.authorurl != null && info.authorurl != '') - html += '' + info.author + ' | '; - else - html += '' + info.author + ' | '; - - html += '' + info.version + ' | '; - html += ''; - } - - html += '
' + tinyMCE.getLang('lang_plugin') + ' | '; + html += '' + tinyMCE.getLang('lang_author') + ' | '; + html += '' + tinyMCE.getLang('lang_version') + ' | '; + html += '' + info.longname + ' | '; + else + html += '' + info.longname + ' | '; + + if (info.authorurl != null && info.authorurl != '') + html += '' + info.author + ' | '; + else + html += '' + info.author + ' | '; + + html += '' + info.version + ' | '; + html += ''; + } + + html += '
'
- + '
|
'
+ + '
|