aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2010-03-02 01:09:02 +0100
committerNils Adermann <naderman@naderman.de>2010-03-02 01:09:02 +0100
commit3b46681652ad0c235ccdcafc449c3d759335df17 (patch)
tree2eb63a812afae4e9d78a0883f2d9c2409c1512d7 /phpBB/includes/acp
parent6606e4bffe91637701499afef34e9c847aa3a3b0 (diff)
parent67e8cbdd0041e0cc0b77b09cad02ce29905ded01 (diff)
downloadforums-3b46681652ad0c235ccdcafc449c3d759335df17.tar
forums-3b46681652ad0c235ccdcafc449c3d759335df17.tar.gz
forums-3b46681652ad0c235ccdcafc449c3d759335df17.tar.bz2
forums-3b46681652ad0c235ccdcafc449c3d759335df17.tar.xz
forums-3b46681652ad0c235ccdcafc449c3d759335df17.zip
Merge commit 'release-3.0.7-RC1'
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_attachments.php6
-rw-r--r--phpBB/includes/acp/acp_board.php24
-rw-r--r--phpBB/includes/acp/acp_captcha.php1
-rw-r--r--phpBB/includes/acp/acp_inactive.php34
-rw-r--r--phpBB/includes/acp/acp_jabber.php16
-rw-r--r--phpBB/includes/acp/acp_main.php8
-rw-r--r--phpBB/includes/acp/acp_styles.php5
-rw-r--r--phpBB/includes/acp/acp_users.php2
8 files changed, 64 insertions, 32 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 849c076f0e..25e51814c4 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -124,11 +124,11 @@ class acp_attachments
'legend2' => $l_legend_cat_images,
'img_display_inlined' => array('lang' => 'DISPLAY_INLINED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
- 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' px'),
+ 'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int', 'type' => 'text:7:15', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => '&nbsp;&nbsp;<span>[ <a href="' . $this->u_action . '&amp;action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
- 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' px'),
- 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' px'),
+ 'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
+ 'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int', 'type' => 'dimension:3:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
)
);
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 9f0bcf210f..20a63e646e 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -29,6 +29,7 @@ class acp_board
{
global $db, $user, $auth, $template;
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $cache;
$user->add_lang('acp/board');
@@ -266,14 +267,22 @@ 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_overall_forums' => array('lang' => 'ACP_FEED_OVERALL_FORUMS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
- 'feed_overall_forums_limit' => array('lang' => 'ACP_FEED_OVERALL_FORUMS_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => false),
- '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_http_auth' => array('lang' => 'ACP_FEED_HTTP_AUTH', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
+
+ 'legend2' => 'ACP_FEED_POST_BASED',
+ 'feed_limit_post' => array('lang' => 'ACP_FEED_LIMIT', '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 ),
+
+ 'legend3' => 'ACP_FEED_TOPIC_BASED',
+ 'feed_limit_topic' => array('lang' => 'ACP_FEED_LIMIT', 'validate' => 'int:5', 'type' => 'text:3:4', 'explain' => true),
+ 'feed_topics_new' => array('lang' => 'ACP_FEED_TOPICS_NEW', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
+ 'feed_topics_active' => array('lang' => 'ACP_FEED_TOPICS_ACTIVE', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_news_id' => array('lang' => 'ACP_FEED_NEWS', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_news_forums', 'explain' => true),
+
+ 'legend4' => 'ACP_FEED_SETTINGS_OTHER',
+ 'feed_overall_forums' => array('lang' => 'ACP_FEED_OVERALL_FORUMS', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true ),
'feed_exclude_id' => array('lang' => 'ACP_FEED_EXCLUDE_ID', 'validate' => 'string', 'type' => 'custom', 'method' => 'select_exclude_forums', 'explain' => true),
)
);
@@ -469,6 +478,9 @@ class acp_board
// Store news and exclude ids
if ($mode == 'feed' && $submit)
{
+ $cache->destroy('_feed_news_forum_ids');
+ $cache->destroy('_feed_excluded_forum_ids');
+
$this->store_feed_forums(FORUM_OPTION_FEED_NEWS, 'feed_news_id');
$this->store_feed_forums(FORUM_OPTION_FEED_EXCLUDE, 'feed_exclude_id');
}
@@ -910,7 +922,7 @@ class acp_board
{
global $user, $config;
- $forum_list = make_forum_select(false, false, true, false, false, false, true);
+ $forum_list = make_forum_select(false, false, true, true, true, false, true);
// Build forum options
$s_forum_options = '<select id="' . $key . '" name="' . $key . '[]" multiple="multiple">';
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index e1fa764191..56a57e319c 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -56,6 +56,7 @@ class acp_captcha
'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false),
'confirm_refresh' => array('tpl' => 'CONFIRM_REFRESH', 'default' => false),
'max_reg_attempts' => array('tpl' => 'REG_LIMIT', 'default' => 0),
+ 'max_login_attempts' => array('tpl' => 'MAX_LOGIN_ATTEMPTS', 'default' => 0),
);
$this->tpl_name = 'acp_captcha';
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
index 3d0c0a2780..1a12c4967c 100644
--- a/phpBB/includes/acp/acp_inactive.php
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -90,22 +90,19 @@ class acp_inactive
if ($action == 'activate')
{
- if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ // Get those 'being activated'...
+ $sql = 'SELECT user_id, username' . (($config['require_activation'] == USER_ACTIVATION_ADMIN) ? ', user_email, user_lang' : '') . '
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $mark) . '
+ AND user_type = ' . USER_INACTIVE;
+ $result = $db->sql_query($sql);
+
+ $inactive_users = array();
+ while ($row = $db->sql_fetchrow($result))
{
- // Get those 'being activated'...
- $sql = 'SELECT user_id, username, user_email, user_lang
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $mark) . '
- AND user_type = ' . USER_INACTIVE;
- $result = $db->sql_query($sql);
-
- $inactive_users = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $inactive_users[] = $row;
- }
- $db->sql_freeresult($result);
+ $inactive_users[] = $row;
}
+ $db->sql_freeresult($result);
user_active_flip('activate', $mark);
@@ -136,6 +133,15 @@ class acp_inactive
$messenger->save_queue();
}
+ if (!empty($inactive_users))
+ {
+ foreach ($inactive_users as $row)
+ {
+ add_log('admin', 'LOG_USER_ACTIVE', $row['username']);
+ add_log('user', $row['user_id'], 'LOG_USER_ACTIVE_USER');
+ }
+ }
+
// For activate we really need to redirect, else a refresh can result in users being deactivated again
$u_action = $this->u_action . "&amp;$u_sort_param&amp;start=$start";
$u_action .= ($per_page != $config['topics_per_page']) ? "&amp;users_per_page=$per_page" : '';
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index 3ab6eb64ed..9925527b34 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -44,13 +44,13 @@ class acp_jabber
$this->tpl_name = 'acp_jabber';
$this->page_title = 'ACP_JABBER_SETTINGS';
- $jab_enable = request_var('jab_enable', $config['jab_enable']);
- $jab_host = request_var('jab_host', $config['jab_host']);
- $jab_port = request_var('jab_port', $config['jab_port']);
- $jab_username = request_var('jab_username', $config['jab_username']);
- $jab_password = request_var('jab_password', $config['jab_password']);
- $jab_package_size = request_var('jab_package_size', $config['jab_package_size']);
- $jab_use_ssl = request_var('jab_use_ssl', $config['jab_use_ssl']);
+ $jab_enable = request_var('jab_enable', (bool) $config['jab_enable']);
+ $jab_host = request_var('jab_host', (string) $config['jab_host']);
+ $jab_port = request_var('jab_port', (int) $config['jab_port']);
+ $jab_username = request_var('jab_username', (string) $config['jab_username']);
+ $jab_password = request_var('jab_password', (string) $config['jab_password']);
+ $jab_package_size = request_var('jab_package_size', (int) $config['jab_package_size']);
+ $jab_use_ssl = request_var('jab_use_ssl', (bool) $config['jab_use_ssl']);
$form_name = 'acp_jabber';
add_form_key($form_name);
@@ -117,7 +117,7 @@ class acp_jabber
'JAB_ENABLE' => $jab_enable,
'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'),
'JAB_HOST' => $jab_host,
- 'JAB_PORT' => $jab_port,
+ 'JAB_PORT' => ($jab_port) ? $jab_port : '',
'JAB_USERNAME' => $jab_username,
'JAB_PASSWORD' => $jab_password,
'JAB_PACKAGE_SIZE' => $jab_package_size,
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index cd83c52e01..b8712b2a3d 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -398,6 +398,14 @@ class acp_main
// Version check
$user->add_lang('install');
+ if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.2.0', '<'))
+ {
+ $template->assign_vars(array(
+ 'S_PHP_VERSION_OLD' => true,
+ 'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], '<a href="http://www.phpbb.com/community/viewtopic.php?f=14&amp;t=1958605">', '</a>'),
+ ));
+ }
+
$latest_version_info = false;
if (($latest_version_info = obtain_latest_version_info(request_var('versioncheck_force', false))) === false)
{
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index fbf3eadcb2..d2a0f9210f 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -643,6 +643,11 @@ parse_css_file = {PARSE_CSS_FILE}
{
while (($file = readdir($dp)) !== false)
{
+ if (!is_dir($phpbb_root_path . 'styles/' . $file))
+ {
+ continue;
+ }
+
$subpath = ($mode != 'style') ? "$mode/" : '';
if ($file[0] != '.' && file_exists("{$phpbb_root_path}styles/$file/$subpath$mode.cfg"))
{
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index afca056eb2..4905840e02 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1416,7 +1416,7 @@ class acp_users
$now = getdate();
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
- for ($i = $now['year'] - 100; $i < $now['year']; $i++)
+ for ($i = $now['year'] - 100; $i <= $now['year']; $i++)
{
$selected = ($i == $data['bday_year']) ? ' selected="selected"' : '';
$s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>";