Compare commits

..

2 Commits

Author SHA1 Message Date
ryan
425850251c Update tag.
git-svn-id: http://svn.automattic.com/wordpress/tags/1.5.1.3@2682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2005-07-02 17:20:14 +00:00
ryan
b3c45632c4 WordPress 1.5.1.3
git-svn-id: http://svn.automattic.com/wordpress/tags/1.5.1.3@2675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2005-06-29 22:28:39 +00:00
22 changed files with 271 additions and 718 deletions

View File

@@ -55,7 +55,7 @@ if (isset($_GET['page'])) {
}
if (! file_exists(ABSPATH . "wp-content/plugins/$plugin_page"))
die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
die(sprintf(__('Cannot load %s.'), $plugin_page));
if (! isset($_GET['noheader']))
require_once(ABSPATH . '/wp-admin/admin-header.php');

View File

@@ -34,7 +34,6 @@ case 'addcat':
$cat = intval($_POST['cat']);
$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')");
do_action('add_category', $wpdb->insert_id);
header('Location: categories.php?message=1#addcat');
break;
@@ -58,7 +57,6 @@ case 'delete':
$wpdb->query("UPDATE $wpdb->categories SET category_parent = '$cat_parent' WHERE category_parent = '$cat_ID'");
// TODO: Only set categories to general if they're not in another category already
$wpdb->query("UPDATE $wpdb->post2cat SET category_id='1' WHERE category_id='$cat_ID'");
do_action('delete_category', $cat_ID);
header('Location: categories.php?message=2');

View File

