X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fpopularnoticesection.php;h=35b914a50c056303fe02222d3600f1837b7c8196;hb=093857c582a68b39e0d65523d27f25ede7b7fed6;hp=e47c9b3855d22c22e65b2707d1830511ee7930f6;hpb=d846c5fc9927b93e59192e19fd59a8d350b0e3c9;p=quix0rs-gnu-social.git diff --git a/lib/popularnoticesection.php b/lib/popularnoticesection.php index e47c9b3855..35b914a50c 100644 --- a/lib/popularnoticesection.php +++ b/lib/popularnoticesection.php @@ -1,6 +1,6 @@ . * * @category Widget - * @package Laconica - * @author Evan Prodromou - * @copyright 2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -38,10 +38,10 @@ if (!defined('LACONICA')) { * group, or site. * * @category Widget - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ class PopularNoticeSection extends NoticeSection @@ -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')),