diff --git a/modules/lifepod/lifepod.model.php b/modules/lifepod/lifepod.model.php index c660dfcfd..5f8c82d37 100644 --- a/modules/lifepod/lifepod.model.php +++ b/modules/lifepod/lifepod.model.php @@ -14,7 +14,6 @@ var $userid = ''; var $userkey = ''; - var $address = ''; /** * @brief 초기화 @@ -22,13 +21,6 @@ function init() { } - /** - * @brief lifepod 페이지를 가져오기 위한 기본 값 설정 - **/ - function setInfo($address) { - $this->address = $address; - } - /** * @brief HTTP request 객체 생성 **/ @@ -39,15 +31,15 @@ return $oReqeust; } - function getURL($start, $end) { - return sprintf("%s&start=%s&end=%s", $this->address, $start, $end); + function getURL($address, $start, $end) { + return sprintf("%s&start=%s&end=%s", $address, $start, $end); } /** * @brief lifepod 페이지 정보 가져오기 * @remarks 한해씩 끊어서 페이지를 가져옵니다. 아직 50개 이상의 calendar info가 있는 경우 앞에 것만 가져오는 문제가 있습니다. **/ - function getPage($year) { + function getPage($address, $year) { if($year == null) { $year = date("Y"); @@ -56,7 +48,7 @@ $start = sprintf("%s-01-01",$year); $end = sprintf("%s-01-01",$year+1); - $url = $this->getURL($start, $end); + $url = $this->getURL($address, $start, $end); $oReqeust = $this->getRequest($url); $oResponse = $oReqeust->sendRequest(); diff --git a/modules/lifepod/lifepod.view.php b/modules/lifepod/lifepod.view.php index c4362500a..0bdf99770 100644 --- a/modules/lifepod/lifepod.view.php +++ b/modules/lifepod/lifepod.view.php @@ -44,39 +44,38 @@ if(!$this->grant->view) return $this->dispLifepodMessage('msg_not_permitted'); $oLifepodModel = &getModel('lifepod'); - - Context::get('member_srl', $this->member_srl); - if($this->member_srl) - { - $args->member_srl = $this->member_srl; - } - else - { - $oLifepodModel->setInfo($this->module_info->calendar_address); - } + $caladdresses = split(", ", $this->module_info->calendar_address); $cYear = Context::get('year'); $cMonth = Context::get('month'); $cDay = Context::get('day'); - - $page = $oLifepodModel->getPage($cYear, $cMonth, $cDay); - foreach ($page->data as $key => $val) - { - if($val->childNodes["date-start"]) - { - $val->childNodes["date-start"]->body = $this->dateFormatChange($val->childNodes["date-start"]->body); - } - if($val->childNodes["date-end"]) - { - $plus = 0; - if($val->childNodes["type"]->body == "daylong") - $plus = -1; - $val->childNodes["date-end"]->body = $this->dateFormatChange($val->childNodes["date-end"]->body, $plus); - } - $val->childNodes["description"]->body = str_replace("\n", "
", $val->childNodes["description"]->body); + $calendars = array(); + + foreach($caladdresses as $key => $val) + { + $page = $oLifepodModel->getPage($val, $cYear, $cMonth, $cDay); + foreach ($page->data as $key => $val) + { + if($val->childNodes["date-start"]) + { + $val->childNodes["date-start"]->body = $this->dateFormatChange($val->childNodes["date-start"]->body); + } + + if($val->childNodes["date-end"]) + { + $plus = 0; + if($val->childNodes["type"]->body == "daylong") + $plus = -1; + $val->childNodes["date-end"]->body = $this->dateFormatChange($val->childNodes["date-end"]->body, $plus); + } + + $val->childNodes["description"]->body = str_replace("\n", "
", $val->childNodes["description"]->body); + } + $calendars[] = $page; + } - Context::set('page', $page); + Context::set('calendars', $calendars); $this->setTemplateFile('list'); } diff --git a/modules/lifepod/skins/xe_official/list.html b/modules/lifepod/skins/xe_official/list.html index 9af42fd20..63f0c663e 100644 --- a/modules/lifepod/skins/xe_official/list.html +++ b/modules/lifepod/skins/xe_official/list.html @@ -8,8 +8,10 @@