Make the IXR debug classy. See #8916 props wnorris

git-svn-id: http://svn.automattic.com/wordpress/trunk@10423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-01-23 22:30:23 +00:00
parent 1428dd5a79
commit 4b3d6012aa
1 changed files with 5 additions and 2 deletions

View File

@ -543,7 +543,7 @@ class IXR_Client {
$request .= $xml;
// Now send the request
if ($this->debug) {
echo '<pre>'.htmlspecialchars($request)."\n</pre>\n\n";
echo '<pre class="ixr_request">'.htmlspecialchars($request)."\n</pre>\n\n";
}
if ($this->timeout) {
$fp = @fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout);
@ -574,9 +574,12 @@ class IXR_Client {
if (!$gettingHeaders) {
$contents .= trim($line);
}
if ($this->debug) {
$debug_contents .= $line;
}
}
if ($this->debug) {
echo '<pre>'.htmlspecialchars($contents)."\n</pre>\n\n";
echo '<pre class="ixr_response">'.htmlspecialchars($debug_contents)."\n</pre>\n\n";
}
// Now parse what we've got back
$this->message = new IXR_Message($contents);