Changeset 6324 for branches/1.7/lib/model/blog.comment.php
- Timestamp:
- 06/20/08 21:06:57 (2 years ago)
- Files:
-
- 1 modified
-
branches/1.7/lib/model/blog.comment.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.7/lib/model/blog.comment.php
r6298 r6324 125 125 function getCommentsNotifiedWithPagingForOwner($blogid, $category, $name, $ip, $search, $page, $count) { 126 126 global $database; 127 $postfix = ''; 128 127 129 if (empty($name) && empty($ip) && empty($search)) { 128 130 $sql = "SELECT … … 166 168 {$database['prefix']}CommentsNotifiedSiteInfo csiteinfo ON c.siteId = csiteinfo.id 167 169 WHERE c.blogid = $blogid AND (c.parent is null) "; 168 if (!empty($name)) 170 if (!empty($name)) { 169 171 $sql .= ' AND ( c.name = \'' . POD::escapeString($name) . '\') ' ; 170 if (!empty($ip)) 172 $postfix .= '&name=' . rawurlencode($name); 173 } 174 if (!empty($ip)) { 171 175 $sql .= ' AND ( c.ip = \'' . POD::escapeString($ip) . '\') '; 176 $postfix .= '&ip=' . rawurlencode($ip); 177 } 172 178 if (!empty($search)) { 173 179 $sql .= " AND ((c.name LIKE '%$search%') OR (c.homepage LIKE '%$search%') OR (c.comment LIKE '%$search%')) "; 180 $postfix .= '&search=' . rawurlencode($search); 174 181 } 175 182 $sql .= $childListStr . ' ORDER BY c.modified DESC'; 176 183 } 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); 178 192 } 179 193
