summaryrefslogtreecommitdiffstats
path: root/xmlrpc.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-26 11:04:22 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-03-26 11:04:22 +0000
commit6b2942866a251bb84a81cb35811ee9a1d55a8d26 (patch)
tree09b245f77ee6eaf5856b00b0e2e7f97bdb3550d8 /xmlrpc.php
parent2e96b99ceb195735a641e299f3209840cc101052 (diff)
downloadwordpress-mu-6b2942866a251bb84a81cb35811ee9a1d55a8d26.tar.gz
wordpress-mu-6b2942866a251bb84a81cb35811ee9a1d55a8d26.tar.xz
wordpress-mu-6b2942866a251bb84a81cb35811ee9a1d55a8d26.zip
WP Merge to rev 5109
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@934 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'xmlrpc.php')
-rw-r--r--xmlrpc.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/xmlrpc.php b/xmlrpc.php
index ac9229a..9740c81 100644
--- a/xmlrpc.php
+++ b/xmlrpc.php
@@ -261,7 +261,6 @@ class wp_xmlrpc_server extends IXR_Server {
}
// Lookup info on pages.
- $pages = array();
$pages = get_pages();
$num_pages = count($pages);
@@ -280,7 +279,7 @@ class wp_xmlrpc_server extends IXR_Server {
}
// If no pages were found return an error.
else {
- return(new IXR_Error(404, "Sorry, no pages were found."));
+ return(array());
}
}
@@ -1100,6 +1099,14 @@ class wp_xmlrpc_server extends IXR_Server {
return new IXR_Error(401, 'Sorry, you can not edit this post.');
$postdata = wp_get_single_post($post_ID, ARRAY_A);
+
+ // If there is no post data for the give post id, stop
+ // now and return an error. Other wise a new post will be
+ // created (which was the old behavior).
+ if(empty($postdata["ID"])) {
+ return(new IXR_Error(404, "Invalid post id."));
+ }
+
extract($postdata);
$this->escape($postdata);
@@ -1615,7 +1622,7 @@ class wp_xmlrpc_server extends IXR_Server {
/* mt.supportedTextFilters ...returns an empty array because we don't
support per-post text filters yet */
function mt_supportedTextFilters($args) {
- return array();
+ return apply_filters('xmlrpc_text_filters', array());
}