Changeset 6324

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

#1029

  • 변경사항을 1.7 트리에 반영
Location:
branches/1.7
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/1.7/interface/owner/communication/comment/index.php

    r6240 r6324  
    442442                                    <input type="text" id="search" class="input-text" name="search" value="<?php echo htmlspecialchars($search);?>" onkeydown="if (event.keyCode == '13') { document.getElementById('search-form').withSearch.value = 'on'; document.getElementById('search-form').submit(); }" /> 
    443443                                    <input type="hidden" name="withSearch" value="" /> 
     444                                    <input type="hidden" name="status" value="<?php echo $_POST['status'];?>" /> 
    444445                                    <input type="submit" class="search-button input-button" value="<?php echo _t('검색');?>" onclick="document.getElementById('search-form').withSearch.value = 'on'; document.getElementById('search-form').submit();" /> 
    445446                                </div> 
  • branches/1.7/interface/owner/communication/notify/index.php

    r5926 r6324  
    55if (isset($_POST['page'])) 
    66    $_GET['page'] = $_POST['page']; 
     7if (isset($_GET['category'])) $_POST['category'] = $_GET['category']; 
     8if (isset($_GET['ip'])) $_POST['ip'] = $_GET['ip']; 
     9if (isset($_GET['name'])) $_POST['name'] = $_GET['name']; 
     10if (isset($_GET['perPage'])) $_POST['perPage'] = $_GET['perPage']; 
     11if (isset($_GET['search'])) $_POST['search'] = $_GET['search']; 
     12if (isset($_GET['withSearch'])) $_POST['withSearch'] = $_GET['withSearch']; 
     13 
    714if(count($_POST) > 0) { 
    815    $IV = array( 
     
    173180                             
    174181                            <form id="list-form" method="post" action="<?php echo $blogURL;?>/owner/communication/notify"> 
     182<?php 
     183    if(isset($_POST['search'])) echo '                              <input type="hidden" name="search" value="'.$_POST['search'].'" />'.CRLF; 
     184    if(isset($_POST['withSearch'])) echo '                              <input type="hidden" name="withSearch" value="'.$_POST['withSearch'].'" />'.CRLF; 
     185?>       
    175186                                <table class="data-inbox" cellspacing="0" cellpadding="0"> 
    176187                                    <thead> 
  • 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