Changeset 3321 for sandbox/lib/model/blog.entry.php
- Timestamp:
- 05/24/07 16:21:52 (20 months ago)
- Files:
-
- 1 modified
-
sandbox/lib/model/blog.entry.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sandbox/lib/model/blog.entry.php
r3300 r3321 100 100 $tag = mysql_tt_escape_string($tag); 101 101 $visibility = doesHaveOwnership() ? '' : 'AND e.visibility > 0 AND (c.visibility > 1 OR e.category = 0)'; 102 $sql = "SELECT e. *102 $sql = "SELECT e.owner, e.id, e.title, e.comments, e.slogan, e.published 103 103 FROM {$database['prefix']}Entries e 104 104 LEFT JOIN {$database['prefix']}TagRelations t ON e.id = t.entry AND e.owner = t.owner … … 113 113 $cond = "AND e.published >= " . getTimeFromPeriod($period) . " AND e.published < " . getTimeFromPeriod(addPeriod($period)); 114 114 $visibility = doesHaveOwnership() ? '' : 'AND e.visibility > 0 AND (c.visibility > 1 OR e.category = 0)'; 115 $sql = "SELECT e. *115 $sql = "SELECT e.owner, e.id, e.title, e.comments, e.slogan, e.published 116 116 FROM {$database['prefix']}Entries e 117 117 LEFT JOIN {$database['prefix']}Categories c ON e.category = c.id AND e.owner = c.owner … … 126 126 $cond = empty($search) ? '' : "AND (title LIKE '%$search%' OR content LIKE '%$search%')"; 127 127 $visibility = doesHaveOwnership() ? '' : 'AND e.visibility > 1 AND (c.visibility > 1 OR e.category = 0)'; 128 $sql = "SELECT e. *128 $sql = "SELECT e.owner, e.id, e.title, e.comments, e.slogan, e.published 129 129 FROM {$database['prefix']}Entries e 130 130 LEFT JOIN {$database['prefix']}Categories c ON e.category = c.id AND e.owner = c.owner … … 182 182 } 183 183 184 function getEntriesWithPagingByNotice($owner, $page, $count ) {184 function getEntriesWithPagingByNotice($owner, $page, $count, $countItem = null) { 185 185 global $database, $folderURL, $suri; 186 186 $visibility = doesHaveOwnership() ? '' : 'AND visibility = 2'; 187 $sql = "SELECT *, '" . _text('공지') . "' categoryLabel FROM {$database['prefix']}Entries WHERE owner = $owner $visibility AND category = -2 ORDER BY published DESC"; 188 return fetchWithPaging($sql, $page, $count, "$folderURL/{$suri['value']}"); 187 $sql = "SELECT * 188 FROM {$database['prefix']}Entries 189 WHERE owner = $owner $visibility AND category = -2 190 ORDER BY published DESC"; 191 return fetchWithPaging($sql, $page, $count, "$folderURL/{$suri['value']}","?page=", $countItem); 189 192 } 190 193
