]*>\s*)|', "$1
", $pee );
$pee = preg_replace('!
([^<]+)\s*?((?:div|address|form)[^>]*>)!', "
$1
$2", $pee);
$pee = preg_replace( '|
|', "$1
", $pee );
$pee = preg_replace('!
\s*(?' . $allblocks . '[^>]*>)\s*
!', "$1", $pee); // don't pee all over a tag
@@ -82,7 +81,7 @@
if ( strstr( $pee, '
)(.*?)
!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '' ", $pee);
$pee = preg_replace( "|\n$|", '', $pee );
-/**/
+
return $pee;
}
Index: wp-includes/category.php
===================================================================
--- wp-includes/category.php (.../2.1) (revision 4963)
+++ wp-includes/category.php (.../2.1.2) (revision 4963)
@@ -33,7 +33,7 @@
$key = md5( serialize( $r ) );
if ( $cache = wp_cache_get( 'get_categories', 'category' ) )
if ( isset( $cache[ $key ] ) )
- return $cache[ $key ];
+ return apply_filters('get_categories', $cache[$key], $r);
$where = 'cat_ID > 0';
$inclusions = '';
Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php (.../2.1) (revision 4963)
+++ wp-includes/post.php (.../2.1.2) (revision 4963)
@@ -74,16 +74,16 @@
// get extended entry info ()
function get_extended($post) {
//Match the new style more links
- if (preg_match('//', $post, $matches)) {
- list($main,$extended) = explode($matches[0],$post,2);
+ if ( preg_match('//', $post, $matches) ) {
+ list($main, $extended) = explode($matches[0], $post, 2);
} else {
$main = $post;
$extended = '';
}
// Strip leading and trailing whitespace
- $main = preg_replace('/^[\s]*(.*)[\s]*$/','\\1',$main);
- $extended = preg_replace('/^[\s]*(.*)[\s]*$/','\\1',$extended);
+ $main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main);
+ $extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended);
return array('main' => $main, 'extended' => $extended);
}
Index: wp-includes/version.php
===================================================================
--- wp-includes/version.php (.../2.1) (revision 4963)
+++ wp-includes/version.php (.../2.1.2) (revision 4963)
@@ -2,7 +2,7 @@
// This holds the version number in a separate file so we can bump it without cluttering the SVN
-$wp_version = '2.1';
-$wp_db_version = 4772;
+$wp_version = '2.1.2';
+$wp_db_version = 4773;
?>
Index: wp-includes/js/scriptaculous/wp-scriptaculous.js
===================================================================
--- wp-includes/js/scriptaculous/wp-scriptaculous.js (.../2.1) (revision 0)
+++ wp-includes/js/scriptaculous/wp-scriptaculous.js (.../2.1.2) (revision 4963)
@@ -0,0 +1,40 @@
+// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+
+var Scriptaculous = {
+ Version: '1.6.1',
+ require: function(libraryName) {
+ // inserting via DOM fails in Safari 2.0, so brute force approach
+ document.write('');
+ },
+ load: function() {
+ if((typeof Prototype=='undefined') ||
+ (typeof Element == 'undefined') ||
+ (typeof Element.Methods=='undefined') ||
+ parseFloat(Prototype.Version.split(".")[0] + "." +
+ Prototype.Version.split(".")[1]) < 1.5)
+ throw("script.aculo.us requires the Prototype JavaScript framework >= 1.5.0");
+
+ $A(document.getElementsByTagName("script")).findAll( function(s) {
+ return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
+ }).each( function(s) {
+ var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
+ var includes = s.src.match(/\?.*load=([a-z,]*)/);
+ if ( includes )
+ includes[1].split(',').each(
+ function(include) { Scriptaculous.require(path+include+'.js') });
+ });
+ }
+}
+
+Scriptaculous.load();
Index: wp-includes/js/tinymce/tiny_mce_config.php
===================================================================
--- wp-includes/js/tinymce/tiny_mce_config.php (.../2.1) (revision 4963)
+++ wp-includes/js/tinymce/tiny_mce_config.php (.../2.1.2) (revision 4963)
@@ -1,5 +1,6 @@
",
valid_elements : "",
Index: wp-includes/js/tinymce/wp-mce-help.php
===================================================================
--- wp-includes/js/tinymce/wp-mce-help.php (.../2.1) (revision 4963)
+++ wp-includes/js/tinymce/wp-mce-help.php (.../2.1.2) (revision 4963)
@@ -1,4 +1,6 @@
-
+
>
Index: wp-includes/js/tinymce/tiny_mce_gzip.php
===================================================================
--- wp-includes/js/tinymce/tiny_mce_gzip.php (.../2.1) (revision 4963)
+++ wp-includes/js/tinymce/tiny_mce_gzip.php (.../2.1.2) (revision 4963)
@@ -6,7 +6,7 @@
*
* @version 1.08
* @author Moxiecode
- * @copyright Copyright © 2005-2006, Moxiecode Systems AB, All rights reserved.
+ * @copyright Copyright 2005-2006, Moxiecode Systems AB, All rights reserved.
*
* This file compresses the TinyMCE JavaScript using GZip and
* enables the browser to do two requests instead of one for each .js file.
@@ -82,7 +82,7 @@
$debug = false; // Enable this option if you need debuging info
// Headers
-header("Content-type: text/javascript; charset: UTF-8");
+header("Content-Type: text/javascript; charset=" . get_bloginfo('charset'));
// header("Cache-Control: must-revalidate");
header("Vary: Accept-Encoding"); // Handle proxies
header("Expires: " . gmdate("D, d M Y H:i:s", time() + $expiresOffset) . " GMT");
Index: wp-includes/capabilities.php
===================================================================
--- wp-includes/capabilities.php (.../2.1) (revision 4963)
+++ wp-includes/capabilities.php (.../2.1.2) (revision 4963)
@@ -55,7 +55,7 @@
unset($this->role_objects[$role]);
unset($this->role_names[$role]);
unset($this->roles[$role]);
-
+
if ( $this->use_db )
update_option($this->role_key, $this->roles);
}
@@ -427,7 +427,7 @@
}
$author_data = get_userdata($user_id);
- $page_author_data = get_userdata($post->post_author);
+ $page_author_data = get_userdata($page->post_author);
if ($user_id == $page_author_data->ID)
$caps[] = 'read';
else
Index: wp-includes/cron.php
===================================================================
--- wp-includes/cron.php (.../2.1) (revision 4963)
+++ wp-includes/cron.php (.../2.1.2) (revision 4963)
@@ -93,6 +93,10 @@
}
function wp_cron() {
+ // Prevent infinite loops caused by lack of wp-cron.php
+ if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false )
+ return;
+
$crons = _get_cron_array();
if ( !is_array($crons) )
Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php (.../2.1) (revision 4963)
+++ wp-includes/functions.php (.../2.1.2) (revision 4963)
@@ -1190,7 +1190,7 @@
$adminurl = get_option('siteurl') . '/wp-admin';
if ( wp_get_referer() )
- $adminurl = wp_get_referer();
+ $adminurl = attribute_escape(wp_get_referer());
$title = __('WordPress Confirmation');
// Remove extra layer of slashes.
@@ -1205,9 +1205,9 @@
$html .= "\t\t
\n";
}
$html .= "\t\t
\n";
- $html .= "\t\t
\n\t\n";
+ $html .= "\t\t
\n\t\t
" . wp_specialchars(wp_explain_nonce($action)) . "
\n\t\t
" . __('No') . "
\n\t\t
\n\t\n";
} else {
- $html .= "\t
\n";
+ $html .= "\t
\n";
}
$html .= "\n";
wp_die($html, $title);
Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php (.../2.1) (revision 4963)
+++ wp-includes/script-loader.php (.../2.1.2) (revision 4963)
@@ -17,7 +17,7 @@
$this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' );
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20061113' );
$mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php');
- $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20061113' );
+ $this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070225' );
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0');
$this->add( 'autosave', '/wp-includes/js/autosave-js.php', array('prototype', 'sack'), '20070116');
$this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '20070118');
Index: wp-includes/bookmark-template.php
===================================================================
--- wp-includes/bookmark-template.php (.../2.1) (revision 4963)
+++ wp-includes/bookmark-template.php (.../2.1.2) (revision 4963)
@@ -344,10 +344,14 @@
$bookmarks = get_bookmarks("limit=$limit&category=$category&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_invisible&show_updated=$show_updated");
if ( !empty($bookmarks) ) {
- $output .= str_replace(array('%id', '%class'), array("linkuncat", $class), $category_before);
- $output .= "$title_before$title_li$title_after\n\t
\n";
- $output .= _walk_bookmarks($bookmarks, $r);
- $output .= "\n\t
\n$category_after\n";
+ if ( !empty( $title_li ) ){
+ $output .= str_replace(array('%id', '%class'), array("linkcat-$category", $class), $category_before);
+ $output .= "$title_before$title_li$title_after\n\t
\n";
+ $output .= _walk_bookmarks($bookmarks, $r);
+ $output .= "\n\t
\n$category_after\n";
+ } else {
+ $output .= _walk_bookmarks($bookmarks, $r);
+ }
}
}
Index: xmlrpc.php
===================================================================
--- xmlrpc.php (.../2.1) (revision 4963)
+++ xmlrpc.php (.../2.1.2) (revision 4963)
@@ -535,7 +535,9 @@
$post_content = $post_content . "\n\n" . $post_more;
}
- $to_ping = $content_struct['mt_tb_ping_urls'];
+ $to_ping = $content_struct['mt_tb_ping_urls'];
+ if ( is_array($to_ping) )
+ $to_ping = implode(' ', $to_ping);
// Do some timestamp voodoo
$dateCreatedd = $content_struct['dateCreated'];
@@ -633,8 +635,10 @@
$post_content = $post_content . "\n\n" . $post_more;
}
- $to_ping = $content_struct['mt_tb_ping_urls'];
-
+ $to_ping = $content_struct['mt_tb_ping_urls'];
+ if ( is_array($to_ping) )
+ $to_ping = implode(' ', $to_ping);
+
$comment_status = (empty($content_struct['mt_allow_comments'])) ?
get_option('default_comment_status')
: $content_struct['mt_allow_comments'];
@@ -977,7 +981,7 @@
foreach($catids as $catid) {
$categories[] = array(
'categoryName' => get_cat_name($catid),
- 'categoryId' => $catid,
+ 'categoryId' => (string) $catid,
'isPrimary' => $isPrimary
);
$isPrimary = false;
Index: wp-admin/admin-ajax.php
===================================================================
--- wp-admin/admin-ajax.php (.../2.1) (revision 4963)
+++ wp-admin/admin-ajax.php (.../2.1.2) (revision 4963)
@@ -155,7 +155,7 @@
if ( !current_user_can( 'edit_post', $id ) )
die('-1');
if ( $id < 0 ) {
- $now = current_time('timestamp');
+ $now = current_time('timestamp', 1);
if ( $pid = wp_insert_post( array(
'post_title' => sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now))
) ) )
Index: wp-admin/admin-functions.php
===================================================================
--- wp-admin/admin-functions.php (.../2.1) (revision 4963)
+++ wp-admin/admin-functions.php (.../2.1.2) (revision 4963)
@@ -139,14 +139,14 @@
$post = & get_post( $post_ID, ARRAY_A );
- $search = "#
]+rel=('|\" )[^'\"]*attachment[^>]*>#ie";
+ $search = "#]+rel=('|\")[^'\"]*attachment[^>]*>#ie";
// See if we have any rel="attachment" links
if ( 0 == preg_match_all( $search, $post['post_content'], $anchor_matches, PREG_PATTERN_ORDER ) )
return;
$i = 0;
- $search = "#[\s]+rel=(\"|' )(.*? )wp-att-(\d+ )\\1#i";
+ $search = "#[\s]+rel=(\"|')(.*?)wp-att-(\d+)\\1#i";
foreach ( $anchor_matches[0] as $anchor ) {
if ( 0 == preg_match( $search, $anchor, $id_matches ) )
continue;
@@ -830,7 +830,7 @@
|
-
post_modified ) _e('Unpublished'); else echo mysql2date( 'Y-m-d g:i a', $post->post_modified ); ?> |
+
post_modified ) _e('Unpublished'); else echo mysql2date( __('Y-m-d g:i a'), $post->post_modified ); ?> |
|
" . __( 'Edit' ) . ""; } ?> |
" . __( 'Delete' ) . ""; } ?> |
@@ -1269,7 +1269,7 @@
if ( $items ) {
foreach ( $items as $item ) {
- // A page cannot be it's own parent.
+ // A page cannot be its own parent.
if (!empty ( $post_ID ) ) {
if ( $item->ID == $post_ID ) {
continue;
@@ -1602,7 +1602,7 @@
}
elseif ( file_exists( ABSPATH . $file ) && is_file( ABSPATH . $file ) ) {
$template_data = implode( '', file( ABSPATH . $file ) );
- if ( preg_match( "|Template Name:(.* )|i", $template_data, $name ))
+ if ( preg_match( "|Template Name:(.*)|i", $template_data, $name ))
return $name[1];
}
@@ -2190,7 +2190,7 @@
$thumbpath = str_replace( basename( $file ), $thumb, $file );
- // move the thumbnail to it's final destination
+ // move the thumbnail to its final destination
if ( $type[2] == 1 ) {
if (!imagegif( $thumbnail, $thumbpath ) ) {
$error = __( "Thumbnail path invalid" );
@@ -2215,8 +2215,7 @@
if (!empty ( $error ) ) {
return $error;
} else {
- apply_filters( 'wp_create_thumbnail', $thumbpath );
- return $thumbpath;
+ return apply_filters( 'wp_create_thumbnail', $thumbpath );
}
}
Index: wp-admin/custom-header.php
===================================================================
--- wp-admin/custom-header.php (.../2.1) (revision 4963)
+++ wp-admin/custom-header.php (.../2.1.2) (revision 4963)
@@ -223,12 +223,12 @@
if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) {
set_theme_mod('header_image', $url);
- $header = apply_filters('wp_create_file_in_uploads', $header); // For replication
+ $header = apply_filters('wp_create_file_in_uploads', $file, $id); // For replication
return $this->finished();
} elseif ( $width > HEADER_IMAGE_WIDTH ) {
$oitar = $width / HEADER_IMAGE_WIDTH;
$image = wp_crop_image($file, 0, 0, $width, $height, HEADER_IMAGE_WIDTH, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file));
- $image = apply_filters('wp_create_file_in_uploads', $image); // For replication
+ $image = apply_filters('wp_create_file_in_uploads', $image, $id); // For replication
$url = str_replace(basename($url), basename($image), $url);
$width = $width / $oitar;
@@ -286,8 +286,7 @@
// cleanup
$file = get_attached_file( $_POST['attachment_id'] );
$medium = str_replace(basename($file), 'midsize-'.basename($file), $file);
- @unlink( $medium );
- apply_filters( 'wp_delete_file', $medium );
+ @unlink( apply_filters( 'wp_delete_file', $medium ) );
wp_delete_attachment( $_POST['attachment_id'] );
return $this->finished();
Index: wp-admin/options-general.php
===================================================================
--- wp-admin/options-general.php (.../2.1) (revision 4963)
+++ wp-admin/options-general.php (.../2.1.2) (revision 4963)
@@ -60,7 +60,7 @@
| UTC time is:') ?> |
- |
+ |
| |
Index: wp-admin/edit.php
===================================================================
--- wp-admin/edit.php (.../2.1) (revision 4963)
+++ wp-admin/edit.php (.../2.1.2) (revision 4963)
@@ -177,7 +177,7 @@
case 'date':
?>
- post_modified ) _e('Unpublished'); else the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?> |
+ post_modified ) _e('Unpublished'); else the_time(_('Y-m-d \<\b\r \/\> g:i:s a')); ?> |
- — [
+
— [
comment_post_ID) ) {
echo " " . __('Edit') . '';
- echo ' | comment_author)) . "', theCommentList );\">" . __('Delete') . ' ';
+ echo ' | comment_author)) . "', theCommentList );\">" . __('Delete') . ' ';
if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) {
- echo ' | ' . __('Unapprove') . ' ';
- echo ' | ' . __('Approve') . ' ';
+ echo ' | ' . __('Unapprove') . ' ';
+ echo ' | ' . __('Approve') . ' ';
}
- echo " | comment_post_ID."&c=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), js_escape( $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . " ]";
-} // end if any comments to show
+ echo " | comment_post_ID . "&c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . " ";
+}
?>
Index: wp-admin/index-extra.php
===================================================================
--- wp-admin/index-extra.php (.../2.1) (revision 4963)
+++ wp-admin/index-extra.php (.../2.1.2) (revision 4963)
@@ -2,6 +2,8 @@
require_once('admin.php');
require_once (ABSPATH . WPINC . '/rss.php');
+@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
+
switch ( $_GET['jax'] ) {
case 'incominglinks' :
Index: wp-admin/options-reading.php
===================================================================
--- wp-admin/options-reading.php (.../2.1) (revision 4963)
+++ wp-admin/options-reading.php (.../2.1.2) (revision 4963)
@@ -40,7 +40,6 @@
-
@@ -54,7 +53,6 @@
|
-
|
@@ -72,7 +70,7 @@
-<--more--> feature, it will cut off posts in RSS feeds.'); ?>
+<!--more--> feature, it will cut off posts in RSS feeds.'); ?>
|
Index: wp-admin/edit-pages.php
===================================================================
--- wp-admin/edit-pages.php (.../2.1) (revision 4963)
+++ wp-admin/edit-pages.php (.../2.1.2) (revision 4963)
@@ -19,7 +19,7 @@