mt_allow_pings fix. Props Joseph Scott and Allan Odgaard. fixes #4770 for 2.3
git-svn-id: http://svn.automattic.com/wordpress/trunk@5898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8d75bcef27
commit
4f183b4fe7
16
xmlrpc.php
16
xmlrpc.php
|
@ -1023,7 +1023,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
|
|
||||||
if(isset($content_struct["mt_allow_pings"])) {
|
if(isset($content_struct["mt_allow_pings"])) {
|
||||||
if(!is_numeric($content_struct["mt_allow_pings"])) {
|
if(!is_numeric($content_struct["mt_allow_pings"])) {
|
||||||
switch($content["mt_allow_pings"]) {
|
switch($content_struct['mt_allow_pings']) {
|
||||||
case "closed":
|
case "closed":
|
||||||
$ping_status = "closed";
|
$ping_status = "closed";
|
||||||
break;
|
break;
|
||||||
|
@ -1233,7 +1233,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
|
|
||||||
if(isset($content_struct["mt_allow_pings"])) {
|
if(isset($content_struct["mt_allow_pings"])) {
|
||||||
if(!is_numeric($content_struct["mt_allow_pings"])) {
|
if(!is_numeric($content_struct["mt_allow_pings"])) {
|
||||||
switch($content["mt_allow_pings"]) {
|
switch($content_struct["mt_allow_pings"]) {
|
||||||
case "closed":
|
case "closed":
|
||||||
$ping_status = "closed";
|
$ping_status = "closed";
|
||||||
break;
|
break;
|
||||||
|
@ -1260,18 +1260,6 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only set ping_status if it was provided.
|
|
||||||
if(isset($content_struct["mt_allow_pings"])) {
|
|
||||||
switch((int) $content_struct["mt_allow_pings"]) {
|
|
||||||
case 0:
|
|
||||||
$ping_status = "closed";
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
$ping_status = "open";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$post_title = $content_struct['title'];
|
$post_title = $content_struct['title'];
|
||||||
$post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
|
$post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
|
||||||
$catnames = $content_struct['categories'];
|
$catnames = $content_struct['categories'];
|
||||||
|
|
Loading…
Reference in New Issue