Compare commits

...

27 Commits
6.3 ... 2.1.1

Author SHA1 Message Date
ryan
53f04c334b Tagging 2.1.1
git-svn-id: http://svn.automattic.com/wordpress/tags/2.1.1@4899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-20 19:58:07 +00:00
ryan
04b303eaea Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-20 19:44:39 +00:00
ryan
79a8bf5d08 Don't insert p inside of div. fixes #3669
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-20 05:41:39 +00:00
ryan
b95912c4a5 Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-17 20:20:59 +00:00
markjaquith
e9f8f9abf7 Fix fix_attachment_link() regex. Props mdawaffe. fixes #3757
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-16 04:12:17 +00:00
markjaquith
22de2d2cb9 Prevent double timezone offset when saving titleless AJAX-created drafts. fixes #3701
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-14 22:45:30 +00:00
ryan
250e1ea3f8 Bump
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-14 00:58:43 +00:00
ryan
2cef330387 specialchars wp_explain_nonce() ouput.
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-13 18:29:03 +00:00
markjaquith
a5c59de945 Link to TinyMCE css file with http scheme on all server setups. Props MichaelH and Andy. fixes #3646
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-08 23:17:20 +00:00
ryan
987fb7822d Send content type header. Props nbachiyski. fixes #3754
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-06 20:12:53 +00:00
ryan
edf6e21ebd Check page ID only if is_page. fixes #3049
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-02 16:39:04 +00:00
markjaquith
9a8d98cb3d make sure nothing going into the object cache is being passed by reference. fixes #3726
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-02-01 10:03:34 +00:00
markjaquith
6323ce0a14 Prevent a missing wp-cron.php from causing an infinite loop. Props jan. fixes #3713
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-31 06:00:08 +00:00
markjaquith
ab6e0e1e4f run get_categories filter on cached get_categories hits. fixes #3728
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-31 05:58:40 +00:00
ryan
decde5cfd8 Set charset for MCE. Props nbachiyski. fixes #3574
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-31 02:09:08 +00:00
markjaquith
b86f82e435 XHTML validation fixes and <!--more--> typo correction for Reading Options page. Props JeremyVisser. fixes #3709
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-29 16:44:47 +00:00
ryan
1f46a9c3ae Fix typo in read_pages conditional. Props McShelby. fixes #3705
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-28 21:58:01 +00:00
ryan
6c3dba8271 Add wp-scriptaculous.js. fixes #3703 #3519
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-28 20:35:16 +00:00
markjaquith
1527d0d4c4 Make <!--more--> regex non-greedy. Props Curloso and Viper007Bond. fixes #3698
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-27 23:32:57 +00:00
markjaquith
0a737c65f2 Pass correct var to wp_create_file_in_uploads hook. props spikeyslam. fixes #3693
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-27 23:00:32 +00:00
markjaquith
238ca3e925 Template Name: regex fixup by gjorgensen. fixes #3674
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-25 19:43:07 +00:00
ryan
78ca745e30 Cast categoryId to string to be compliant. fixes #3662
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-25 18:27:47 +00:00
ryan
8789eb2c7f Make some date/time formats translateable. Props teknoseyir and nbachiyski. fixes #3661
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-25 02:08:54 +00:00
ryan
a391b9676c Don't output ul when title_li is empty. Props m0n5t3r. fixes #3664
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-25 02:02:21 +00:00
ryan
58fb7284f3 2.1.1-alpha
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-24 17:44:35 +00:00
ryan
8db733bca6 Fix wp_create_thumbnail filter. Props filosofo. fixes #3654
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-24 07:17:14 +00:00
ryan
0024f9cd6d 2.1 branch
git-svn-id: http://svn.automattic.com/wordpress/branches/2.1@4784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2007-01-23 02:25:13 +00:00
22 changed files with 93 additions and 40 deletions

View File

@@ -155,7 +155,7 @@ case 'add-meta' :
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))
) ) )

View File

