mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Split feed_limit into feed_limit_post and feed_limit_topic. Drop feed_overall_topics_limit.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10366 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
42c5be5dac
commit
a4cee51de5
4 changed files with 11 additions and 9 deletions
|
@ -610,7 +610,7 @@ class phpbb_feed_base
|
|||
*/
|
||||
class phpbb_feed_post_base extends phpbb_feed_base
|
||||
{
|
||||
var $num_items = 'feed_limit';
|
||||
var $num_items = 'feed_limit_post';
|
||||
|
||||
function set_keys()
|
||||
{
|
||||
|
@ -651,6 +651,8 @@ class phpbb_feed_post_base extends phpbb_feed_base
|
|||
*/
|
||||
class phpbb_feed_topic_base extends phpbb_feed_base
|
||||
{
|
||||
var $num_items = 'feed_limit_topic';
|
||||
|
||||
function set_keys()
|
||||
{
|
||||
$this->set('title', 'topic_title');
|
||||
|
@ -1114,8 +1116,6 @@ class phpbb_feed_forums extends phpbb_feed_base
|
|||
*/
|
||||
class phpbb_feed_news extends phpbb_feed_topic_base
|
||||
{
|
||||
var $num_items = 'feed_limit';
|
||||
|
||||
function get_news_forums()
|
||||
{
|
||||
global $db, $cache;
|
||||
|
@ -1197,8 +1197,6 @@ class phpbb_feed_news extends phpbb_feed_topic_base
|
|||
*/
|
||||
class phpbb_feed_topics extends phpbb_feed_topic_base
|
||||
{
|
||||
var $num_items = 'feed_overall_topics_limit';
|
||||
|
||||
function get_sql()
|
||||
{
|
||||
global $db, $config;
|
||||
|
|
|
@ -267,10 +267,10 @@ class acp_board
|
|||
'legend1' => 'ACP_FEED_GENERAL',
|
||||
'feed_enable' => array('lang' => 'ACP_FEED_ENABLE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_item_statistics' => array('lang' => 'ACP_FEED_ITEM_STATISTICS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
|
||||
'feed_limit' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
|
||||
'feed_limit_topic' => array('lang' => 'ACP_FEED_LIMIT_TOPIC', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
|
||||
'feed_overall_forums' => array('lang' => 'ACP_FEED_OVERALL_FORUMS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_overall_topics' => array('lang' => 'ACP_FEED_OVERALL_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_overall_topics_limit' => array('lang' => 'ACP_FEED_OVERALL_TOPIC_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => false),
|
||||
'feed_limit_post' => array('lang' => 'ACP_FEED_LIMIT_POST', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
|
||||
'feed_overall' => array('lang' => 'ACP_FEED_OVERALL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_forum' => array('lang' => 'ACP_FEED_FORUM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
'feed_topic' => array('lang' => 'ACP_FEED_TOPIC', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
|
||||
|
|
|
@ -1578,6 +1578,8 @@ function change_database_data(&$no_updates, $version)
|
|||
|
||||
// ATOM Feeds
|
||||
set_config('feed_overall', '1');
|
||||
set_config('feed_limit_post', (string) (isset($config['feed_limit']) ? (int) $config['feed_limit'] : 15));
|
||||
set_config('feed_limit_topic', (string) (isset($config['feed_overall_topics_limit']) ? (int) $config['feed_overall_topics_limit'] : 10));
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -251,8 +251,10 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'ACP_FEED_ENABLE' => 'Enable Feeds',
|
||||
'ACP_FEED_ENABLE_EXPLAIN' => 'Turns on or off ATOM Feeds for the entire board.<br />Disabling this switches off all Feeds, no matter how the options below are set.',
|
||||
'ACP_FEED_LIMIT' => 'Number of items',
|
||||
'ACP_FEED_LIMIT_EXPLAIN' => 'The maximum number of feed items to display.',
|
||||
'ACP_FEED_LIMIT_POST' => 'Number of items in post based feeds',
|
||||
'ACP_FEED_LIMIT_POST_EXPLAIN' => 'The maximum number of feed items to display in post based feeds.',
|
||||
'ACP_FEED_LIMIT_TOPIC' => 'Number of items in topic based feeds',
|
||||
'ACP_FEED_LIMIT_TOPIC_EXPLAIN' => 'The maximum number of feed items to display in topic based feeds.',
|
||||
|
||||
'ACP_FEED_OVERALL' => 'Enable board-wide Feed',
|
||||
'ACP_FEED_OVERALL_EXPLAIN' => 'Board-wide new posts.',
|
||||
|
|
Loading…
Add table
Reference in a new issue