rss_reader위젯이 PEAR 사용부에서 url이 아닌 path가 잘못 넘어가던 부분 수정하여 동작하도록 변경

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3814 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-02-26 01:28:29 +00:00
parent 5ef606d850
commit 8aaf1858e2

View file

@ -35,22 +35,20 @@
if ($URL_parsed["query"] != "") $path .= "?".$URL_parsed["query"];
$oReqeust = new HTTP_Request($path);
$oReqeust = new HTTP_Request($args->rss_url);
$oReqeust->addHeader('Content-Type', 'application/xml');
$oReqeust->setMethod('GET');
$user = $URL_parsed["user"];
$pass = $URL_parsed["pass"];
$user = $URL_parsed["user"];
$pass = $URL_parsed["pass"];
if($user)
$oReqeust->setBasicAuth($user, $pass);
if($user) $oReqeust->setBasicAuth($user, $pass);
$oResponse = $oReqeust->sendRequest();
if (PEAR::isError($oResponse))
{
debugPrint("error");
return new Object(-1, 'msg_fail_to_request_open');
}
if (PEAR::isError($oResponse)) {
debugPrint("error");
return new Object(-1, 'msg_fail_to_request_open');
}
$buff = $oReqeust->getResponseBody();
$encoding = preg_match("/<\?xml.*encoding=\"(.+)\".*\?>/i", $buff, $matches);
if($encoding && !preg_match("/UTF-8/i", $matches[1])) $buff = trim(iconv($matches[1]=="ks_c_5601-1987"?"EUC-KR":$matches[1], "UTF-8", $buff));