@@ -139,14 +139,14 @@ function fix_attachment_links( $post_ID ) {
$post = & get_post( $post_ID, ARRAY_A );
$search = "#<a[^>]+rel=('|\" )[^'\"]*attachment[^>]*>#ie";
$search = "#<a[^>]+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 @@ function page_rows( $parent = 0, $level = 0, $pages = 0, $hierarchy = true ) {
<?php echo $pad; ?><?php the_title() ?>
</td>
<td><?php the_author() ?></td>
<td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else echo mysql2date( 'Y-m-d g:i a', $post->post_modified ); ?></td>
<td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else echo mysql2date( __('Y-m-d g:i a'), $post->post_modified ); ?></td>
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e( 'View' ); ?></a></td>
<td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&amp;post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td>
<td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&amp;post=$id", 'delete-page_' . $id ) . "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . js_escape(sprintf( __("You are about to delete the '%s' page.\n'OK' to delete, 'Cancel' to stop." ), get_the_title() ) ) . "' );\">" . __( 'Delete' ) . "</a>"; } ?></td>
@@ -1269,7 +1269,7 @@ function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {
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 @@ function get_file_description( $file ) {
}
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 @@ function wp_create_thumbnail( $file, $max_side, $effect = '' ) {
$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 @@ function wp_create_thumbnail( $file, $max_side, $effect = '' ) {
if (!empty ( $error ) ) {
return $error;
} else {
apply_filters( 'wp_create_thumbnail', $thumbpath );
return $thumbpath;
return apply_filters( 'wp_create_thumbnail', $thumbpath );
}
}

View File

@@ -223,12 +223,12 @@ Event.observe( window, 'load', hide_text );
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;

View File

@@ -177,7 +177,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
case 'date':
?>
<td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td>
<td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else the_time(_('Y-m-d \<\b\r \/\> g:i:s a')); ?></td>
<?php
break;
case 'title':
@@ -279,7 +279,7 @@ foreach ($comments as $comment) {
<?php comment_text() ?>
<p><?php comment_date('M j, g:i A'); ?> &#8212; [
<p><?php comment_date(__('M j, g:i A')); ?> &#8212; [
<?php
if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo " <a href='comment.php?action=editcomment&amp;c=".$comment->comment_ID."'>" . __('Edit') . '</a>';

View File

@@ -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' :

View File

@@ -60,7 +60,7 @@ include('./admin-header.php');
<table class="optiontable">
<tr>
<th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th>
<td><code><?php echo gmdate('Y-m-d g:i:s a'); ?></code></td>
<td><code><?php echo gmdate(__('Y-m-d g:i:s a')); ?></code></td>
</tr>
<tr>
<th scope="row"><?php _e('Times in the weblog should differ by:') ?> </th>

View File

@@ -40,7 +40,6 @@ include('admin-header.php');
</p>
</div>
<?php endif; ?>
</fieldset>
</td>
</tr>
</table>
@@ -54,7 +53,6 @@ include('admin-header.php');
<th width="33%" scope="row"><?php _e('Show at most:') ?></th>
<td>
<input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option('posts_per_page'); ?>" size="3" /> <?php _e('posts') ?>
</select>
</td>
</tr>
</table>
@@ -72,7 +70,7 @@ include('admin-header.php');
<td>
<p><label><input name="rss_use_excerpt" type="radio" value="0" <?php checked(0, get_option('rss_use_excerpt')); ?> /> <?php _e('Full text') ?></label><br />
<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_option('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label></p>
<p><?php _e('Note: If you use the <code>&lt;--more--&gt;</code> feature, it will cut off posts in RSS feeds.'); ?></p>
<p><?php _e('Note: If you use the <code>&lt;!--more--&gt;</code> feature, it will cut off posts in RSS feeds.'); ?></p>
</td>
</tr>
</table>

View File

@@ -344,10 +344,14 @@ function wp_list_bookmarks($args = '') {
$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<ul>\n";
$output .= _walk_bookmarks($bookmarks, $r);
$output .= "\n\t</ul>\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<ul>\n";
$output .= _walk_bookmarks($bookmarks, $r);
$output .= "\n\t</ul>\n$category_after\n";
} else {
$output .= _walk_bookmarks($bookmarks, $r);
}
}
}

View File

@@ -1,6 +1,7 @@
<?php
function wp_cache_add($key, $data, $flag = '', $expire = 0) {
global $wp_object_cache;
$data = unserialize(serialize($data));
return $wp_object_cache->add($key, $data, $flag, $expire);
}
@@ -37,12 +38,14 @@ function wp_cache_init() {
function wp_cache_replace($key, $data, $flag = '', $expire = 0) {
global $wp_object_cache;
$data = unserialize(serialize($data));
return $wp_object_cache->replace($key, $data, $flag, $expire);
}
function wp_cache_set($key, $data, $flag = '', $expire = 0) {
global $wp_object_cache;
$data = unserialize(serialize($data));
return $wp_object_cache->set($key, $data, $flag, $expire);
}

View File

@@ -55,7 +55,7 @@ class WP_Roles {
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 @@ function map_meta_cap($cap, $user_id) {
}
$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

View File

@@ -33,7 +33,7 @@ function &get_categories($args = '') {
$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 = '';

View File

@@ -93,6 +93,10 @@ function spawn_cron() {
}
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) )

View File

@@ -63,7 +63,6 @@ function wpautop($pee, $br = 1) {
$pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates
$pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end
$pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
$pee = preg_replace( '|<p>(<div[^>]*>\s*)|', "$1<p>", $pee );
$pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!', "<p>$1</p>$2", $pee);
$pee = preg_replace( '|<p>|', "$1<p>", $pee );
$pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); // don't pee all over a tag
@@ -82,7 +81,7 @@ function wpautop($pee, $br = 1) {
if ( strstr( $pee, '<pre' ) )
$pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '</pre>' ", $pee);
$pee = preg_replace( "|\n</p>$|", '</p>', $pee );
/**/
return $pee;
}

View File

@@ -1205,9 +1205,9 @@ function wp_nonce_ays($action) {
$html .= "\t\t<input type='hidden' name='" . attribute_escape(urldecode($k)) . "' value='" . attribute_escape(urldecode($v)) . "' />\n";
}
$html .= "\t\t<input type='hidden' name='_wpnonce' value='" . wp_create_nonce($action) . "' />\n";
$html .= "\t\t<div id='message' class='confirm fade'>\n\t\t<p>" . wp_explain_nonce($action) . "</p>\n\t\t<p><a href='$adminurl'>" . __('No') . "</a> <input type='submit' value='" . __('Yes') . "' /></p>\n\t\t</div>\n\t</form>\n";
$html .= "\t\t<div id='message' class='confirm fade'>\n\t\t<p>" . wp_specialchars(wp_explain_nonce($action)) . "</p>\n\t\t<p><a href='$adminurl'>" . __('No') . "</a> <input type='submit' value='" . __('Yes') . "' /></p>\n\t\t</div>\n\t</form>\n";
} else {
$html .= "\t<div id='message' class='confirm fade'>\n\t<p>" . wp_explain_nonce($action) . "</p>\n\t<p><a href='$adminurl'>" . __('No') . "</a> <a href='" . add_query_arg( '_wpnonce', wp_create_nonce($action), $_SERVER['REQUEST_URI'] ) . "'>" . __('Yes') . "</a></p>\n\t</div>\n";
$html .= "\t<div id='message' class='confirm fade'>\n\t<p>" . wp_specialchars(wp_explain_nonce($action)) . "</p>\n\t<p><a href='$adminurl'>" . __('No') . "</a> <a href='" . add_query_arg( '_wpnonce', wp_create_nonce($action), $_SERVER['REQUEST_URI'] ) . "'>" . __('Yes') . "</a></p>\n\t</div>\n";
}
$html .= "</body>\n</html>";
wp_die($html, $title);

View File

@@ -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('<script type="text/javascript" src="'+libraryName+'"></script>');
},
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();

View File

@@ -43,7 +43,7 @@
$mce_popups_css = get_option('siteurl') . '/wp-includes/js/tinymce/plugins/wordpress/popups.css';
$mce_css = get_option('siteurl') . '/wp-includes/js/tinymce/plugins/wordpress/wordpress.css';
$mce_css = apply_filters('mce_css', $mce_css);
if ( $_SERVER['HTTPS'] ) {
if ( $_SERVER['HTTPS'] == 'on' ) {
$mce_css = str_replace('http://', 'https://', $mce_css);
$mce_popups_css = str_replace('http://', 'https://', $mce_popups_css);
}

View File

@@ -6,7 +6,7 @@
*
* @version 1.08
* @author Moxiecode
* @copyright Copyright <EFBFBD> 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 @@ $cacheDir = realpath("."); // Absolute directory path to where cached gz file
$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");

View File

@@ -1,4 +1,6 @@
<?php require_once('../../../wp-config.php'); ?>
<?php require_once('../../../wp-config.php');
header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head>

View File

@@ -273,6 +273,7 @@ function wp_list_pages($args = '') {
$r = array_merge($defaults, $r);
$output = '';
$current_page = 0;
// sanitize, mostly to keep spaces out
$r['exclude'] = preg_replace('[^0-9,]', '', $r['exclude']);
@@ -288,7 +289,8 @@ function wp_list_pages($args = '') {
$output .= '<li class="pagenav">' . $r['title_li'] . '<ul>';
global $wp_query;
$current_page = $wp_query->get_queried_object_id();
if ( is_page() )
$current_page = $wp_query->get_queried_object_id();
$output .= walk_page_tree($pages, $r['depth'], $current_page, $r);
if ( $r['title_li'] )

View File

@@ -74,16 +74,16 @@ function &get_children($args = '', $output = OBJECT) {
// get extended entry info (<!--more-->)
function get_extended($post) {
//Match the new style more links
if (preg_match('/<!--more(.+?)?-->/', $post, $matches)) {
list($main,$extended) = explode($matches[0],$post,2);
if ( preg_match('/<!--more(.*?)-->/', $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);
}

View File

@@ -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.1';
$wp_db_version = 4773;
?>

View File

@@ -977,7 +977,7 @@ class wp_xmlrpc_server extends IXR_Server {
foreach($catids as $catid) {
$categories[] = array(
'categoryName' => get_cat_name($catid),
'categoryId' => $catid,
'categoryId' => (string) $catid,
'isPrimary' => $isPrimary
);
$isPrimary = false;