From c8bc698b9356fd60c1e22946e3d8f235e21ea2aa Mon Sep 17 00:00:00 2001 From: zero Date: Thu, 27 Dec 2007 03:04:07 +0000 Subject: [PATCH] =?UTF-8?q?=EC=A1=B4=EC=9E=AC=ED=95=98=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8A=94=20=EA=B2=8C=EC=8B=9C=EA=B8=80=EC=9D=BC?= =?UTF-8?q?=EB=95=8C=20=EC=8D=B8=EB=84=A4=EC=9D=BC=20=EC=B6=94=EC=B6=9C?= =?UTF-8?q?=EC=8B=9C=20=EC=8D=B8=EB=84=A4=EC=9D=BC=20=EC=97=AC=EB=B6=80?= =?UTF-8?q?=EB=A5=BC=20=EC=B2=B4=ED=81=AC=ED=95=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95.?= =?UTF-8?q?=20(=EC=9B=B9=EC=A7=84=ED=98=95=20=EC=9C=84=EC=A0=AF=EC=9D=98?= =?UTF-8?q?=20=EB=AC=B4=ED=95=9C=EB=A3=A8=ED=94=84=20=EB=B0=A9=EC=A7=80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3422 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/document/document.item.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/modules/document/document.item.php b/modules/document/document.item.php index f47b850ec..1d437b931 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -101,6 +101,7 @@ } function doCart() { + if(!$this->document_srl) return false; if($this->isCarted()) $this->removeCart(); else $this->addCart(); } @@ -118,6 +119,8 @@ } function notify($type, $content) { + if(!$this->document_srl) return; + // useNotify가 아니면 return if(!$this->useNotify()) return; @@ -180,6 +183,8 @@ } function getTitle($cut_size = 0, $tail='...') { + if(!$this->document_srl) return; + $title = $this->getTitleText($cut_size, $tail); $attrs = array(); @@ -191,6 +196,8 @@ } function getContentText($strlen = 0) { + if(!$this->document_srl) return; + if($this->isSecret() && !$this->isGranted()) return Context::getLang('msg_is_secret'); $_SESSION['accessible'][$this->document_srl] = true; @@ -203,6 +210,8 @@ } function getContent($add_document_info = true) { + if(!$this->document_srl) return; + if($this->isSecret() && !$this->isGranted()) return Context::getLang('msg_is_secret'); $_SESSION['accessible'][$this->document_srl] = true; @@ -242,6 +251,8 @@ } function getSummary($str_size = 50) { + if(!$this->document_srl) return; + $content = htmlspecialchars(strip_tags(str_replace(" "," ",$this->getContent(false)))); return cut_str($content, $str_size, '...'); } @@ -288,6 +299,8 @@ } function getTrackbackUrl() { + if(!$this->document_srl) return; + // 스팸을 막기 위한 key 생성 $oTrackbackModel = &getModel('trackback'); return $oTrackbackModel->getTrackbackUrl($this->document_srl); @@ -340,6 +353,8 @@ } function getTrackbacks() { + if(!$this->document_srl) return; + if(!$this->allowTrackback() || !$this->get('trackback_count')) return; $oTrackbackModel = &getModel('trackback'); @@ -347,11 +362,14 @@ } function thumbnailExists($width = 80, $height = 0, $type = '') { + if(!$this->document_srl) return false; if(!$this->getThumbnail($width, $height, $type)) return false; return true; } function getThumbnail($width = 80, $height = 0, $thumbnail_type = '') { + if(!$this->document_srl) return; + if(!$height) $height = $width; $thumbnail_type = ''; @@ -436,6 +454,7 @@ * $time_interval 에 지정된 시간(초)로 새글/최신 업데이트글의 판별 **/ function getExtraImages($time_interval = 43200) { + if(!$this->document_srl) return; // 아이콘 목록을 담을 변수 미리 설정 $buffs = array(); @@ -481,6 +500,8 @@ * @brief getExtraImages로 구한 값을 이미지 태그를 씌워서 리턴 **/ function printExtraImages($time_check = 43200) { + if(!$this->document_srl) return; + // 아이콘 디렉토리 구함 $path = sprintf('%s%s',getUrl(), 'modules/document/tpl/icons/'); @@ -495,11 +516,15 @@ } function hasUploadedFiles() { + if(!$this->document_srl) return; + if($this->isSecret() && !$this->isGranted()) return false; return $this->get('uploaded_count')? true : false; } function getUploadedFiles() { + if(!$this->document_srl) return; + if($this->isSecret() && !$this->isGranted()) return; if(!$this->get('uploaded_count')) return;