Commit 09fcbfad authored by lechuck's avatar lechuck Committed by lechuck

update wordpress 3.3.2

parent a7cfa472
......@@ -8,7 +8,7 @@
<body>
<h1 id="logo">
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" width="250" height="68" /></a>
<br /> Version 3.3.1
<br /> Version 3.3.2
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
......
......@@ -34,7 +34,11 @@ include( './admin-header.php' );
</h2>
<div class="changelog point-releases">
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 1 ); ?></h3>
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 2 ); ?></h3>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 12 ), '3.3.2', number_format_i18n( 12 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.3.2' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs.', 15 ), '3.3.1', number_format_i18n( 15 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.3.1' ); ?>
......
......@@ -406,7 +406,7 @@ function update_core($from, $to) {
$mysql_version = $wpdb->db_version();
$required_php_version = '5.2.4';
$required_mysql_version = '5.0';
$wp_version = '3.3.1';
$wp_version = '3.3.2';
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) )
$mysql_compat = true;
......
......@@ -154,6 +154,10 @@ if ( $action ) {
wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.'));
check_admin_referer('deactivate-plugin_' . $plugin);
if ( ! is_network_admin() && is_plugin_active_for_network( $plugin ) ) {
wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
exit;
}
deactivate_plugins($plugin);
update_option('recently_activated', array($plugin => time()) + (array)get_option('recently_activated'));
if ( headers_sent() )
......@@ -169,7 +173,13 @@ if ( $action ) {
check_admin_referer('bulk-plugins');
$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
$plugins = array_filter($plugins, 'is_plugin_active'); //Do not deactivate plugins which are already deactivated.
// Do not deactivate plugins which are already deactivated.
if ( is_network_admin() ) {
$plugins = array_filter( $plugins, 'is_plugin_active_for_network' );
} else {
$plugins = array_filter( $plugins, 'is_plugin_active' );
$plugins = array_diff( $plugins, array_filter( $plugins, 'is_plugin_active_for_network' ) );
}
if ( empty($plugins) ) {
wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
exit;
......
......@@ -390,24 +390,15 @@ var photostorage = false;
function setup_photo_actions() {
jQuery('.close').click(function() {
jQuery('#extra-fields').hide();
jQuery('body').append( jQuery('#photo-add-url-div') );
jQuery('#extra-fields').html('');
});
jQuery('.refresh').click(function() {
photostorage = false;
jQuery('body').append( jQuery('#photo-add-url-div') );
show('photo');
});
jQuery('#photo-add-url').click(function(){
var container = jQuery('#img_container');
if ( container.children('#photo-add-url-div:visible').length ) {
container.children('a').show();
jQuery('#photo-add-url-div').hide();
} else {
container.children('a').hide();
container.append( jQuery('#photo-add-url-div').show() );
}
var form = jQuery('#photo-add-url-div').clone();
jQuery('#img_container').empty().append( form.show() );
});
jQuery('#waiting').hide();
jQuery('#extra-fields').show();
......
......@@ -44,10 +44,13 @@ define('WP_DEBUG', false);
require_once(ABSPATH . WPINC . '/load.php');
require_once(ABSPATH . WPINC . '/version.php');
wp_check_php_mysql_versions();
wp_unregister_GLOBALS();
require_once(ABSPATH . WPINC . '/compat.php');
require_once(ABSPATH . WPINC . '/functions.php');
require_once(ABSPATH . WPINC . '/class-wp-error.php');
require_once(ABSPATH . WPINC . '/formatting.php');
wp_magic_quotes();
if (!file_exists(ABSPATH . 'wp-config-sample.php'))
wp_die('Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.');
......
......@@ -100,6 +100,6 @@ if ( !$user->ID ) {
$location = empty($_POST['redirect_to']) ? get_comment_link($comment_id) : $_POST['redirect_to'] . '#comment-' . $comment_id;
$location = apply_filters('comment_post_redirect', $location, $comment);
wp_redirect($location);
wp_safe_redirect( $location );
exit;
?>
# Copyright (C) 2010 Twenty Ten
# This file is distributed under the same license as the Twenty Ten package.
# Copyright (C) 2012 the WordPress team
# This file is distributed under the GNU General Public License.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Ten 1.3\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/twentyten\n"
"POT-Creation-Date: 2011-12-10 19:27:25+00:00\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentyten\n"
"POT-Creation-Date: 2012-02-10 16:30:52+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: loop-attachment.php:21
msgid "Return to %s"
msgstr ""
#. translators: %s - title of parent post
#: loop-attachment.php:23
msgid "<span class=\"meta-nav\">&larr;</span> %s"
msgstr ""
#: loop-attachment.php:32
msgid "<span class=\"%1$s\">By</span> %2$s"
msgstr ""
#: loop-attachment.php:36 functions.php:476
msgid "View all posts by %s"
#: 404.php:16 loop.php:33
msgid "Not Found"
msgstr ""
#: loop-attachment.php:43
msgid "<span class=\"%1$s\">Published</span> %2$s"
#: 404.php:18
msgid ""
"Apologies, but the page you requested could not be found. Perhaps searching "
"will help."
msgstr ""
#: loop-attachment.php:53
msgid "Full size is %s pixels"
#: archive.php:33
msgid "Daily Archives: <span>%s</span>"
msgstr ""
#: loop-attachment.php:56
msgid "Link to full-size image"
#: archive.php:35
msgid "Monthly Archives: <span>%s</span>"
msgstr ""
#: loop-attachment.php:63 loop-attachment.php:111 loop.php:100 loop.php:123
#: loop.php:165 loop-page.php:30 loop-single.php:56
msgid "Edit"
#: archive.php:35
msgctxt "monthly archives date format"
msgid "F Y"
msgstr ""
#: loop-attachment.php:104 loop.php:115 loop.php:143 functions.php:248
msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
#: archive.php:37
msgid "Yearly Archives: <span>%s</span>"
msgstr ""
#: loop-attachment.php:105 loop.php:144 loop-page.php:29 loop-single.php:34
msgid "Pages:"
#: archive.php:37
msgctxt "yearly archives date format"
msgid "Y"
msgstr ""
#. #-#-#-#-# twentyten.pot (Twenty Ten 1.3) #-#-#-#-#
#. Theme URI of the plugin/theme
#: footer.php:33
msgid "http://wordpress.org/"
#: archive.php:39
msgid "Blog Archives"
msgstr ""
#: footer.php:33
msgid "Semantic Personal Publishing Platform"
#: author.php:27
msgid "Author Archives: %s"
msgstr ""
#: footer.php:33
msgid "Proudly powered by %s."
#: author.php:37 loop-single.php:43
msgid "About %s"
msgstr ""
#: category.php:16
msgid "Category Archives: %s"
msgstr ""
#: sidebar.php:27
msgid "Archives"
msgstr ""
#: sidebar.php:34
msgid "Meta"
msgstr ""
#: tag.php:16
msgid "Tag Archives: %s"
msgstr ""
#: comments.php:18
msgid ""
"This post is password protected. Enter the password to view any comments."
......@@ -107,80 +83,18 @@ msgstr ""
msgid "Comments are closed."
msgstr ""
#: 404.php:16 loop.php:33
msgid "Not Found"
msgstr ""
#: 404.php:18
msgid ""
"Apologies, but the page you requested could not be found. Perhaps searching "
"will help."
msgstr ""
#: loop.php:25 loop.php:178
msgid "<span class=\"meta-nav\">&larr;</span> Older posts"
msgstr ""
#: loop.php:26 loop.php:179
msgid "Newer posts <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: loop.php:35
msgid ""
"Apologies, but no results were found for the requested archive. Perhaps "
"searching will help find a related post."
msgstr ""
#: loop.php:60 loop.php:95 loop.php:96
msgctxt "gallery category slug"
msgid "gallery"
msgstr ""
#: loop.php:62 loop.php:83 loop.php:131
msgid "Permalink to %s"
msgstr ""
#: loop.php:82
msgid "This gallery contains <a %1$s>%2$s photo</a>."
msgid_plural "This gallery contains <a %1$s>%2$s photos</a>."
msgstr[0] ""
msgstr[1] ""
#: loop.php:93
msgid "View Galleries"
msgstr ""
#: loop.php:93 loop.php:96
msgid "More Galleries"
msgstr ""
#: loop.php:96
msgid "View posts in the Gallery category"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "Leave a comment"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "1 Comment"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "% Comments"
msgstr ""
#: loop.php:106
msgctxt "asides category slug"
msgid "asides"
#. #-#-#-#-# twentyten.pot (Twenty Ten 1.3) #-#-#-#-#
#. Theme URI of the plugin/theme
#: footer.php:33
msgid "http://wordpress.org/"
msgstr ""
#: loop.php:151
msgid "<span class=\"%1$s\">Posted in</span> %2$s"
#: footer.php:33
msgid "Semantic Personal Publishing Platform"
msgstr ""
#: loop.php:160
msgid "<span class=\"%1$s\">Tagged</span> %2$s"
#: footer.php:33
msgid "Proudly powered by %s."
msgstr ""
#: functions.php:100
......@@ -227,6 +141,10 @@ msgstr ""
msgid "Sunset"
msgstr ""
#: functions.php:248 loop-attachment.php:104 loop.php:115 loop.php:143
msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: functions.php:330
msgid "%s <span class=\"says\">says:</span>"
msgstr ""
......@@ -302,6 +220,10 @@ msgid ""
"span> %3$s"
msgstr ""
#: functions.php:476 loop-attachment.php:36
msgid "View all posts by %s"
msgstr ""
#: functions.php:493
msgid ""
"This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" "
......@@ -328,26 +250,38 @@ msgstr ""
msgid "Skip to content"
msgstr ""
#: author.php:27
msgid "Author Archives: %s"
#: loop-attachment.php:21
msgid "Return to %s"
msgstr ""
#: author.php:37 loop-single.php:43
msgid "About %s"
#. translators: %s - title of parent post
#: loop-attachment.php:23
msgid "<span class=\"meta-nav\">&larr;</span> %s"
msgstr ""
#: search.php:16
msgid "Search Results for: %s"
#: loop-attachment.php:32
msgid "<span class=\"%1$s\">By</span> %2$s"
msgstr ""
#: search.php:26
msgid "Nothing Found"
#: loop-attachment.php:43
msgid "<span class=\"%1$s\">Published</span> %2$s"
msgstr ""
#: search.php:28
msgid ""
"Sorry, but nothing matched your search criteria. Please try again with some "
"different keywords."
#: loop-attachment.php:53
msgid "Full size is %s pixels"
msgstr ""
#: loop-attachment.php:56
msgid "Link to full-size image"
msgstr ""
#: loop-attachment.php:63 loop-attachment.php:111 loop-page.php:30
#: loop-single.php:56 loop.php:100 loop.php:123 loop.php:165
msgid "Edit"
msgstr ""
#: loop-attachment.php:105 loop-page.php:29 loop-single.php:34 loop.php:144
msgid "Pages:"
msgstr ""
#: loop-single.php:21 loop-single.php:61
......@@ -364,30 +298,96 @@ msgstr ""
msgid "View all posts by %s <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: archive.php:33
msgid "Daily Archives: <span>%s</span>"
#: loop.php:25 loop.php:178
msgid "<span class=\"meta-nav\">&larr;</span> Older posts"
msgstr ""
#: archive.php:35
msgid "Monthly Archives: <span>%s</span>"
#: loop.php:26 loop.php:179
msgid "Newer posts <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: archive.php:35
msgctxt "monthly archives date format"
msgid "F Y"
#: loop.php:35
msgid ""
"Apologies, but no results were found for the requested archive. Perhaps "
"searching will help find a related post."
msgstr ""
#: archive.php:37
msgid "Yearly Archives: <span>%s</span>"
#: loop.php:60 loop.php:95 loop.php:96
msgctxt "gallery category slug"
msgid "gallery"
msgstr ""
#: archive.php:37
msgctxt "yearly archives date format"
msgid "Y"
#: loop.php:62 loop.php:83 loop.php:131
msgid "Permalink to %s"
msgstr ""
#: archive.php:39
msgid "Blog Archives"
#: loop.php:82
msgid "This gallery contains <a %1$s>%2$s photo</a>."
msgid_plural "This gallery contains <a %1$s>%2$s photos</a>."
msgstr[0] ""
msgstr[1] ""
#: loop.php:93
msgid "View Galleries"
msgstr ""
#: loop.php:93 loop.php:96
msgid "More Galleries"
msgstr ""
#: loop.php:96
msgid "View posts in the Gallery category"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "Leave a comment"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "1 Comment"
msgstr ""
#: loop.php:99 loop.php:122 loop.php:164
msgid "% Comments"
msgstr ""
#: loop.php:106
msgctxt "asides category slug"
msgid "asides"
msgstr ""
#: loop.php:151
msgid "<span class=\"%1$s\">Posted in</span> %2$s"
msgstr ""
#: loop.php:160
msgid "<span class=\"%1$s\">Tagged</span> %2$s"
msgstr ""
#: search.php:16
msgid "Search Results for: %s"
msgstr ""
#: search.php:26
msgid "Nothing Found"
msgstr ""
#: search.php:28
msgid ""
"Sorry, but nothing matched your search criteria. Please try again with some "
"different keywords."
msgstr ""
#: sidebar.php:27
msgid "Archives"
msgstr ""
#: sidebar.php:34
msgid "Meta"
msgstr ""
#: tag.php:16
msgid "Tag Archives: %s"
msgstr ""
#. Theme Name of the plugin/theme
......
......@@ -1350,9 +1350,17 @@ function antispambot($emailaddy, $mailto=0) {
*/
function _make_url_clickable_cb($matches) {
$url = $matches[2];
$suffix = '';
/** Include parentheses in the URL only if paired **/
if ( ')' == $matches[3] && strpos( $url, '(' ) ) {
// If the trailing character is a closing parethesis, and the URL has an opening parenthesis in it, add the closing parenthesis to the URL.
// Then we can let the parenthesis balancer do its thing below.
$url .= $matches[3];
$suffix = '';
} else {
$suffix = $matches[3];
}
// Include parentheses in the URL only if paired
while ( substr_count( $url, '(' ) < substr_count( $url, ')' ) ) {
$suffix = strrchr( $url, ')' ) . $suffix;
$url = substr( $url, 0, strrpos( $url, ')' ) );
......@@ -1418,23 +1426,117 @@ function _make_email_clickable_cb($matches) {
*
* @since 0.71
*
* @param string $ret Content to convert URIs.
* @param string $text Content to convert URIs.
* @return string Content with converted URIs.
*/
function make_clickable($ret) {
$ret = ' ' . $ret;
// in testing, using arrays here was found to be faster
$save = @ini_set('pcre.recursion_limit', 10000);
$retval = preg_replace_callback('#(?<!=[\'"])(?<=[*\')+.,;:!&$\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#%~/?@\[\]-]{1,2000}|[\'*(+.,;:!=&$](?![\b\)]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);
if (null !== $retval )
$ret = $retval;
@ini_set('pcre.recursion_limit', $save);
$ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret);
$ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);
// this one is not in an array because we need it to run last, for cleanup of accidental links within links
$ret = preg_replace("#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i", "$1$3</a>", $ret);
$ret = trim($ret);
return $ret;
function make_clickable( $text ) {
$r = '';
$textarr = preg_split( '/(<[^<>]+>)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // split out HTML tags
foreach ( $textarr as $piece ) {
if ( empty( $piece ) || ( $piece[0] == '<' && ! preg_match('|^<\s*[\w]{1,20}+://|', $piece) ) ) {
$r .= $piece;
continue;
}
// Long strings might contain expensive edge cases ...
if ( 10000 < strlen( $piece ) ) {
// ... break it up
foreach ( _split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses
if ( 2101 < strlen( $chunk ) ) {
$r .= $chunk; // Too big, no whitespace: bail.
} else {
$r .= make_clickable( $chunk );
}
}
} else {
$ret = " $piece "; // Pad with whitespace to simplify the regexes
$url_clickable = '~
([\\s(<.,;:!?]) # 1: Leading whitespace, or punctuation
( # 2: URL
[\\w]{1,20}+:// # Scheme and hier-part prefix
(?=\S{1,2000}\s) # Limit to URLs less than about 2000 characters long
[\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]*+ # Non-punctuation URL character
(?: # Unroll the Loop: Only allow puctuation URL character if followed by a non-punctuation URL character
[\'.,;:!?)] # Punctuation URL character
[\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]++ # Non-punctuation URL character
)*
)
(\)?) # 3: Trailing closing parenthesis (for parethesis balancing post processing)
~xS'; // The regex is a non-anchored pattern and does not have a single fixed starting character.
// Tell PCRE to spend more time optimizing since, when used on a page load, it will probably be used several times.
$ret = preg_replace_callback( $url_clickable, '_make_url_clickable_cb', $ret );
$ret = preg_replace_callback( '#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret );
$ret = preg_replace_callback( '#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret );
$ret = substr( $ret, 1, -1 ); // Remove our whitespace padding.
$r .= $ret;
}
}
// Cleanup of accidental links within links
$r = preg_replace( '#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', "$1$3</a>", $r );
return $r;
}
/**
* Breaks a string into chunks by splitting at whitespace characters.
* The length of each returned chunk is as close to the specified length goal as possible,
* with the caveat that each chunk includes its trailing delimiter.
* Chunks longer than the goal are guaranteed to not have any inner whitespace.
*
* Joining the returned chunks with empty delimiters reconstructs the input string losslessly.
*
* Input string must have no null characters (or eventual transformations on output chunks must not care about null characters)
*
* <code>
* _split_str_by_whitespace( "1234 67890 1234 67890a cd 1234 890 123456789 1234567890a 45678 1 3 5 7 90 ", 10 ) ==
* array (
* 0 => '1234 67890 ', // 11 characters: Perfect split
* 1 => '1234 ', // 5 characters: '1234 67890a' was too long
* 2 => '67890a cd ', // 10 characters: '67890a cd 1234' was too long
* 3 => '1234 890 ', // 11 characters: Perfect split
* 4 => '123456789 ', // 10 characters: '123456789 1234567890a' was too long
* 5 => '1234567890a ', // 12 characters: Too long, but no inner whitespace on which to split
* 6 => ' 45678 ', // 11 characters: Perfect split
* 7 => '1 3 5 7 9', // 9 characters: End of $string
* );
* </code>
*
* @since 3.4.0
* @access private
*
* @param string $string The string to split
* @param int $goal The desired chunk length.
* @return array Numeric array of chunks.
*/
function _split_str_by_whitespace( $string, $goal ) {
$chunks = array();
$string_nullspace = strtr( $string, "\r\n\t\v\f ", "\000\000\000\000\000\000" );
while ( $goal < strlen( $string_nullspace ) ) {
$pos = strrpos( substr( $string_nullspace, 0, $goal + 1 ), "\000" );
if ( false === $pos ) {
$pos = strpos( $string_nullspace, "\000", $goal + 1 );
if ( false === $pos ) {
break;
}
}
$chunks[] = substr( $string, 0, $pos + 1 );
$string = substr( $string, $pos + 1 );