Changeset 4133 for trunk/xmlrpc.php
- Timestamp:
- 08/30/2006 04:40:17 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r4049 r4133 329 329 } 330 330 331 /* warning: here we make the assumption that the weblog's UR Iis on the same server */331 /* warning: here we make the assumption that the weblog's URL is on the same server */ 332 332 $filename = get_settings('home') . '/'; 333 333 $filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename); … … 364 364 } 365 365 366 /* warning: here we make the assumption that the weblog's UR Iis on the same server */366 /* warning: here we make the assumption that the weblog's URL is on the same server */ 367 367 $filename = get_settings('home') . '/'; 368 368 $filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename); … … 1154 1154 } else { 1155 1155 // TODO: Attempt to extract a post ID from the given URL 1156 return new IXR_Error(33, 'The specified target UR Icannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');1156 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.'); 1157 1157 } 1158 1158 $post_ID = (int) $post_ID; 1159 1159 1160 1160 1161 logIO("O","(PB) UR I='$pagelinkedto' ID='$post_ID' Found='$way'");1161 logIO("O","(PB) URL='$pagelinkedto' ID='$post_ID' Found='$way'"); 1162 1162 1163 1163 $post = get_post($post_ID); 1164 1164 1165 1165 if ( !$post ) // Post_ID not found 1166 return new IXR_Error(33, 'The specified target UR Icannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');1166 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.'); 1167 1167 1168 1168 if ( $post_ID == url_to_postid($pagelinkedfrom) ) 1169 return new IXR_Error(0, 'The source UR I and the target URIcannot both point to the same resource.');1169 return new IXR_Error(0, 'The source URL and the target URL cannot both point to the same resource.'); 1170 1170 1171 1171 // Check if pings are on 1172 1172 if ( 'closed' == $post->ping_status ) 1173 return new IXR_Error(33, 'The specified target UR Icannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');1173 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.'); 1174 1174 1175 1175 // Let's check that the remote site didn't already pingback this entry … … 1185 1185 $linea = wp_remote_fopen( $pagelinkedfrom ); 1186 1186 if ( !$linea ) 1187 return new IXR_Error(16, 'The source UR Idoes not exist.');1187 return new IXR_Error(16, 'The source URL does not exist.'); 1188 1188 1189 1189 // Work around bug in strip_tags(): … … 1220 1220 1221 1221 if ( empty($context) ) // URL pattern not found 1222 return new IXR_Error(17, 'The source UR I does not contain a link to the target URI, and so cannot be used as a source.');1222 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.'); 1223 1223 1224 1224 $pagelinkedfrom = preg_replace('#&([^amp\;])#is', '&$1', $pagelinkedfrom); … … 1260 1260 if (!$post_ID) { 1261 1261 // We aren't sure that the resource is available and/or pingback enabled 1262 return new IXR_Error(33, 'The specified target UR Icannot be used as a target. It either doesn\'t exist, or it is not a pingback-enabled resource.');1262 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.'); 1263 1263 } 1264 1264 … … 1267 1267 if (!$actual_post) { 1268 1268 // No such post = resource not found 1269 return new IXR_Error(32, 'The specified target UR Idoes not exist.');1269 return new IXR_Error(32, 'The specified target URL does not exist.'); 1270 1270 } 1271 1271
Note: See TracChangeset
for help on using the changeset viewer.