@@ -85,17 +85,12 @@ edCanvas = document.getElementById('content');
</script>
<p class="submit">
<?php if ( $post_ID ) : ?>
<input name="save" type="submit" id="save" tabindex="5" value=" <?php _e('Save and Continue Editing'); ?> "/>
<input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php $post_ID ? _e('Edit Page') : _e('Create New Page') ?> &raquo;" />
<?php else : ?>
<input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php _e('Create New Page') ?> &raquo;" />
<?php endif; ?>
<input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" />
<input name="savepage" type="submit" id="savepage" tabindex="6" value="<?php $post_ID ? _e('Edit Page') :_e('Create New Page') ?> &raquo;" />
<input name="referredby" type="hidden" id="referredby" value="<?php echo $sendto; ?>" />
</p>
<fieldset id="pageoptions">
<legend><?php _e('Page Options') ?></legend>
<legend><?php _e('Page Options') ?></legend>
<table width="100%" cellspacing="2" cellpadding="5" class="editform">
<?php if ( 0 != count( get_page_templates() ) ) { ?>
<tr valign="top">

View File

@@ -29,7 +29,7 @@ $editing = true;
switch($action) {
case 'post':
check_admin_referer();
if ( !user_can_create_draft($user_ID) )
die( __('You are not allowed to create posts or drafts on this blog.') );
@@ -195,9 +195,10 @@ case 'post':
if ('publish' == $post_status) {
do_action('publish_post', $post_ID);
if ($post_pingback)
register_shutdown_function('pingback', $content, $post_ID);
register_shutdown_function('do_enclose', $content, $post_ID );
register_shutdown_function('do_trackbacks', $post_ID);
pingback($content, $post_ID);
do_enclose( $content, $post_ID );
do_trackbacks($post_ID);
}
if ($post_status == 'static') {
@@ -268,7 +269,6 @@ case 'edit':
break;
case 'editpost':
check_admin_referer();
// die(var_dump('<pre>', $_POST));
if (!isset($blog_ID)) {
$blog_ID = 1;
@@ -434,10 +434,10 @@ case 'editpost':
if ($post_status == 'publish') {
do_action('publish_post', $post_ID);
register_shutdown_function('do_trackbacks', $post_ID);
register_shutdown_function('do_enclose', $content, $post_ID );
do_trackbacks($post_ID);
do_enclose( $content, $post_ID );
if ( get_option('default_pingback_flag') )
register_shutdown_function('pingback', $content, $post_ID);
pingback($content, $post_ID);
}
if ($post_status == 'static') {
@@ -496,7 +496,7 @@ case 'editcomment':
break;
case 'confirmdeletecomment':
check_admin_referer();
require_once('./admin-header.php');
$comment = (int) $_GET['comment'];
@@ -591,7 +591,7 @@ case 'unapprovecomment':
break;
case 'mailapprovecomment':
check_admin_referer();
$comment = (int) $_GET['comment'];
$commentdata = get_commentdata($comment, 1, true) or die(sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));
@@ -611,7 +611,7 @@ case 'mailapprovecomment':
break;
case 'approvecomment':
check_admin_referer();
$comment = (int) $_GET['comment'];
$p = (int) $_GET['p'];
if (isset($_GET['noredir'])) {
@@ -640,7 +640,7 @@ case 'approvecomment':
break;
case 'editedcomment':
check_admin_referer();
$comment_ID = (int) $_POST['comment_ID'];
$comment_post_ID = (int) $_POST['comment_post_ID'];
$newcomment_author = $_POST['newcomment_author'];

View File

@@ -64,10 +64,10 @@ case 'update':
die (__("<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice."));
if ( $pass1 != $pass2 )
die (__("<strong>ERROR</strong>: you typed two different passwords. Go back to correct that."));
$newuser_pass = $wpdb->escape($pass1);
$newuser_pass = $pass1;
$updatepassword = "user_pass=MD5('$newuser_pass'), ";
wp_clearcookie();
wp_setcookie($user_login, $pass1);
wp_setcookie($user_login, $newuser_pass);
}
$newuser_firstname = wp_specialchars($_POST['newuser_firstname']);

View File

@@ -213,7 +213,7 @@ $piece_of_code = htmlspecialchars( $piece_of_code );
<p><code><?php echo $piece_of_code; ?></code>
</p>
<p><strong><?php _e('Image Details') ?></strong>: <br />
<?php _e('Name:'); ?>
Name:
<?php echo $img1_name; ?>
<br />
<?php _e('Size:') ?>

View File

@@ -24,8 +24,6 @@ for ($i=0; $i<count($wpvarstoreset); $i += 1) {
switch ($action) {
case 'update':
check_admin_referer();
get_currentuserinfo();
$edituser = get_userdata($user_id);
if ($edituser->user_level >= $user_level) die( __('You do not have permission to edit this user.') );

View File

@@ -72,9 +72,7 @@ case 'adduser':
(user_login, user_pass, user_nickname, user_email, user_ip, user_domain, user_browser, user_registered, user_level, user_idmode, user_firstname, user_lastname, user_nicename, user_url)
VALUES
('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_domain', '$user_browser', '$now', '$new_users_can_blog', 'nickname', '$user_firstname', '$user_lastname', '$user_nicename', '$user_uri')");
do_action('user_register', $wpdb->insert_id);
if ($result == false)
die (__('<strong>ERROR</strong>: Couldn&#8217;t register you!'));
@@ -98,7 +96,7 @@ case 'promote':
header('Location: users.php');
}
$id = (int) $_GET['id'];
$id = $_GET['id'];
$prom = $_GET['prom'];
$user_data = get_userdata($id);
@@ -110,11 +108,12 @@ case 'promote':
if ('up' == $prom) {
$new_level = $usertopromote_level + 1;
$wpdb->query("UPDATE $wpdb->users SET user_level=$new_level WHERE ID = $id AND $new_level < $user_level");
$sql="UPDATE $wpdb->users SET user_level=$new_level WHERE ID = $id AND $new_level < $user_level";
} elseif ('down' == $prom) {
$new_level = $usertopromote_level - 1;
$wpdb->query("UPDATE $wpdb->users SET user_level=$new_level WHERE ID = $id AND $new_level < $user_level");
$sql="UPDATE $wpdb->users SET user_level=$new_level WHERE ID = $id AND $new_level < $user_level";
}
$result = $wpdb->query($sql);
header('Location: users.php');

View File

@@ -57,7 +57,7 @@ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');
$location = ( empty( $_POST['redirect_to'] ) ) ? get_permalink( $comment_post_ID ) : $_POST['redirect_to'];
$location = (empty($_POST['redirect_to'])) ? $_SERVER["HTTP_REFERER"] : $_POST['redirect_to'];
wp_redirect($location);
?>

View File

@@ -49,12 +49,7 @@ if (have_posts()) :
foreach ($comments as $comment) {
?>
<item>
<title><?php if ( (! is_single()) || (! is_page()) ) {
$title = get_the_title($comment->comment_post_ID);
$title = apply_filters('the_title', $title);
$title = apply_filters('the_title_rss', $title);
echo "Comment on $title";
} ?> by: <?php comment_author_rss() ?></title>
<title>by: <?php comment_author_rss() ?></title>
<link><?php comment_link() ?></link>
<pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true), false); ?></pubDate>
<guid><?php comment_link() ?></guid>

File diff suppressed because it is too large Load Diff

View File

@@ -355,20 +355,20 @@ function pings_open() {
// Non-template functions
function get_lastcommentmodified($timezone = 'server') {
global $cache_lastcommentmodified, $pagenow, $wpdb;
global $tablecomments, $cache_lastcommentmodified, $pagenow, $wpdb;
$add_seconds_blog = get_settings('gmt_offset') * 3600;
$add_seconds_server = date('Z');
$now = current_time('mysql', 1);
if ( !isset($cache_lastcommentmodified[$timezone]) ) {
switch(strtolower($timezone)) {
case 'gmt':
$lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");
$lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");
break;
case 'blog':
$lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");
$lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");
break;
case 'server':
$lastcommentmodified = $wpdb->get_var("SELECT DATE_ADD(comment_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $wpdb->comments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");
$lastcommentmodified = $wpdb->get_var("SELECT DATE_ADD(comment_date_gmt, INTERVAL '$add_seconds_server' SECOND) FROM $tablecomments WHERE comment_date_gmt <= '$now' ORDER BY comment_date_gmt DESC LIMIT 1");
break;
}
$cache_lastcommentmodified[$timezone] = $lastcommentmodified;

View File

@@ -989,12 +989,5 @@ function ent2ncr($text) {
}
return $text;
}
function stripslashes_deep($value)
{
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
?>

View File

@@ -103,19 +103,14 @@ function wp_update_post($postarr = array()) {
global $wpdb;
// First get all of the original fields
$post = wp_get_single_post($postarr['ID'], ARRAY_A);
extract(wp_get_single_post($postarr['ID'], ARRAY_A));
// Escape data pulled from DB.
$post = add_magic_quotes($post);
extract($post);
// Now overwrite any changed values being passed in. These are
// already escaped.
// Now overwrite any changed values being passed in
extract($postarr);
// If no categories were passed along, use the current cats.
// Make sure we set a valid category
if ( 0 == count($post_category) || !is_array($post_category) )
$post_category = $post['post_category'];
$post_category = array(get_option('default_category'));
$post_modified = current_time('mysql');
$post_modified_gmt = current_time('mysql', 1);
@@ -154,17 +149,18 @@ function wp_get_post_cats($blogid = '1', $post_ID = 0) {
$result = $wpdb->get_col($sql);
if ( !$result )
$result = array();
return array_unique($result);
}
function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
global $wpdb;
// If $post_categories isn't already an array, make it one:
if (!is_array($post_categories) || 0 == count($post_categories))
$post_categories = array(get_option('default_category'));
if (!is_array($post_categories)) {
if (!$post_categories) {
$post_categories = get_option('default_category');
}
$post_categories = array($post_categories);
}
$post_categories = array_unique($post_categories);

View File

@@ -9,39 +9,24 @@ function get_currentuserinfo() {
global $user_login, $userdata, $user_level, $user_ID, $user_nickname, $user_email, $user_url, $user_pass_md5, $user_identity;
// *** retrieving user's data from cookies and db - no spoofing
if ( wp_login($_COOKIE['wordpressuser_' . COOKIEHASH], $_COOKIE['wordpresspass_' . COOKIEHASH], true) ) {
if (isset($_COOKIE['wordpressuser_' . COOKIEHASH]))
$user_login = $_COOKIE['wordpressuser_' . COOKIEHASH];
$userdata = get_userdatabylogin($user_login);
$user_level = $userdata->user_level;
$user_ID = $userdata->ID;
$user_nickname = $userdata->user_nickname;
$user_email = $userdata->user_email;
$user_url = $userdata->user_url;
$user_pass_md5 = md5($userdata->user_pass);
$userdata = get_userdatabylogin($user_login);
$user_level = $userdata->user_level;
$user_ID = $userdata->ID;
$user_nickname = $userdata->user_nickname;
$user_email = $userdata->user_email;
$user_url = $userdata->user_url;
$user_pass_md5 = md5($userdata->user_pass);
$idmode = $userdata->user_idmode;
switch($userdata->user_idmode) {
case 'login':
$user_identity = $userdata->user_login;
break;
case 'firstname':
$user_identity = $userdata->user_firstname;
break;
case 'lastname':
$user_identity = $userdata->user_lastname;
break;
case 'namefl':
$user_identity = $userdata->user_firstname.' '.$userdata->user_lastname;
break;
case 'namelf':
$user_identity = $userdata->user_lastname.' '.$userdata->user_firstname;
break;
case 'nickname':
default:
$user_identity = $userdata->user_nickname;
break;
}
}
$idmode = $userdata->user_idmode;
if ($idmode == 'nickname') $user_identity = $userdata->user_nickname;
if ($idmode == 'login') $user_identity = $userdata->user_login;
if ($idmode == 'firstname') $user_identity = $userdata->user_firstname;
if ($idmode == 'lastname') $user_identity = $userdata->user_lastname;
if ($idmode == 'namefl') $user_identity = $userdata->user_firstname.' '.$userdata->user_lastname;
if ($idmode == 'namelf') $user_identity = $userdata->user_lastname.' '.$userdata->user_firstname;
if (!$idmode) $user_identity = $userdata->user_nickname;
}
endif;
@@ -231,10 +216,6 @@ function wp_notify_postauthor($comment_id, $comment_type='') {
$from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>";
}
$notify_message = apply_filters('comment_notification_text', $notify_message);
$subject = apply_filters('comment_notification_subject', $subject);
$message_headers = apply_filters('comment_notification_headers', $message_headers);
$message_headers = "MIME-Version: 1.0\n"
. "$from\n"
. "Content-Type: text/plain; charset=\"" . get_settings('blog_charset') . "\"\n";
@@ -259,6 +240,7 @@ function wp_notify_moderator($comment_id) {
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
$user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID='$post->post_author' LIMIT 1");
$comment_author_domain = gethostbyaddr($comment->comment_author_IP);
$comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
@@ -278,9 +260,6 @@ function wp_notify_moderator($comment_id) {
$subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), get_settings('blogname'), $post->post_title );
$admin_email = get_settings("admin_email");
$notify_message = apply_filters('comment_moderation_text', $notify_message);
$subject = apply_filters('comment_moderation_subject', $subject);
@wp_mail($admin_email, $subject, $notify_message);
return true;

View File

@@ -262,8 +262,6 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
}
}
$exclusions = apply_filters('list_cats_exclusions', $exclusions);
if (intval($categories)==0){
$sort_column = 'cat_'.$sort_column;

View File

@@ -352,7 +352,7 @@ function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat=
function get_pagenum_link($pagenum = 1) {
global $wp_rewrite;
$qstr = wp_specialchars($_SERVER['REQUEST_URI']);
$qstr = $_SERVER['REQUEST_URI'];
$page_querystring = "paged";
$page_modstring = "page/";

View File

@@ -2,6 +2,6 @@
// This just holds the version number, in a separate file so we can bump it without cluttering the SVN
$wp_version = '1.5.3-beta1';
$wp_version = '1.5.1.3';
?>

View File

@@ -50,7 +50,9 @@ for ($i=1; $i <= $count; $i++) :
if (preg_match('/Subject: /i', $line)) {
$subject = trim($line);
$subject = substr($subject, 9, strlen($subject)-9);
$subject = wp_iso_descrambler($subject);
if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $subject)) {
$subject = wp_iso_descrambler($subject);
}
// Captures any text in the subject before $phone_delim as the subject
$subject = explode($phone_delim, $subject);
$subject = $subject[0];
@@ -61,10 +63,8 @@ for ($i=1; $i <= $count; $i++) :
if (preg_match('/From: /', $line) | preg_match('Reply-To: /', $line)) {
$author=trim($line);
if ( ereg("([a-zA-Z0-9\_\-\.]+@[\a-zA-z0-9\_\-\.]+)", $author , $regs) ) {
$author = $regs[1];
echo "Author = {$author} <p>";
$author = $wpdb->escape($author);
$result = $wpdb->get_row("SELECT ID FROM $wpdb->users WHERE user_email='$author' LIMIT 1");
echo "Author = {$regs[1]} <p>";
$result = $wpdb->get_row("SELECT ID FROM $tableusers WHERE user_email='$regs[1]' ORDER BY ID DESC LIMIT 1");
if (!$result)
$post_author = 1;
else
@@ -81,11 +81,11 @@ for ($i=1; $i <= $count; $i++) :
}
$date_arr = explode(' ', $ddate);
$date_time = explode(':', $date_arr[3]);
$ddate_H = $date_time[0];
$ddate_i = $date_time[1];
$ddate_s = $date_time[2];
$ddate_m = $date_arr[1];
$ddate_d = $date_arr[0];
$ddate_Y = $date_arr[2];
@@ -136,7 +136,6 @@ for ($i=1; $i <= $count; $i++) :
$post_status = 'publish';
$post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category', 'post_status');
$post_data = add_magic_quotes($post_data);
$post_ID = wp_insert_post($post_data);

View File

@@ -103,9 +103,9 @@ case 'register':
<div id="login">
<h2><?php _e('Registration Complete') ?></h2>
<p><?php printf(__('Username: %s'), '<strong>' . wp_specialchars($user_login) . '</strong>') ?><br />
<p><?php printf(__('Username: %s'), "<strong>$user_login</strong>") ?><br />
<?php printf(__('Password: %s'), '<strong>' . __('emailed to you') . '</strong>') ?> <br />
<?php printf(__('E-mail: %s'), '<strong>' . wp_specialchars($user_email) . '</strong>') ?></p>
<?php printf(__('E-mail: %s'), "<strong>$user_email</strong>") ?></p>
<p class="submit"><a href="wp-login.php"><?php _e('Login'); ?> &raquo;</a></p>
</div>
</body>

View File

@@ -1,27 +1,7 @@
<?php
// Turn register globals off
function unregister_GLOBALS() {
if ( !ini_get('register_globals') )
return;
if ( isset($_REQUEST['GLOBALS']) )
die('GLOBALS overwrite attempt detected');
// Variables that shouldn't be unset
$noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix');
$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
foreach ( $input as $k => $v )
if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) )
unset($GLOBALS[$k]);
}
unregister_GLOBALS();
$HTTP_HOST = getenv('HTTP_HOST'); /* domain name */
$REMOTE_ADDR = getenv('REMOTE_ADDR'); /* visitor's IP */
$HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */
unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories );
// Fix for IIS, which doesn't set REQUEST_URI
if (! isset($_SERVER['REQUEST_URI'])) {
@@ -153,19 +133,13 @@ load_default_textdomain();
// Pull in locale data after loading text domain.
require_once(ABSPATH . WPINC . '/locale.php');
// If already slashed, strip.
if ( get_magic_quotes_gpc() ) {
$_GET = stripslashes_deep($_GET );
$_POST = stripslashes_deep($_POST );
$_COOKIE = stripslashes_deep($_COOKIE);
if ( !get_magic_quotes_gpc() ) {
$_GET = add_magic_quotes($_GET );
$_POST = add_magic_quotes($_POST );
$_COOKIE = add_magic_quotes($_COOKIE);
$_SERVER = add_magic_quotes($_SERVER);
}
// Escape with wpdb.
$_GET = add_magic_quotes($_GET );
$_POST = add_magic_quotes($_POST );
$_COOKIE = add_magic_quotes($_COOKIE);
$_SERVER = add_magic_quotes($_SERVER);
function shutdown_action_hook() {
do_action('shutdown');
}

View File

@@ -562,7 +562,9 @@ class wp_xmlrpc_server extends IXR_Server {
foreach ($catnames as $cat) {
$post_category[] = get_cat_ID($cat);
}
}
} else if ( !empty($catnames) ) {
$post_category = array(get_cat_ID($catnames));
}
// We've got all the data -- post it:
$postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'to_ping');
@@ -576,14 +578,7 @@ class wp_xmlrpc_server extends IXR_Server {
logIO('O', "Posted ! ID: $post_ID");
// FIXME: do we pingback always? pingback($content, $post_ID);
// trackback_url_list($content_struct['mt_tb_ping_urls'],$post_ID);
if ('publish' == $post_status) {
if ($post_pingback) pingback($content, $post_ID);
do_enclose( $content, $post_ID );
do_trackbacks($post_ID);
do_action('publish_post', $post_ID);
}
trackback_url_list($content_struct['mt_tb_ping_urls'],$post_ID);
return strval($post_ID);
}
@@ -625,7 +620,9 @@ class wp_xmlrpc_server extends IXR_Server {
foreach ($catnames as $cat) {
$post_category[] = get_cat_ID($cat);
}
}
} else if ( !empty($catnames) ) {
$post_category = array(get_cat_ID($catnames));
}
$post_excerpt = $content_struct['mt_excerpt'];
$post_more = $content_struct['mt_text_more'];
@@ -667,14 +664,7 @@ class wp_xmlrpc_server extends IXR_Server {
logIO('O',"(MW) Edited ! ID: $post_ID");
// FIXME: do we pingback always? pingback($content, $post_ID);
// trackback_url_list($content_struct['mt_tb_ping_urls'], $post_ID);
if ('publish' == $post_status) {
if ($post_pingback) pingback($content, $post_ID);
do_enclose( $content, $post_ID );
do_trackbacks($post_ID);
do_action('publish_post', $post_ID);
}
do_action('edit_post', $post_ID);
trackback_url_list($content_struct['mt_tb_ping_urls'], $post_ID);
return true;
}
@@ -1265,9 +1255,6 @@ class wp_xmlrpc_server extends IXR_Server {
}
}
if ( empty($context) ) // URL pattern not found
return new IXR_Error(17, 'The source URI does not contain a link to the target URI, and so cannot be used as a source.');
$pagelinkedfrom = preg_replace('#&([^amp\;])#is', '&amp;$1', $pagelinkedfrom);
$context = '[...] ' . wp_specialchars( $excerpt ) . ' [...]';