summaryrefslogtreecommitdiff
path: root/lib/popularnoticesection.php
diff options
context:
space:
mode:
authorBrenda Wallace <shiny@cpan.org>2009-06-26 22:13:41 +1200
committerBrenda Wallace <shiny@cpan.org>2009-07-15 20:17:01 +1200
commit1a151ff6f686da198aac72a0adb5001f5d6dcd43 (patch)
treeaf8c977b578cce5266c27acdcaef07be9d953bb0 /lib/popularnoticesection.php
parent63ea2b7c451640910d4190c7c0d904af688a85d5 (diff)
used SQL standard LIMIT/OFFSET, because every database can understand that
Diffstat (limited to 'lib/popularnoticesection.php')
-rw-r--r--lib/popularnoticesection.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/popularnoticesection.php b/lib/popularnoticesection.php
index e47c9b385..167a6ff8d 100644
--- a/lib/popularnoticesection.php
+++ b/lib/popularnoticesection.php
@@ -74,11 +74,7 @@ class PopularNoticeSection extends NoticeSection
$offset = 0;
$limit = NOTICES_PER_SECTION + 1;
- if (common_config('db', 'type') == 'pgsql') {
- $qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset;
- } else {
- $qry .= ' LIMIT ' . $offset . ', ' . $limit;
- }
+ $qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset;
$notice = Memcached_DataObject::cachedQuery('Notice',
sprintf($qry, common_config('popular', 'dropoff')),