Show
Ignore:
Timestamp:
06/20/08 21:06:57 (2 years ago)
Author:
inureyes
Message:

#1029

  • 변경사항을 1.7 트리에 반영
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.7/lib/model/blog.comment.php

    r6298 r6324  
    125125function getCommentsNotifiedWithPagingForOwner($blogid, $category, $name, $ip, $search, $page, $count) { 
    126126    global $database; 
     127    $postfix = ''; 
     128 
    127129    if (empty($name) && empty($ip) && empty($search)) { 
    128130        $sql = "SELECT 
     
    166168                {$database['prefix']}CommentsNotifiedSiteInfo csiteinfo ON c.siteId = csiteinfo.id 
    167169            WHERE c.blogid = $blogid AND (c.parent is null) "; 
    168         if (!empty($name)) 
     170        if (!empty($name)) { 
    169171            $sql .= ' AND ( c.name = \'' . POD::escapeString($name) . '\') ' ; 
    170         if (!empty($ip)) 
     172            $postfix .= '&name=' . rawurlencode($name); 
     173        } 
     174        if (!empty($ip)) { 
    171175            $sql .= ' AND ( c.ip = \'' . POD::escapeString($ip) . '\') '; 
     176            $postfix .= '&ip=' . rawurlencode($ip); 
     177        } 
    172178        if (!empty($search)) { 
    173179            $sql .= " AND ((c.name LIKE '%$search%') OR (c.homepage LIKE '%$search%') OR (c.comment LIKE '%$search%')) "; 
     180            $postfix .= '&search=' . rawurlencode($search); 
    174181        } 
    175182        $sql .= $childListStr . ' ORDER BY c.modified DESC'; 
    176183    } 
    177     return fetchWithPaging($sql, $page, $count); 
     184 
     185    list($comments, $paging) = fetchWithPaging($sql, $page, $count); 
     186    if (strlen($postfix) > 0) { 
     187        $postfix .= '&withSearch=on'; 
     188        $paging['postfix'] .= $postfix; 
     189    } 
     190 
     191    return array($comments, $paging); 
    178192} 
    179193