플래닛모듈의 이전/다음 날짜를 DB를 통해서 글이 존재하는 날짜를 구하도록 코드 변경

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5140 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-12-22 02:12:20 +00:00
parent 8175cbc67b
commit bcd0ec91fb
5 changed files with 47 additions and 6 deletions

View file

@ -122,6 +122,23 @@
return $this->get('close_notice')=='Y'?true:false;
}
function getPrevDate($date) {
if(!$this->isExists()) return;
$args->cur_date = substr($date,0,8).'000000';
if(!$this->isHome()) $args->module_srl = $this->getModuleSrl();
$output = executeQuery('planet.getPrevDate', $args);
return substr($output->data->prev_date,0,8);
}
function getNextDate($date) {
if(!$this->isExists()) return;
if(!$date) return;
$args->cur_date = substr($date,0,8).'235959';
if(!$this->isHome()) $args->module_srl = $this->getModuleSrl();
$output = executeQuery('planet.getNextDate', $args);
return substr($output->data->next_date,0,8);
}
function isMyPlanet($planet = null) {
if(!$this->isExists()) return;
if(!Context::get('is_logged')) return false;