소스 검색

Update atom.php

syrnon 11 년 전
부모
커밋
bfc24f3794
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      classes/feeditem/atom.php

+ 9 - 1
classes/feeditem/atom.php

@@ -1,5 +1,13 @@
 <?php
 class FeedItem_Atom extends FeedItem_Common {
+
+   	 private $baseUrl;
+
+  	 function __construct($elem, $doc, $xpath, $baseUrl) {
+  	 	parent::__construct($elem, $doc, $xpath);
+		$this->baseUrl= $baseUrl;
+   	 }
+
 	function get_id() {
 		$id = $this->elem->getElementsByTagName("id")->item(0);
 
@@ -39,7 +47,7 @@ class FeedItem_Atom extends FeedItem_Common {
 					|| $link->getAttribute("rel") == "alternate"
 					|| $link->getAttribute("rel") == "standout")) {
 
-				return $link->getAttribute("href");
+				return $this->baseUrl.$link->getAttribute("href");
 			}
 		}
 	}