mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
Merge remote-tracking branch 'upstream/develop' into feature/avatars
* upstream/develop: (255 commits) [ticket/10935] Limit number of PM rules per user to 5000 [ticket/10801] Fixed quickmod tools. [ticket/9551] uncomment line and change length to 255 [ticket/10925] Clarify installation requirements for SQLite [ticket/10938] Serve subforum listing on forumlist from template loop [ticket/10640] Change subject length in mcp in subsilver [ticket/10640] Change subject length in MCP [ticket/10640] Do not change default value of truncate_string() [ticket/10640] Change maximum subject length [ticket/10936] remove PCRE and mbstring support check [ticket/10936] fix language key [ticket/10829] Delete T_STYLESHEET_NAME - no longer used. [ticket/10829] $style_name -> $style_path in style class. [ticket/10743] Renaming user->theme [ticket/10743] Changing obtain_cfg_items [ticket/10882] Fix test name - oops. [ticket/10931] Apply strtolower() correctly, i.e. not on false. [ticket/10931] Also test get_bytes() and get_string() with false. [ticket/10931] Make to_numeric function globally available. [ticket/10932] Use included composer.phar in build process ... Conflicts: phpBB/includes/mcp/mcp_warn.php phpBB/install/database_update.php phpBB/styles/prosilver/template/ucp_avatar_options.html
This commit is contained in:
@@ -88,6 +88,7 @@ class acp_board
|
||||
'allow_nocensors' => array('lang' => 'ALLOW_NO_CENSORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_bookmarks' => array('lang' => 'ALLOW_BOOKMARKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_birthdays' => array('lang' => 'ALLOW_BIRTHDAYS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'display_last_subject' => array('lang' => 'DISPLAY_LAST_SUBJECT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_quick_reply' => array('lang' => 'ALLOW_QUICK_REPLY', 'validate' => 'bool', 'type' => 'custom', 'method' => 'quick_reply', 'explain' => true),
|
||||
|
||||
'legend2' => 'ACP_LOAD_SETTINGS',
|
||||
@@ -98,7 +99,6 @@ class acp_board
|
||||
'load_cpf_pm' => array('lang' => 'LOAD_CPF_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'load_cpf_viewprofile' => array('lang' => 'LOAD_CPF_VIEWPROFILE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'load_cpf_viewtopic' => array('lang' => 'LOAD_CPF_VIEWTOPIC', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'load_jquery_cdn' => array('lang' => 'LOAD_JQUERY_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
||||
'legend3' => 'ACP_SUBMIT_CHANGES',
|
||||
)
|
||||
@@ -324,7 +324,8 @@ class acp_board
|
||||
'load_moderators' => array('lang' => 'YES_MODERATORS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'load_jumpbox' => array('lang' => 'YES_JUMPBOX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
'load_user_activity' => array('lang' => 'LOAD_USER_ACTIVITY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'load_jquery_cdn' => array('lang' => 'LOAD_JQUERY_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
||||
'legend3' => 'CUSTOM_PROFILE_FIELDS',
|
||||
'load_cpf_memberlist' => array('lang' => 'LOAD_CPF_MEMBERLIST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||
|
@@ -20,6 +20,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
class acp_database
|
||||
{
|
||||
var $db_tools;
|
||||
var $u_action;
|
||||
|
||||
function main($id, $mode)
|
||||
@@ -27,6 +28,12 @@ class acp_database
|
||||
global $cache, $db, $user, $auth, $template, $table_prefix;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
if (!class_exists('phpbb_db_tools'))
|
||||
{
|
||||
require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
|
||||
}
|
||||
$this->db_tools = new phpbb_db_tools($db);
|
||||
|
||||
$user->add_lang('acp/database');
|
||||
|
||||
$this->tpl_name = 'acp_database';
|
||||
@@ -49,7 +56,7 @@ class acp_database
|
||||
{
|
||||
case 'download':
|
||||
$type = request_var('type', '');
|
||||
$table = request_var('table', array(''));
|
||||
$table = array_intersect($this->db_tools->sql_list_tables(), request_var('table', array('')));
|
||||
$format = request_var('method', '');
|
||||
$where = request_var('where', '');
|
||||
|
||||
@@ -172,8 +179,7 @@ class acp_database
|
||||
break;
|
||||
|
||||
default:
|
||||
include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
||||
$tables = get_tables($db);
|
||||
$tables = $this->db_tools->sql_list_tables();
|
||||
asort($tables);
|
||||
foreach ($tables as $table_name)
|
||||
{
|
||||
|
@@ -210,7 +210,7 @@ class acp_main
|
||||
// No maximum post id? :o
|
||||
if (!$max_post_id)
|
||||
{
|
||||
$sql = 'SELECT MAX(post_id)
|
||||
$sql = 'SELECT MAX(post_id) as max_post_id
|
||||
FROM ' . POSTS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$max_post_id = (int) $db->sql_fetchfield('max_post_id');
|
||||
|
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
class acp_styles
|
||||
{
|
||||
public $u_action;
|
||||
|
||||
|
||||
protected $u_base_action;
|
||||
protected $s_hidden_fields;
|
||||
protected $mode;
|
||||
@@ -1056,7 +1056,7 @@ class acp_styles
|
||||
*/
|
||||
protected function read_style_cfg($dir)
|
||||
{
|
||||
static $required = array('name', 'version', 'copyright');
|
||||
static $required = array('name', 'phpbb_version', 'copyright');
|
||||
$cfg = parse_cfg_file($this->styles_path . $dir . '/style.cfg');
|
||||
|
||||
// Check if it is a valid file
|
||||
|
@@ -1004,6 +1004,13 @@ class acp_users
|
||||
$user_row['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = '. $user_id;
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$user_row['user_has_posts'] = (bool) $db->sql_fetchfield('post_id');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_NAME_CHARS_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])),
|
||||
'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])),
|
||||
@@ -1031,6 +1038,7 @@ class acp_users
|
||||
'USER_EMAIL' => $user_row['user_email'],
|
||||
'USER_WARNINGS' => $user_row['user_warnings'],
|
||||
'USER_POSTS' => $user_row['user_posts'],
|
||||
'USER_HAS_POSTS' => $user_row['user_has_posts'],
|
||||
'USER_INACTIVE_REASON' => $inactive_reason,
|
||||
));
|
||||
|
||||
|
Reference in New Issue
Block a user