Commit 4915808a authored by lechuck's avatar lechuck Committed by lechuck

Upgrade Wordpress 3.5.1

parent e9fe79a9
......@@ -8,7 +8,7 @@
<body>
<h1 id="logo">
<a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
<br /> Version 3.5
<br /> Version 3.5.1
</h1>
<p style="text-align: center">Semantic Personal Publishing Platform</p>
......
......@@ -33,6 +33,14 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
</a>
</h2>
<div class="changelog point-releases">
<h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 1 ); ?></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.', 37 ), '3.5.1', number_format_i18n( 37 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.5.1' ); ?>
</p>
</div>
<div class="changelog">
<h3><?php _e( 'New Media Manager' ); ?></h3>
......
......@@ -3533,14 +3533,6 @@ div.tabs-panel-inactive {
display:none;
}
.customlinkdiv ul,
.posttypediv ul,
.taxonomydiv ul {
list-style: none;
padding: 0;
margin: 0;
}
#front-page-warning,
#front-static-pages ul,
ul.export-filters,
......@@ -8455,7 +8447,7 @@ a.widget-control-edit {
}
.sorting-indicator {
background-image: url('../images/sort-2x.gif');
background-image: url('../images/sort-2x.gif?ver=20130102');
background-size: 14px 4px;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
wp-admin/images/sort-2x.gif

189 Bytes | W: | H:

wp-admin/images/sort-2x.gif

97 Bytes | W: | H:

wp-admin/images/sort-2x.gif
wp-admin/images/sort-2x.gif
wp-admin/images/sort-2x.gif
wp-admin/images/sort-2x.gif
  • 2-up
  • Swipe
  • Onion skin
......@@ -692,7 +692,7 @@ function wp_save_image( $post_id ) {
$_sizes[ $size ] = array( 'width' => get_option("{$size}_size_w"), 'height' => get_option("{$size}_size_h"), 'crop' => $crop );
}
$meta['sizes'] = $img->multi_resize( $_sizes );
$meta['sizes'] = array_merge( $meta['sizes'], $img->multi_resize( $_sizes ) );
}
unset( $img );
......
......@@ -1417,6 +1417,9 @@ function get_compat_media_markup( $attachment_id, $args = null ) {
$item .= '<input type="hidden" name="' . esc_attr( $hidden_field ) . '" value="' . esc_attr( $value ) . '" />' . "\n";
}
if ( $item )
$item = '<input type="hidden" name="attachments[' . $attachment_id . '][menu_order]" value="' . esc_attr( $post->menu_order ) . '" />' . $item;
return array(
'item' => $item,
'meta' => $media_meta,
......
......@@ -535,6 +535,7 @@ $_old_files = array(
'wp-includes/js/jquery/ui/jquery.effects.pulsate.min.js',
'wp-includes/js/jquery/ui/jquery.effects.transfer.min.js',
'wp-includes/js/jquery/ui/jquery.effects.fold.min.js',
'wp-admin/options-privacy.php',
);
/**
......@@ -630,7 +631,8 @@ function update_core($from, $to) {
}
// Import $wp_version, $required_php_version, and $required_mysql_version from the new version
$versions_file = $wp_filesystem->wp_content_dir() . 'upgrade/version-current.php';
// $wp_filesystem->wp_content_dir() returned unslashed pre-2.8
$versions_file = trailingslashit( $wp_filesystem->wp_content_dir() ) . 'upgrade/version-current.php';
if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $versions_file ) ) {
$wp_filesystem->delete( $from, true );
return new WP_Error( 'copy_failed', __('Could not copy file.') );
......@@ -691,6 +693,15 @@ function update_core($from, $to) {
}
}
// 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users, preventing installation of Twenty Twelve.
if ( '3.5' == $old_wp_version ) {
if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) && ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' ) ) {
// Bumping the introduced version to 3.5.1 for the affected users causes Twenty Twelve to be installed for the first time
if ( $wp_filesystem->delete( $wp_filesystem->wp_themes_dir() . 'twentytwelve/' ) )
$_new_bundled_files[ 'themes/twentytwelve/' ] = '3.5.1';
}
}
// Copy New bundled plugins & themes
// This gives us the ability to install new plugins & themes bundled with future versions of WordPress whilst avoiding the re-install upon upgrade issue.
// $development_build controls us overwriting bundled themes and plugins when a non-stable release is being updated
......@@ -701,6 +712,10 @@ function update_core($from, $to) {
$directory = ('/' == $file[ strlen($file)-1 ]);
list($type, $filename) = explode('/', $file, 2);
// Check to see if the bundled items exist before attempting to copy them
if ( ! $wp_filesystem->exists( $from . $distro . 'wp-content/' . $file ) )
continue;
if ( 'plugins' == $type )
$dest = $wp_filesystem->wp_plugins_dir();
elseif ( 'themes' == $type )
......
......@@ -165,9 +165,11 @@ tagBox = {
// tag cloud
$('a.tagcloud-link').click(function(){
if ( ! $('.the-tagcloud').length )
tagBox.get( $(this).attr('id') );
$(this).siblings('.the-tagcloud').toggle();
tagBox.get( $(this).attr('id') );
$(this).unbind().click(function(){
$(this).siblings('.the-tagcloud').toggle();
return false;
});
return false;
});
}
......@@ -685,7 +687,7 @@ jQuery(document).ready( function($) {
(function() {
var textarea = $('textarea#content'), offset = null, el;
// No point for touch devices
if ( 'ontouchstart' in window )
if ( !textarea.length || 'ontouchstart' in window )
return;
function dragging(e) {
......@@ -694,14 +696,15 @@ jQuery(document).ready( function($) {
}
function endDrag(e) {
var height = $('#wp-content-editor-container').height();
var height;
textarea.focus();
$(document).unbind('mousemove', dragging).unbind('mouseup', endDrag);
height -= 33; // compensate for toolbars, padding...
height = parseInt( textarea.css('height'), 10 );
// sanity check
if ( height > 50 && height < 5000 && height != getUserSetting( 'ed_size' ) )
if ( height && height > 50 && height < 5000 )
setUserSetting( 'ed_size', height );
}
......@@ -722,44 +725,67 @@ jQuery(document).ready( function($) {
if ( ed.id != 'content' || tinymce.isIOS5 )
return;
function getHeight() {
var height, node = document.getElementById('content_ifr'),
ifr_height = node ? parseInt( node.style.height, 10 ) : 0,
tb_height = $('#content_tbl tr.mceFirst').height();
if ( !ifr_height || !tb_height )
return false;
// total height including toolbar and statusbar
height = ifr_height + tb_height + 21;
// textarea height = total height - 33px toolbar
height -= 33;
return height;
}
// resize TinyMCE to match the textarea height when switching Text -> Visual
ed.onLoadContent.add( function(ed, o) {
var ifr_height, height = parseInt( $('#content').css('height'), 10 ),
tb_height = $('#content_tbl tr.mceFirst').height();
var ifr_height, node = document.getElementById('content'),
height = node ? parseInt( node.style.height, 10 ) : 0,
tb_height = $('#content_tbl tr.mceFirst').height() || 33;
if ( height && !isNaN(height) && tb_height ) {
ifr_height = (height - tb_height) + 12; // compensate for padding in the textarea
// sanity check
if ( ifr_height > 50 && ifr_height < 5000 ) {
$('#content_tbl').css('height', '' );
$('#content_ifr').css('height', ifr_height + 'px' );
}
// height cannot be under 50 or over 5000
if ( !height || height < 50 || height > 5000 )
height = 360; // default height for the main editor
if ( getUserSetting( 'ed_size' ) > 5000 )
setUserSetting( 'ed_size', 360 );
// compensate for padding and toolbars
ifr_height = ( height - tb_height ) + 12;
// sanity check
if ( ifr_height > 50 && ifr_height < 5000 ) {
$('#content_tbl').css('height', '' );
$('#content_ifr').css('height', ifr_height + 'px' );
}
});
// resize the textarea to match TinyMCE's height when switching Visual -> Text
ed.onSaveContent.add( function(ed, o) {
var height = $('#content_tbl').height();
var height = getHeight();
if ( height && height > 83 && height < 5000 ) {
height -= 33;
if ( !height || height < 50 || height > 5000 )
return;
$('#content').css( 'height', height + 'px' );
}
$('textarea#content').css( 'height', height + 'px' );
});
// save on resizing TinyMCE
ed.onPostRender.add(function() {
$('#content_resize').on('mousedown.wp-mce-resize', function(e){
$(document).on('mouseup.wp-mce-resize', function(e){
var height = $('#wp-content-editor-container').height();
var height;
$(document).off('mouseup.wp-mce-resize');
height -= 33;
height = getHeight();
// sanity check
if ( height > 50 && height < 5000 && height != getUserSetting( 'ed_size' ) )
if ( height && height > 50 && height < 5000 )
setUserSetting( 'ed_size', height );
$(document).off('mouseup.wp-mce-resize');
});
});
});
......
This diff is collapsed.
......@@ -312,11 +312,12 @@ function network_step2( $errors = false ) {
$hostname = get_clean_basedomain();
$slashed_home = trailingslashit( get_option( 'home' ) );
$base = parse_url( $slashed_home, PHP_URL_PATH );
$wp_dir_from_root = preg_replace( '#^' . preg_quote( $_SERVER['DOCUMENT_ROOT'], '#' ) . '#', '', ABSPATH );
$wp_siteurl_subdir = trailingslashit( '/' . preg_replace( '#^' . preg_quote( $base, '#' ) . '#', '', $wp_dir_from_root ) );
$document_root_fix = str_replace( '\\', '/', realpath( $_SERVER['DOCUMENT_ROOT'] ) );
$abspath_fix = str_replace( '\\', '/', ABSPATH );
$home_path = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : str_replace( '\\', '/', get_home_path() );
$wp_siteurl_subdir = preg_replace( '#^' . preg_quote( $home_path, '#' ) . '#', '', $abspath_fix );
$rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : '';
$home_path = get_home_path();
$location_of_wp_config = ABSPATH;
if ( ! file_exists( ABSPATH . 'wp-config.php' ) && file_exists( dirname( ABSPATH ) . '/wp-config.php' ) )
......@@ -411,8 +412,7 @@ define('BLOG_ID_CURRENT_SITE', 1);
$iis_rewrite_base = ltrim( $base, '/' ) . $rewrite_base;
$iis_subdir_replacement = $subdomain_install ? '' : '{R:1}';
$web_config_file = <<<EOF
<?xml version="1.0" encoding="UTF-8"?>
$web_config_file = '<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
......@@ -424,14 +424,14 @@ define('BLOG_ID_CURRENT_SITE', 1);
if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) {
$web_config_file .= '
<rule name="WordPress Rule for Files" stopProcessing="true">
<match url="^{$iis_subdir_match}files/(.+)" ignoreCase="false" />
<action type="Rewrite" url="{$iis_rewrite_base}wp-includes/ms-files.php?file={R:1}" appendQueryString="false" />
<match url="^' . $iis_subdir_match . 'files/(.+)" ignoreCase="false" />
<action type="Rewrite" url="' . $iis_rewrite_base . 'wp-includes/ms-files.php?file={R:1}" appendQueryString="false" />
</rule>';
}
$web_config_file .= '
<rule name="WordPress Rule 2" stopProcessing="true">
<match url="^{$iis_subdir_match}wp-admin$" ignoreCase="false" />
<action type="Redirect" url="{$iis_subdir_replacement}wp-admin/" redirectType="Permanent" />
<match url="^' . $iis_subdir_match . 'wp-admin$" ignoreCase="false" />
<action type="Redirect" url="' . $iis_subdir_replacement . 'wp-admin/" redirectType="Permanent" />
</rule>
<rule name="WordPress Rule 3" stopProcessing="true">
<match url="^" ignoreCase="false" />
......@@ -442,12 +442,12 @@ define('BLOG_ID_CURRENT_SITE', 1);
<action type="None" />
</rule>
<rule name="WordPress Rule 4" stopProcessing="true">
<match url="^{$iis_subdir_match}(wp-(content|admin|includes).*)" ignoreCase="false" />
<action type="Rewrite" url="{$iis_rewrite_base}{R:1}" />
<match url="^' . $iis_subdir_match . '(wp-(content|admin|includes).*)" ignoreCase="false" />
<action type="Rewrite" url="' . $iis_rewrite_base . '{R:1}" />
</rule>
<rule name="WordPress Rule 5" stopProcessing="true">
<match url="^{$iis_subdir_match}([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
<action type="Rewrite" url="{$iis_rewrite_base}{R:2}" />
<match url="^' . $iis_subdir_match . '([_0-9a-zA-Z-]+/)?(.*\.php)$" ignoreCase="false" />
<action type="Rewrite" url="' . $iis_rewrite_base . '{R:2}" />
</rule>
<rule name="WordPress Rule 6" stopProcessing="true">
<match url="." ignoreCase="false" />
......@@ -456,8 +456,7 @@ define('BLOG_ID_CURRENT_SITE', 1);
</rules>
</rewrite>
</system.webServer>
</configuration>
EOF;
</configuration>';
?>
<li><p><?php printf( __( 'Add the following to your <code>web.config</code> file in <code>%s</code>, replacing other WordPress rules:' ), $home_path ); ?></p>
......
Order Deny,Allow
Deny from all
<FilesMatch "^akismet\.(css|js)$">
Allow from all
</FilesMatch>
\ No newline at end of file
......@@ -23,7 +23,6 @@ function akismet_admin_init() {
$hook = get_plugin_page_hook( 'akismet-stats-display', 'index.php' );
else
$hook = 'dashboard_page_akismet-stats-display';
add_action('admin_head-'.$hook, 'akismet_stats_script');
add_meta_box('akismet-status', __('Comment History'), 'akismet_comment_status_meta_box', 'comment', 'normal');
}
add_action('admin_init', 'akismet_admin_init');
......@@ -56,7 +55,7 @@ $akismet_nonce = 'akismet-update-key';
function akismet_plugin_action_links( $links, $file ) {
if ( $file == plugin_basename( dirname(__FILE__).'/akismet.php' ) ) {
$links[] = '<a href="admin.php?page=akismet-key-config">'.__('Settings').'</a>';
$links[] = '<a href="' . admin_url( 'admin.php?page=akismet-key-config' ) . '">'.__( 'Settings' ).'</a>';
}
return $links;
......@@ -240,23 +239,6 @@ function akismet_conf() {
<?php
}
function akismet_stats_script() {
?>
<script type="text/javascript">
function resizeIframe() {
document.getElementById('akismet-stats-frame').style.height = "2500px";
};
function resizeIframeInit() {
document.getElementById('akismet-stats-frame').onload = resizeIframe;
window.onresize = resizeIframe;
}
addLoadEvent(resizeIframeInit);
</script><?php
}
function akismet_stats_display() {
global $akismet_api_host, $akismet_api_port, $wpcom_api_key;
$blog = urlencode( get_bloginfo('url') );
......@@ -269,7 +251,7 @@ function akismet_stats_display() {
$url .= "?blog={$blog}&api_key=" . akismet_get_key();
?>
<div class="wrap">
<iframe src="<?php echo $url; ?>" width="100%" height="100%" frameborder="0" id="akismet-stats-frame"></iframe>
<iframe src="<?php echo $url; ?>" width="100%" height="2500px" frameborder="0" id="akismet-stats-frame"></iframe>
</div>
<?php
}
......@@ -329,7 +311,7 @@ function akismet_admin_warnings() {
function akismet_warning() {
global $wpdb;
akismet_fix_scheduled_recheck();
$waiting = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->commentmeta WHERE meta_key = 'akismet_error'" ) );
$waiting = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->commentmeta WHERE meta_key = 'akismet_error'" );
$next_check = wp_next_scheduled('akismet_schedule_cron_recheck');
if ( $waiting > 0 && $next_check > time() )
echo "
......@@ -741,7 +723,8 @@ function akismet_recheck_queue() {
delete_comment_meta( $c['comment_ID'], 'akismet_rechecking' );
}
wp_safe_redirect( $_SERVER['HTTP_REFERER'] );
$redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : admin_url( 'edit-comments.php' );
wp_safe_redirect( $redirect_to );
exit;
}
......
......@@ -74,6 +74,7 @@ jQuery(document).ready(function () {
return false;
});
jQuery('a[id^="author_comment_url"]').mouseover(function () {
var wpcomProtocol = ( 'https:' === location.protocol ) ? 'https://' : 'http://';
// Need to determine size of author column
var thisParentWidth = jQuery(this).parent().width();
// It changes based on if there is a gravatar present
......@@ -83,12 +84,12 @@ jQuery(document).ready(function () {
jQuery('.widefat td').css('overflow', 'visible');
jQuery(this).css('position', 'relative');
var thisHref = jQuery.URLEncode(jQuery(this).attr('href'));
jQuery(this).append('<div class="mShot mshot-container" style="left: '+thisParentWidth+'"><div class="mshot-arrow"></div><img src="http://s.wordpress.com/mshots/v1/'+thisHref+'?w=450" width="450" class="mshot-image_'+thisId+'" style="margin: 0;" /></div>');
jQuery(this).append('<div class="mShot mshot-container" style="left: '+thisParentWidth+'"><div class="mshot-arrow"></div><img src="'+wpcomProtocol+'s0.wordpress.com/mshots/v1/'+thisHref+'?w=450" width="450" class="mshot-image_'+thisId+'" style="margin: 0;" /></div>');
setTimeout(function () {
jQuery('.mshot-image_'+thisId).attr('src', 'http://s.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=2');
jQuery('.mshot-image_'+thisId).attr('src', wpcomProtocol+'s0.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=2');
}, 6000);
setTimeout(function () {
jQuery('.mshot-image_'+thisId).attr('src', 'http://s.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=3');
jQuery('.mshot-image_'+thisId).attr('src', wpcomProtocol+'s0.wordpress.com/mshots/v1/'+thisHref+'?w=450&r=3');
}, 12000);
} else {
jQuery(this).find('.mShot').css('left', thisParentWidth).show();
......@@ -106,7 +107,8 @@ jQuery.extend({URLEncode:function(c){var o='';var x=0;c=c.toString();var r=/(^[a
});
// Preload mshot images after everything else has loaded
jQuery(window).load(function() {
var wpcomProtocol = ( 'https:' === location.protocol ) ? 'https://' : 'http://';
jQuery('a[id^="author_comment_url"]').each(function () {
jQuery.get('http://s.wordpress.com/mshots/v1/'+jQuery.URLEncode(jQuery(this).attr('href'))+'?w=450');
jQuery.get(wpcomProtocol+'s0.wordpress.com/mshots/v1/'+jQuery.URLEncode(jQuery(this).attr('href'))+'?w=450');
});
});
\ No newline at end of file
});
......@@ -5,8 +5,8 @@
/*
Plugin Name: Akismet
Plugin URI: http://akismet.com/?return=true
Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from comment and trackback spam</strong>. It keeps your site protected from spam even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) <a href="http://akismet.com/get/?return=true">Sign up for an Akismet API key</a>, and 3) Go to your <a href="admin.php?page=akismet-key-config">Akismet configuration</a> page, and save your API key.
Version: 2.5.6
Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from comment and trackback spam</strong>. It keeps your site protected from spam even while you sleep. To get started: 1) Click the "Activate" link to the left of this description, 2) <a href="http://akismet.com/get/?return=true">Sign up for an Akismet API key</a>, and 3) Go to your Akismet configuration page, and save your API key.
Version: 2.5.7
Author: Automattic
Author URI: http://automattic.com/wordpress-plugins/
License: GPLv2 or later
......@@ -28,7 +28,13 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
define('AKISMET_VERSION', '2.5.6');
// Make sure we don't expose any info if called directly
if ( !function_exists( 'add_action' ) ) {
echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
exit;
}
define('AKISMET_VERSION', '2.5.7');
define('AKISMET_PLUGIN_URL', plugin_dir_url( __FILE__ ));
/** If you hardcode a WP.com API key here, all key config screens will be hidden */
......@@ -37,12 +43,6 @@ if ( defined('WPCOM_API_KEY') )
else
$wpcom_api_key = '';
// Make sure we don't expose any info if called directly
if ( !function_exists( 'add_action' ) ) {
echo "Hi there! I'm just a plugin, not much I can do when called directly.";
exit;
}
if ( isset($wp_db_version) && $wp_db_version <= 9872 )
include_once dirname( __FILE__ ) . '/legacy.php';
......@@ -110,7 +110,7 @@ function akismet_test_mode() {
}
// return a comma-separated list of role names for the given user
function akismet_get_user_roles($user_id ) {
function akismet_get_user_roles( $user_id ) {
$roles = false;
if ( !class_exists('WP_User') )
......@@ -277,10 +277,13 @@ function akismet_auto_check_update_meta( $id, $comment ) {
if ( !function_exists('add_comment_meta') )
return false;
if ( !isset( $akismet_last_comment['comment_author_email'] ) )
$akismet_last_comment['comment_author_email'] = '';
// wp_insert_comment() might be called in other contexts, so make sure this is the same comment
// as was checked by akismet_auto_check_comment
if ( is_object($comment) && !empty($akismet_last_comment) && is_array($akismet_last_comment) ) {
if ( intval($akismet_last_comment['comment_post_ID']) == intval($comment->comment_post_ID)
if ( isset($akismet_last_comment['comment_post_ID']) && intval($akismet_last_comment['comment_post_ID']) == intval($comment->comment_post_ID)
&& $akismet_last_comment['comment_author'] == $comment->comment_author
&& $akismet_last_comment['comment_author_email'] == $comment->comment_author_email ) {
// normal result: true or false
......@@ -319,15 +322,15 @@ function akismet_auto_check_comment( $commentdata ) {
$comment = $commentdata;
$comment['user_ip'] = $_SERVER['REMOTE_ADDR'];
$comment['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
$comment['referrer'] = $_SERVER['HTTP_REFERER'];
$comment['user_agent'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
$comment['referrer'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
$comment['blog'] = get_option('home');
$comment['blog_lang'] = get_locale();
$comment['blog_charset'] = get_option('blog_charset');
$comment['permalink'] = get_permalink($comment['comment_post_ID']);
if ( !empty( $comment['user_ID'] ) ) {
$comment['user_role'] = akismet_get_user_roles($comment['user_ID']);
$comment['user_role'] = akismet_get_user_roles( $comment['user_ID'] );
}
$akismet_nonce_option = apply_filters( 'akismet_comment_nonce', get_option( 'akismet_comment_nonce' ) );
......@@ -370,6 +373,7 @@ function akismet_auto_check_comment( $commentdata ) {
$commentdata['comment_as_submitted'] = $comment;
$response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);
do_action( 'akismet_comment_check_response', $response );
akismet_update_alert( $response );
$commentdata['akismet_result'] = $response[1];
if ( 'true' == $response[1] ) {
......@@ -386,7 +390,8 @@ function akismet_auto_check_comment( $commentdata ) {
// akismet_result_spam() won't be called so bump the counter here
if ( $incr = apply_filters('akismet_spam_count_incr', 1) )
update_option( 'akismet_spam_count', get_option('akismet_spam_count') + $incr );
wp_safe_redirect( $_SERVER['HTTP_REFERER'] );
$redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : get_permalink( $post );
wp_safe_redirect( $redirect_to );
die();
}
}
......@@ -498,7 +503,7 @@ function akismet_check_db_comment( $id, $recheck_reason = 'recheck_queue' ) {
$query_string .= $key . '=' . urlencode( stripslashes($data) ) . '&';
$response = akismet_http_post($query_string, $akismet_api_host, '/1.1/comment-check', $akismet_api_port);
return $response[1];
return ( is_array( $response ) && isset( $response[1] ) ) ? $response[1] : false;
}
function akismet_cron_recheck() {
......@@ -565,7 +570,7 @@ function akismet_cron_recheck() {
delete_comment_meta( $comment_id, 'akismet_rechecking' );
}
$remaining = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->commentmeta WHERE meta_key = 'akismet_error'" ) );
$remaining = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->commentmeta WHERE meta_key = 'akismet_error'" );
if ( $remaining && !wp_next_scheduled('akismet_schedule_cron_recheck') ) {
wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
}
......
......@@ -2,8 +2,8 @@
Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, automattic
Tags: akismet, comments, spam
Requires at least: 3.0
Tested up to: 3.4
Stable tag: 2.5.6
Tested up to: 3.5
Stable tag: 2.5.7
License: GPLv2 or later
Akismet checks your comments against the Akismet web service to see if they look like spam or not.
......@@ -31,6 +31,15 @@ Upload the Akismet plugin to your blog, Activate it, then enter your [Akismet.co
== Changelog ==
= 2.5.7 =
* FireFox Stats iframe preview bug
* Fix mshots preview when using https
* Add .htaccess to block direct access to files
* Prevent some PHP notices
* Fix Check For Spam return location when referrer is empty
* Fix Settings links for network admins
* Fix prepare() warnings in WP 3.5
= 2.5.6 =
* Prevent retry scheduling problems on sites where wp_cron is misbehaving
* Preload mshot previews
......
# Copyright (C) 2012 the WordPress team
# Copyright (C) 2013 the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Eleven 1.5\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentyeleven\n"
"POT-Creation-Date: 2012-12-07 21:19:12+00:00\n"
"POT-Creation-Date: 2013-01-01 00:19:40+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
# Copyright (C) 2012 the WordPress team
# Copyright (C) 2013 the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Twelve 1.1\n"
"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentytwelve\n"
"POT-Creation-Date: 2012-12-07 21:19:18+00:00\n"
"POT-Creation-Date: 2013-01-01 00:19:44+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2013-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -141,7 +141,7 @@ class WP_Http {
// Force some settings if we are streaming to a file and check for existence and perms of destination directory
if ( $r['stream'] ) {
$r['blocking'] = true;
if ( ! is_writable( dirname( $r['filename'] ) ) )