summaryrefslogtreecommitdiffstats
path: root/xmlrpc.php
diff options
context:
space:
mode:
Diffstat (limited to 'xmlrpc.php')
-rw-r--r--xmlrpc.php44
1 files changed, 22 insertions, 22 deletions
diff --git a/xmlrpc.php b/xmlrpc.php
index 6a8c769..d878cd4 100644
--- a/xmlrpc.php
+++ b/xmlrpc.php
@@ -12,10 +12,10 @@ if ( isset($HTTP_RAW_POST_DATA) )
include('./wp-config.php');
if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd
-header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
+header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
?>
-<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
+<?php echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd">
<service>
<engineName>WordPress</engineName>
@@ -190,9 +190,9 @@ class wp_xmlrpc_server extends IXR_Server {
$struct = array(
'isAdmin' => $is_admin,
- 'url' => get_settings('home') . '/',
+ 'url' => get_option('home') . '/',
'blogid' => '1',
- 'blogName' => get_settings('blogname')
+ 'blogName' => get_option('blogname')
);
return array($struct);
@@ -328,8 +328,8 @@ class wp_xmlrpc_server extends IXR_Server {
return new IXR_Error(401, 'Sorry, this user can not edit the template.');
}
- /* warning: here we make the assumption that the weblog's URI is on the same server */
- $filename = get_settings('home') . '/';
+ /* warning: here we make the assumption that the weblog's URL is on the same server */
+ $filename = get_option('home') . '/';
$filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
$f = fopen($filename, 'r');
@@ -363,8 +363,8 @@ class wp_xmlrpc_server extends IXR_Server {
return new IXR_Error(401, 'Sorry, this user can not edit the template.');
}
- /* warning: here we make the assumption that the weblog's URI is on the same server */
- $filename = get_settings('home') . '/';
+ /* warning: here we make the assumption that the weblog's URL is on the same server */
+ $filename = get_option('home') . '/';
$filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename);
if ($f = fopen($filename, 'w+')) {
@@ -544,11 +544,11 @@ class wp_xmlrpc_server extends IXR_Server {
$post_more = $content_struct['mt_text_more'];
$comment_status = (empty($content_struct['mt_allow_comments'])) ?
- get_settings('default_comment_status')
+ get_option('default_comment_status')
: $content_struct['mt_allow_comments'];
$ping_status = (empty($content_struct['mt_allow_pings'])) ?
- get_settings('default_ping_status')
+ get_option('default_ping_status')
: $content_struct['mt_allow_pings'];
if ($post_more) {
@@ -641,11 +641,11 @@ class wp_xmlrpc_server extends IXR_Server {
$to_ping = $content_struct['mt_tb_ping_urls'];
$comment_status = (empty($content_struct['mt_allow_comments'])) ?
- get_settings('default_comment_status')
+ get_option('default_comment_status')
: $content_struct['mt_allow_comments'];
$ping_status = (empty($content_struct['mt_allow_pings'])) ?
- get_settings('default_ping_status')
+ get_option('default_ping_status')
: $content_struct['mt_allow_pings'];
// Do some timestamp voodoo
@@ -1111,7 +1111,7 @@ class wp_xmlrpc_server extends IXR_Server {
$error_code = -1;
// Check if the page linked to is in our site
- $pos1 = strpos($pagelinkedto, str_replace(array('http://www.','http://','https://www.','https://'), '', get_settings('home')));
+ $pos1 = strpos($pagelinkedto, str_replace(array('http://www.','http://','https://www.','https://'), '', get_option('home')));
if( !$pos1 )
return new IXR_Error(0, 'Is there no link to us?');
@@ -1153,24 +1153,24 @@ class wp_xmlrpc_server extends IXR_Server {
}
} else {
// TODO: Attempt to extract a post ID from the given URL
- return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
+ return new IXR_Error(33, 'The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
}
$post_ID = (int) $post_ID;
- logIO("O","(PB) URI='$pagelinkedto' ID='$post_ID' Found='$way'");
+ logIO("O","(PB) URL='$pagelinkedto' ID='$post_ID' Found='$way'");
$post = get_post($post_ID);
if ( !$post ) // Post_ID not found
- return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
+ return new IXR_Error(33, 'The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
if ( $post_ID == url_to_postid($pagelinkedfrom) )
- return new IXR_Error(0, 'The source URI and the target URI cannot both point to the same resource.');
+ return new IXR_Error(0, 'The source URL and the target URL cannot both point to the same resource.');
// Check if pings are on
if ( 'closed' == $post->ping_status )
- return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
+ return new IXR_Error(33, 'The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
// Let's check that the remote site didn't already pingback this entry
$result = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post_ID' AND comment_author_url = '$pagelinkedfrom'");
@@ -1184,7 +1184,7 @@ class wp_xmlrpc_server extends IXR_Server {
// Let's check the remote site
$linea = wp_remote_fopen( $pagelinkedfrom );
if ( !$linea )
- return new IXR_Error(16, 'The source URI does not exist.');
+ return new IXR_Error(16, 'The source URL does not exist.');
// Work around bug in strip_tags():
$linea = str_replace('<!DOC', '<DOC', $linea);
@@ -1219,7 +1219,7 @@ 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.');
+ return new IXR_Error(17, 'The source URL does not contain a link to the target URL, and so cannot be used as a source.');
$pagelinkedfrom = preg_replace('#&([^amp\;])#is', '&amp;$1', $pagelinkedfrom);
@@ -1259,14 +1259,14 @@ class wp_xmlrpc_server extends IXR_Server {
$post_ID = url_to_postid($url);
if (!$post_ID) {
// We aren't sure that the resource is available and/or pingback enabled
- return new IXR_Error(33, 'The specified target URI cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
+ return new IXR_Error(33, 'The specified target URL cannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');
}
$actual_post = wp_get_single_post($post_ID, ARRAY_A);
if (!$actual_post) {
// No such post = resource not found
- return new IXR_Error(32, 'The specified target URI does not exist.');
+ return new IXR_Error(32, 'The specified target URL does not exist.');
}
$comments = $wpdb->get_results("SELECT comment_author_url, comment_content, comment_author_IP, comment_type FROM $wpdb->comments WHERE comment_post_ID = $post_ID");