2011-03-07 04:09:24 +09:00
|
|
|
<?php
|
2019-09-11 16:12:49 +09:00
|
|
|
// This file is part of GNU social - https://www.gnu.org/software/social
|
|
|
|
//
|
|
|
|
// GNU social is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// GNU social is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2011-03-07 04:09:24 +09:00
|
|
|
/**
|
|
|
|
* Peopletags with the most subscribers section
|
|
|
|
*
|
|
|
|
* @category Widget
|
2019-09-11 16:12:49 +09:00
|
|
|
* @package GNUsocial
|
2011-03-07 04:09:24 +09:00
|
|
|
* @author Evan Prodromou <evan@status.net>
|
|
|
|
* @copyright 2009 StatusNet, Inc.
|
2019-09-11 16:12:49 +09:00
|
|
|
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
|
2011-03-07 04:09:24 +09:00
|
|
|
*/
|
|
|
|
|
2019-09-11 16:12:49 +09:00
|
|
|
defined('GNUSOCIAL') || die();
|
2011-03-07 04:09:24 +09:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Peopletags with the most subscribers section
|
|
|
|
*
|
2019-09-11 16:12:49 +09:00
|
|
|
* @copyright 2009 StatusNet, Inc.
|
|
|
|
* @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
|
2011-03-07 04:09:24 +09:00
|
|
|
*/
|
|
|
|
class PeopletagsBySubsSection extends PeopletagSection
|
|
|
|
{
|
|
|
|
function getPeopletags()
|
|
|
|
{
|
|
|
|
$limit = PEOPLETAGS_PER_SECTION;
|
|
|
|
|
2019-09-11 16:12:49 +09:00
|
|
|
$qry = 'SELECT profile_list.*, subscriber_count AS value ' .
|
|
|
|
'FROM profile_list WHERE profile_list.private = FALSE ' .
|
|
|
|
'ORDER BY value DESC ' .
|
|
|
|
'LIMIT ' . $limit;
|
2011-03-07 04:09:24 +09:00
|
|
|
|
2019-09-11 16:12:49 +09:00
|
|
|
$peopletag = Memcached_DataObject::cachedQuery('Profile_list', $qry, 3600);
|
2011-03-07 04:09:24 +09:00
|
|
|
return $peopletag;
|
|
|
|
}
|
|
|
|
|
|
|
|
function title()
|
|
|
|
{
|
2011-04-15 22:07:35 +09:00
|
|
|
// TRANS: Title for section contaning lists with the most subscribers.
|
|
|
|
return _('Popular lists');
|
2011-03-07 04:09:24 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
function divId()
|
|
|
|
{
|
|
|
|
return 'top_peopletags_by_subs';
|
|
|
|
}
|
|
|
|
}
|