summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-01-30 12:03:26 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-01-30 12:03:26 +0000
commit229ea6db0019536f1efea2dadfe3ad53284a9574 (patch)
tree723b7da1fc5c0b8629cc4176da19b5c80036d710
parent7322c2da3ce036e18768aa2f79bc4897796b6ac8 (diff)
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@520 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-inst/wp-admin/admin-footer.php11
-rw-r--r--wp-inst/wp-admin/admin-functions.php8
-rw-r--r--wp-inst/wp-includes/functions-post.php5
-rw-r--r--wp-inst/wp-includes/functions.php14
-rw-r--r--wp-inst/wp-includes/pluggable-functions.php27
-rw-r--r--wp-inst/wp-includes/template-functions-general.php2
6 files changed, 50 insertions, 17 deletions
diff --git a/wp-inst/wp-admin/admin-footer.php b/wp-inst/wp-admin/admin-footer.php
index 3df83a5..e660be2 100644
--- a/wp-inst/wp-admin/admin-footer.php
+++ b/wp-inst/wp-admin/admin-footer.php
@@ -1,12 +1,19 @@
<div id="footer"><p><a href="http://wordpress.org/" id="wordpress-logo"><img src="images/wordpress-logo.png" alt="WordPress" /></a></p>
<p>
-<a href="http://codex.wordpress.org/"><?php _e('Documentation'); ?></a> <br />
-<?php printf(__('%s seconds'), number_format(timer_stop(), 2)); ?>
+<a href="http://codex.wordpress.org/"><?php _e('Documentation'); ?></a> &#8212; <a href="http://wordpress.org/support/"><?php _e('Support Forums'); ?></a> <br />
+<?php bloginfo('version'); ?> &#8212; <?php printf(__('%s seconds'), number_format(timer_stop(), 2)); ?>
</p>
</div>
<?php do_action('admin_footer', ''); ?>
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
+
+<?php
+if ( (substr(php_sapi_name(), 0, 3) == 'cgi') && spawn_pinger() ) {
+ echo '<iframe id="pingcheck" src="' . get_settings('siteurl') .'/wp-admin/execute-pings.php?time=' . time() . '" style="border:none;width:1px;height:1px;"></iframe>';
+}
+?>
+
</body>
</html>
diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php
index e6fc59c..e89e78e 100644
--- a/wp-inst/wp-admin/admin-functions.php
+++ b/wp-inst/wp-admin/admin-functions.php
@@ -966,14 +966,6 @@ function touch_time($edit = 1, $for_post = 1) {
}
-function check_admin_referer() {
- $adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
- $referer = strtolower($_SERVER['HTTP_REFERER']);
- if (!strstr($referer, $adminurl))
- die(__('Sorry, you need to <a href="http://codex.wordpress.org/Enable_Sending_Referrers">enable sending referrers</a> for this feature to work.'));
- do_action('check_admin_referer');
-}
-
// insert_with_markers: Owen Winkler, fixed by Eric Anderson
// Inserts an array of strings into a file (.htaccess), placing it between
// BEGIN and END markers. Replaces existing marked info. Retains surrounding
diff --git a/wp-inst/wp-includes/functions-post.php b/wp-inst/wp-includes/functions-post.php
index 5d57c79..842980f 100644
--- a/wp-inst/wp-includes/functions-post.php
+++ b/wp-inst/wp-includes/functions-post.php
@@ -196,6 +196,7 @@ function wp_insert_post($postarr = array()) {
spawn_pinger();
}
} else if ($post_status == 'static') {
+ wp_cache_delete('all_page_ids', 'pages');
$wp_rewrite->flush_rules();
if ( !empty($page_template) )
@@ -554,8 +555,10 @@ function wp_delete_post($postid = 0) {
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = $postid");
- if ( 'static' == $post->post_status )
+ if ( 'static' == $post->post_status ) {
+ wp_cache_delete('all_page_ids', 'pages');
$wp_rewrite->flush_rules();
+ }
return $post;
}
diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php
index 61d5278..c596a98 100644
--- a/wp-inst/wp-includes/functions.php
+++ b/wp-inst/wp-includes/functions.php
@@ -466,7 +466,7 @@ AND meta_key = '$key'");
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = '$post_id'
AND meta_key = '$key' AND meta_value = '$value'");
$cache_key = $post_meta_cache['$post_id'][$key];
- foreach ( $cache_key as $index => $data )
+ if ($cache_key) foreach ( $cache_key as $index => $data )
if ( $data == $value )
unset($post_meta_cache['$post_id'][$key][$index]);
}
@@ -820,7 +820,7 @@ function get_all_category_ids() {
function get_all_page_ids() {
global $wpdb;
- if ( ! $page_ids = wp_cache_get('all_page_ids', 'posts') ) {
+ if ( ! $page_ids = wp_cache_get('all_page_ids', 'pages') ) {
$page_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_status='static'");
wp_cache_add('all_page_ids', $page_ids, 'pages');
}
@@ -1007,6 +1007,9 @@ function spawn_pinger() {
if ( $wpdb->get_var("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_pingme' OR meta_key = '_encloseme' LIMIT 1") )
$doping = true;
+ if ( substr(php_sapi_name(), 0, 3) == 'cgi' )
+ return $doping;
+
if ( $doping ) {
$ping_url = get_settings('siteurl') .'/wp-admin/execute-pings.php';
$parts = parse_url($ping_url);
@@ -2224,9 +2227,10 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
if ( is_array($meta_value) || is_object($meta_value) )
$meta_value = serialize($meta_value);
$meta_value = trim( $meta_value );
-
- if ( '' == $meta_value )
- return false;
+
+ if (empty($meta_value)) {
+ delete_usermeta($user_id, $meta_key);
+ }
$cur = $wpdb->get_row("SELECT * FROM $wpdb->usermeta WHERE user_id = '$user_id' AND meta_key = '$meta_key'");
if ( !$cur ) {
diff --git a/wp-inst/wp-includes/pluggable-functions.php b/wp-inst/wp-includes/pluggable-functions.php
index 921ccd4..c388e44 100644
--- a/wp-inst/wp-includes/pluggable-functions.php
+++ b/wp-inst/wp-includes/pluggable-functions.php
@@ -86,6 +86,14 @@ function get_userdata( $user_id ) {
} // end foreach
} //end if
+ // For backwards compat.
+ if ( isset($user->first_name) )
+ $user->user_firstname = $user->first_name;
+ if ( isset($user->last_name) )
+ $user->user_lastname = $user->last_name;
+ if ( isset($user->description) )
+ $user->user_description = $user->description;
+
wp_cache_add($user_id, $user, 'users');
wp_cache_add($user->user_login, $user, 'userlogins');
@@ -130,6 +138,15 @@ function get_userdatabylogin($user_login) {
$user->user_level = $meta->meta_value;
}
}
+
+ // For backwards compat.
+ if ( isset($user->first_name) )
+ $user->user_firstname = $user->first_name;
+ if ( isset($user->last_name) )
+ $user->user_lastname = $user->last_name;
+ if ( isset($user->description) )
+ $user->user_description = $user->description;
+
if( is_site_admin( $user_login ) == true ) {
$user->user_level = 10;
$cap_key = $wpdb->prefix . 'capabilities';
@@ -212,6 +229,16 @@ function auth_redirect() {
}
endif;
+if ( !function_exists('check_admin_referer') ) :
+function check_admin_referer() {
+ $adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
+ $referer = strtolower($_SERVER['HTTP_REFERER']);
+ if (!strstr($referer, $adminurl))
+ die(__('Sorry, you need to <a href="http://codex.wordpress.org/Enable_Sending_Referrers">enable sending referrers</a> for this feature to work.'));
+ do_action('check_admin_referer');
+}
+endif;
+
// Cookie safe redirect. Works around IIS Set-Cookie bug.
// http://support.microsoft.com/kb/q176113/
if ( !function_exists('wp_redirect') ) :
diff --git a/wp-inst/wp-includes/template-functions-general.php b/wp-inst/wp-includes/template-functions-general.php
index 669d705..1fcda25 100644
--- a/wp-inst/wp-includes/template-functions-general.php
+++ b/wp-inst/wp-includes/template-functions-general.php
@@ -700,7 +700,7 @@ function the_weekday_date($before='',$after='') {
}
function rsd_link() {
- echo '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_bloginfo('url') . "/xmlrpc.php?rsd\" />\n";
+ echo '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . get_bloginfo('wpurl') . "/xmlrpc.php?rsd\" />\n";
}
?>