From bfa3b629e0d67016ec83050c5db762479af40609 Mon Sep 17 00:00:00 2001 From: donncha Date: Wed, 13 Aug 2008 15:13:05 +0000 Subject: Merge with WP revision 8635 git-svn-id: http://svn.automattic.com/wordpress-mu/branches/2.6@1421 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/Text/Diff.php | 3 +- wp-includes/Text/Diff/Renderer/inline.php | 4 +- wp-includes/bookmark-template.php | 2 +- wp-includes/canonical.php | 3 +- wp-includes/classes.php | 2 +- wp-includes/cron.php | 1 + wp-includes/functions.php | 29 +- wp-includes/images/blank.gif | Bin 0 -> 43 bytes wp-includes/js/jquery/jquery.dimensions.min.js | 12 - wp-includes/js/thickbox/macFFBgHack.png | Bin 0 -> 207 bytes .../js/tinymce/plugins/wordpress/popups.css | 354 --------------------- .../js/tinymce/plugins/wpeditimage/editimage.html | 6 +- .../tinymce/plugins/wpeditimage/editor_plugin.js | 2 +- .../js/tinymce/plugins/wpeditimage/js/editimage.js | 6 +- .../themes/advanced/skins/wp_theme/content.css | 4 +- wp-includes/js/tinymce/tiny_mce_config.php | 6 +- wp-includes/js/tinymce/wordpress.css | 14 - wp-includes/js/wp-ajax.js | 100 ------ wp-includes/js/wp-lists.js | 2 + wp-includes/kses.php | 27 +- wp-includes/l10n.php | 16 +- wp-includes/link-template.php | 4 +- wp-includes/media.php | 3 - wp-includes/pluggable.php | 6 - wp-includes/post.php | 7 +- wp-includes/query.php | 6 +- wp-includes/rewrite.php | 20 +- wp-includes/script-loader.php | 8 +- wp-includes/streams.php | 38 ++- wp-includes/taxonomy.php | 38 ++- wp-includes/theme.php | 9 +- wp-includes/update.php | 35 +- wp-includes/vars.php | 4 +- wp-includes/version.php | 6 +- wp-includes/widgets.php | 13 +- wp-includes/wp-diff.php | 6 +- 36 files changed, 198 insertions(+), 598 deletions(-) create mode 100644 wp-includes/images/blank.gif delete mode 100644 wp-includes/js/jquery/jquery.dimensions.min.js create mode 100644 wp-includes/js/thickbox/macFFBgHack.png delete mode 100644 wp-includes/js/tinymce/plugins/wordpress/popups.css delete mode 100644 wp-includes/js/wp-ajax.js (limited to 'wp-includes') diff --git a/wp-includes/Text/Diff.php b/wp-includes/Text/Diff.php index f8a974c..06d1c6c 100644 --- a/wp-includes/Text/Diff.php +++ b/wp-includes/Text/Diff.php @@ -49,7 +49,8 @@ class Text_Diff { $engine = basename($engine); } - require_once 'Text/Diff/Engine/' . $engine . '.php'; + // WP #7391 + require_once dirname(__FILE__).'/Diff/Engine/' . $engine . '.php'; $class = 'Text_Diff_Engine_' . $engine; $diff_engine = new $class(); diff --git a/wp-includes/Text/Diff/Renderer/inline.php b/wp-includes/Text/Diff/Renderer/inline.php index b547ff2..1493eaa 100644 --- a/wp-includes/Text/Diff/Renderer/inline.php +++ b/wp-includes/Text/Diff/Renderer/inline.php @@ -14,7 +14,9 @@ */ /** Text_Diff_Renderer */ -require_once 'Text/Diff/Renderer.php'; + +// WP #7391 +require_once dirname(dirname(__FILE__)) . '/Renderer.php'; /** * "Inline" diff renderer. diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index 9a2bd6d..b07daf2 100644 --- a/wp-includes/bookmark-template.php +++ b/wp-includes/bookmark-template.php @@ -76,7 +76,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) { if ( $show_updated ) if ( '00' != substr($bookmark->link_updated_f, 0, 2) ) { - $title .= ' '; + $title .= ' ('; $title .= sprintf(__('Last updated: %s'), date(get_option('links_updated_date_format'), $bookmark->link_updated_f + (get_option('gmt_offset') * 3600))); $title .= ')'; } diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index 4c58027..4c1e365 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -165,11 +165,12 @@ function redirect_canonical($requested_url=null, $do_redirect=true) { } else { foreach ( array('single', 'category', 'page', 'day', 'month', 'year') as $type ) { $func = 'is_' . $type; - if ( call_user_func($func) ) + if ( call_user_func($func) ) { $user_ts_type = $type; break; } } + } $redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type); } elseif ( is_home() ) { $redirect['path'] = trailingslashit($redirect['path']); diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 62196ee..3c3a4db 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -110,7 +110,7 @@ class WP { $query = preg_replace("!^.+\?!", '', $query); // Substitute the substring matches into the query. - eval("\$query = \"$query\";"); + eval("\$query = \"" . addslashes($query) . "\";"); $this->matched_query = $query; // Parse the query. diff --git a/wp-includes/cron.php b/wp-includes/cron.php index 1c17c76..0c45e34 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -133,6 +133,7 @@ function wp_cron() { function wp_get_schedules() { $schedules = array( 'hourly' => array( 'interval' => 3600, 'display' => __('Once Hourly') ), + 'twicedaily' => array( 'interval' => 43200, 'display' => __('Twice Daily') ), 'daily' => array( 'interval' => 86400, 'display' => __('Once Daily') ), ); return array_merge( apply_filters( 'cron_schedules', array() ), $schedules ); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 332f831..261097e 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -620,12 +620,12 @@ function delete_option( $name ) { * @return mixed A scalar data */ function maybe_serialize( $data ) { - if ( is_string( $data ) ) - return $data; - elseif ( is_array( $data ) || is_object( $data ) ) + if ( is_array( $data ) || is_object( $data ) ) return serialize( $data ); + if ( is_serialized( $data ) ) return serialize( $data ); + return $data; } @@ -1473,15 +1473,21 @@ function path_join( $base, $path ) { function wp_upload_dir( $time = NULL ) { $siteurl = get_option( 'siteurl' ); $upload_path = get_option( 'upload_path' ); - if ( trim($upload_path) === '' ) - $upload_path = WP_CONTENT_DIR . '/uploads'; - $dir = $upload_path; + $upload_path = trim($upload_path); + if ( empty($upload_path) ) + $dir = WP_CONTENT_DIR . '/uploads'; + else + $dir = $upload_path; // $dir is absolute, $path is (maybe) relative to ABSPATH - $dir = path_join( ABSPATH, $upload_path ); - - if ( !$url = get_option( 'upload_url_path' ) ) - $url = WP_CONTENT_URL . '/uploads'; + $dir = path_join( ABSPATH, $dir ); + + if ( !$url = get_option( 'upload_url_path' ) ) { + if ( empty($upload_path) or ( $upload_path == $dir ) ) + $url = WP_CONTENT_URL . '/uploads'; + else + $url = trailingslashit( $siteurl ) . $upload_path; + } if ( defined('UPLOADS') ) { $dir = ABSPATH . UPLOADS; @@ -1509,8 +1515,9 @@ function wp_upload_dir( $time = NULL ) { $message = sprintf( __( 'Unable to create directory %s. Is its parent directory writable by the server?' ), $dir ); return array( 'error' => $message ); } - + $uploads = array( 'path' => $dir, 'url' => $url, 'subdir' => $subdir, 'basedir' => $bdir, 'baseurl' => $burl, 'error' => false ); + return apply_filters( 'upload_dir', $uploads ); } diff --git a/wp-includes/images/blank.gif b/wp-includes/images/blank.gif new file mode 100644 index 0000000..e565824 Binary files /dev/null and b/wp-includes/images/blank.gif differ diff --git a/wp-includes/js/jquery/jquery.dimensions.min.js b/wp-includes/js/jquery/jquery.dimensions.min.js deleted file mode 100644 index 34c06de..0000000 --- a/wp-includes/js/jquery/jquery.dimensions.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) - * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) - * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. - * - * $LastChangedDate: 2007-12-20 08:43:48 -0600 (Thu, 20 Dec 2007) $ - * $Rev: 4257 $ - * - * Version: 1.2 - * - * Requires: jQuery 1.2+ - */ -(function($){$.dimensions={version:'1.2'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery); \ No newline at end of file diff --git a/wp-includes/js/thickbox/macFFBgHack.png b/wp-includes/js/thickbox/macFFBgHack.png new file mode 100644 index 0000000..c6473b3 Binary files /dev/null and b/wp-includes/js/thickbox/macFFBgHack.png differ diff --git a/wp-includes/js/tinymce/plugins/wordpress/popups.css b/wp-includes/js/tinymce/plugins/wordpress/popups.css deleted file mode 100644 index 2d97665..0000000 --- a/wp-includes/js/tinymce/plugins/wordpress/popups.css +++ /dev/null @@ -1,354 +0,0 @@ -/* This file contains the CSS data for all popups in TinyMCE */ - -body { - background-color: #F0F0EE; - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - scrollbar-3dlight-color: #F0F0EE; - scrollbar-arrow-color: #676662; - scrollbar-base-color: #F0F0EE; - scrollbar-darkshadow-color: #DDDDDD; - scrollbar-face-color: #E0E0DD; - scrollbar-highlight-color: #F0F0EE; - scrollbar-shadow-color: #F0F0EE; - scrollbar-track-color: #F5F5F5; - margin: 8px; -} - -td { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; -} - -input { - background: #FFFFFF; - border: 1px solid #cccccc; -} - -td, input, select, textarea { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 10px; -} - -input, select, textarea { - border: 1px solid #808080; -} - -.input_noborder { - border: 0; -} - -#insert, .updateButton { - font-weight: bold; - width: 90px; - height: 21px; - border: 0; - background-image: url('../images/insert_button_bg.gif'); - cursor: pointer; -} - -#cancel { - font-weight: bold; - width: 90px; - height: 21px; - border: 0; - background-image: url('../images/cancel_button_bg.gif'); - cursor: pointer; -} - -/* Mozilla only style */ -html>body #insert, html>body #cancel { - padding-bottom: 2px; -} - -.title { - display: block; - padding-top: 5px; - padding-bottom: 5px; - padding-left: 15px; - font-size: 15px; -} - - -table.charmap { - border-style: solid; - border-width: 1px; - border-color: #AAAAAA; -} - -td.charmap, td.charmapOver { - color: #000000; - border-color: #AAAAAA; - border-style: solid; - border-width: 1px; - text-align: center; - font-size: 12px; -} - -td.charmapOver { - background-color: #CCCCCC; - cursor: default; -} - -a.charmap { - color: #000000; - text-decoration: none -} - -.wordWrapCode { - vertical-align: middle; - border: 1px none #000000; - background-color: transparent; -} - -input.radio { - border: 1px none #000000; - background-color: transparent; - vertical-align: middle; -} - -input.checkbox { - border: 1px none #000000; - background-color: transparent; - vertical-align: middle; -} - -.mceButtonNormal, .mceButtonOver, .mceButtonDown, .mceSeparator, .mceButtonDisabled, .mceButtonSelected { - margin-left: 1px; -} - -.mceButtonNormal { - border-top: 1px solid; - border-left: 1px solid; - border-bottom: 1px solid; - border-right: 1px solid; - border-color: #F0F0EE; - cursor: default; -} - -.mceButtonOver { - border: 1px solid #0A246A; - cursor: default; - background-color: #B6BDD2; -} - -.mceButtonDown { - cursor: default; - border: 1px solid #0A246A; - background-color: #8592B5; -} - -.mceButtonDisabled { - filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); - -moz-opacity:0.3; - opacity: 0.3; - border-top: 1px solid; - border-left: 1px solid; - border-bottom: 1px solid; - border-right: 1px solid; - border-color: #F0F0EE; - cursor: default; -} - -.mceActionPanel { - margin-top: 5px; -} - -/* Tabs classes */ - -.tabs { - float: left; - width: 100%; - line-height: normal; - background-image: url("../images/xp/tabs_bg.gif"); -} - -.tabs ul { - margin: 0; - padding: 0 0 0; - list-style: none; -} - -.tabs li { - float: left; - background: url("../images/xp/tab_bg.gif") no-repeat left top; - margin: 0; - margin-left: 0; - margin-right: 2px; - padding: 0 0 0 10px; - line-height: 18px; -} - -.tabs li.current { - background: url("../images/xp/tab_sel_bg.gif") no-repeat left top; - margin-right: 2px; -} - -.tabs span { - float: left; - display: block; - background: url("../images/xp/tab_end.gif") no-repeat right top; - padding: 0px 10px 0 0; -} - -.tabs .current span { - background: url("../images/xp/tab_sel_end.gif") no-repeat right top; -} - -.tabs a { - text-decoration: none; - font-family: Verdana, Arial; - font-size: 10px; -} - -.tabs a:link, .tabs a:visited, .tabs a:hover { - color: black; -} - -.tabs a:hover { -} - -.tabs .current { -} - -.tabs .current a, .tabs .current a:link, .tabs .current a:visited { -} - -.panel_wrapper div.panel { - display: none; -} - -.panel_wrapper div.current { - display: block; - width: 100%; - height: 300px; - overflow: visible; /* Should be auto but that breaks Safari */ -} - -.panel_wrapper { - border: 1px solid #919B9C; - border-top: 0px; - padding: 10px; - padding-top: 5px; - clear: both; - background-color: white; -} - -fieldset { - border: 1px solid #919B9C; - font-family: Verdana, Arial; - font-size: 10px; - padding: 0; - margin: 0; - padding: 4px; -} - -legend { - color: #2B6FB6; - font-weight: bold; -} - -.properties { - width: 100%; -} - -.properties .column1 { -} - -.properties .column2 { - text-align: left; -} - -a:link, a:visited { - color: black; -} - -a:hover { - color: #2B6FB6; -} - -#plugintable thead { - font-weight: bold; - background-color: #DDDDDD; -} - -#plugintable, #about #plugintable td { - border: 1px solid #919B9C; -} - -#plugintable { - width: 99%; - margin-top: 10px; -} - -#pluginscontainer { - height: 290px; - overflow: auto; -} - -/* MSIE Specific styles */ - -* html .panel_wrapper { - width: 100%; -} - -.column { - float: left; -} - -h1, h2, h3, h4 { - color: #2B6FB6; - margin: 0; - padding: 0; - padding-top: 5px; -} - -h3 { - font-size: 14px; -} - -#link .panel_wrapper, #link div.current { - height: 125px; -} - -#image .panel_wrapper, #image div.current { - height: 190px; -} - -/* Disables the advanced tab in the table plugin. */ -/* -#table #advanced_tab { - display: none; -} -*/ - -/* Disables the border input field and label in the table plugin. */ -/* -#table #border, #table #borderlabel { - display: none; -} -*/ - -#insert, #cancel, .submitbutton { - font: 13px Verdana, Arial, Helvetica, sans-serif; - height: auto; - width: auto; - background-color: transparent; - background-image: url(../../../../../wp-admin/images/fade-butt.png); - background-repeat: repeat; - border: 3px double; - border-right-color: rgb(153, 153, 153); - border-bottom-color: rgb(153, 153, 153); - border-left-color: rgb(204, 204, 204); - border-top-color: rgb(204, 204, 204); - color: rgb(51, 51, 51); - padding: 0.25em 0.75em; -} - -#insert:active, #cancel:active, .submitbutton:active { - background: #f4f4f4; - border-left-color: #999; - border-top-color: #999; -} - - diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html b/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html index a9f1c15..55554d7 100644 --- a/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html +++ b/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html @@ -4,11 +4,11 @@ - + - - + +