From 417116a7813c6880b1877c394659300077f381ec Mon Sep 17 00:00:00 2001 From: inureyes Date: Sat, 28 Nov 2009 08:30:06 +0000 Subject: [PATCH] =?UTF-8?q?=20refs=20#1249=20=20=20*=20=EC=B5=9C=EA=B7=BC?= =?UTF-8?q?=20=EB=8C=93=EA=B8=80=20=EC=B6=9C=EB=A0=A5=20=EB=B6=80=EB=B6=84?= =?UTF-8?q?=20=EC=99=84=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framework/Dispatcher.php | 2 +- interface/i/comment/index.php | 34 ++++++++++++++++++++++++++------- interface/i/guestbook/index.php | 4 ++-- library/model/blog.comment.php | 6 ++++-- library/view/iphoneView.php | 29 +++++++++++++++------------- 5 files changed, 50 insertions(+), 25 deletions(-) diff --git a/framework/Dispatcher.php b/framework/Dispatcher.php index 23c46e7fa..2aae1bb68 100644 --- a/framework/Dispatcher.php +++ b/framework/Dispatcher.php @@ -157,7 +157,7 @@ private function URIinterpreter() { $interfacePath = 'interface/blog/'.$pathPart.'/index.php'; break; case 'i': - if(in_array($uri['fragment'][1],array('entry'))) { + if(in_array($uri['fragment'][1],array('entry','comment'))) { $pathPart = 'i/'.$uri['fragment'][1]; } else { $pathPath = 'i/'; diff --git a/interface/i/comment/index.php b/interface/i/comment/index.php index 982893030..22cdfce9f 100644 --- a/interface/i/comment/index.php +++ b/interface/i/comment/index.php @@ -5,16 +5,36 @@ define('__TEXTCUBE_IPHONE__', true); require ROOT . '/library/preprocessor.php'; requireView('iphoneView'); -list($entries, $paging) = getEntryWithPaging($blogid, $suri['id']); -$entry = $entries ? $entries[0] : null; +if(isset($_GET['page'])) $page = $_GET['page']; +else $page = 1; +if(!empty($suri['id'])) { // entry-related comment print + list($entries, $paging) = getEntryWithPaging($blogid, $suri['id']); + $entry = $entries ? $entries[0] : null; ?>
" title="Comment " selected="false"> - + +
+ +
+ +
+ diff --git a/interface/i/guestbook/index.php b/interface/i/guestbook/index.php index 8e573b2b1..978dd5807 100644 --- a/interface/i/guestbook/index.php +++ b/interface/i/guestbook/index.php @@ -8,13 +8,13 @@ if(isset($suri['id'])) $page = $suri['id']; else $page = 1; ?> -
+
diff --git a/library/model/blog.comment.php b/library/model/blog.comment.php index 53d81de6f..bea90b587 100644 --- a/library/model/blog.comment.php +++ b/library/model/blog.comment.php @@ -226,9 +226,11 @@ function getCommentCommentsNotified($parent) { function getCommentsWithPaging($blogid, $entryId, $page, $count, $url = null, $prefix = '?page=', $postfix = '', $countItem = null) { global $database; $comments = array(); + if($entryId != -1) { + $filter = 'AND entry = '.$entryId; + } else $filter = ''; $sql = "SELECT * FROM {$database['prefix']}Comments - WHERE blogid = $blogid - AND entry = $entryId + WHERE blogid = $blogid $filter AND parent IS NULL AND isfiltered = 0 ORDER BY written DESC"; diff --git a/library/view/iphoneView.php b/library/view/iphoneView.php index ad63adf5d..7691bff4f 100644 --- a/library/view/iphoneView.php +++ b/library/view/iphoneView.php @@ -361,24 +361,19 @@ function printIphoneHtmlFooter() {
' : '').nl2br(addLinkSense(htmlspecialchars($commentItem['comment'])));?> + '.($entryId == 0 ? _text('비밀 방명록') : _text('비밀 댓글')).' >>' : '').nl2br(addLinkSense(htmlspecialchars($commentItem['comment'])));?>