diff options
Diffstat (limited to 'phpBB')
23 files changed, 388 insertions, 317 deletions
diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index c4dc501d93..2b446056a7 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -263,6 +263,13 @@ <p>{L_ACP_GROUPS_MANAGE_EXPLAIN}</p> + <!-- IF S_ERROR --> + <div class="errorbox"> + <h3>{L_WARNING}</h3> + <p>{ERROR_MSG}</p> + </div> + <!-- ENDIF --> + <h1>{L_USER_DEF_GROUPS}</h1> <p>{L_USER_DEF_GROUPS_EXPLAIN}</p> diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index 4f102112c2..9586de2d6b 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -44,6 +44,7 @@ $dbms_type_map = array( 'DECIMAL' => 'decimal(5,2)', 'VCHAR_BIN' => 'varchar(252) BINARY', 'VCHAR_CI' => 'varchar(255)', + 'VARBINARY' => 'varbinary(255)', ), 'firebird' => array( @@ -65,6 +66,7 @@ $dbms_type_map = array( 'DECIMAL' => 'DOUBLE PRECISION', 'VCHAR_BIN' => 'VARCHAR(252)', 'VCHAR_CI' => 'VARCHAR(255)', + 'VARBINARY' => 'CHAR(255)', ), 'mssql' => array( @@ -86,6 +88,7 @@ $dbms_type_map = array( 'DECIMAL' => '[float]', 'VCHAR_BIN' => '[nvarchar] (252)', 'VCHAR_CI' => '[varchar] (255)', + 'VARBINARY' => '[varbinary] (255)', ), 'oracle' => array( @@ -107,6 +110,7 @@ $dbms_type_map = array( 'DECIMAL' => 'number(5, 2)', 'VCHAR_BIN' => 'varchar2(252)', 'VCHAR_CI' => 'varchar2(255)', + 'VARBINARY' => 'raw(255)', ), 'sqlite' => array( @@ -128,6 +132,7 @@ $dbms_type_map = array( 'DECIMAL' => 'decimal(5,2)', 'VCHAR_BIN' => 'varchar(252)', 'VCHAR_CI' => 'varchar(255)', + 'VARBINARY' => 'blob', ), 'postgres' => array( @@ -149,6 +154,7 @@ $dbms_type_map = array( 'DECIMAL' => 'decimal(5,2)', 'VCHAR_BIN' => 'varchar(252)', 'VCHAR_CI' => 'varchar_ci', + 'VARBINARY' => 'bytea', ), ); @@ -251,11 +257,22 @@ foreach ($supported_dbms as $dbms) $column_type = $dbms_type_map[$dbms][$column_data[0]]; } + // Adjust default value if db-dependant specified + if (is_array($column_data[1])) + { + $column_data[1] = (isset($column_data[1][$dbms])) ? $column_data[1][$dbms] : $column_data[1]['default']; + } + switch ($dbms) { case 'mysql': $line .= "\t{$column_name} {$column_type} "; - $line .= (!is_null($column_data[1])) ? "DEFAULT '{$column_data[1]}' " : ''; + + // For hexadecimal values do not use single quotes + if (!is_null($column_data[1])) + { + $line .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' "; + } $line .= 'NOT NULL'; if (isset($column_data[2]) && $column_data[2] == 'auto_increment') @@ -725,6 +742,7 @@ function get_schema_struct() 'COLUMNS' => array( 'bbcode_id' => array('TINT:3', 0), 'bbcode_tag' => array('VCHAR:16', ''), + 'bbcode_helpline' => array('VCHAR', ''), 'display_on_posting' => array('BOOL', 0), 'bbcode_match' => array('VCHAR', ''), 'bbcode_tpl' => array('MTEXT', ''), @@ -845,7 +863,7 @@ function get_schema_struct() 'forum_parents' => array('MTEXT', ''), 'forum_name' => array('STEXT', ''), 'forum_desc' => array('TEXT', ''), - 'forum_desc_bitfield' => array('UINT:11', 0), + 'forum_desc_bitfield' => array('VARBINARY', array('default' => '', 'mssql' => '0x', 'postgres' => '\000')), 'forum_desc_options' => array('UINT:11', 0), 'forum_desc_uid' => array('VCHAR:5', ''), 'forum_link' => array('VCHAR', ''), @@ -854,7 +872,7 @@ function get_schema_struct() 'forum_image' => array('VCHAR', ''), 'forum_rules' => array('TEXT', ''), 'forum_rules_link' => array('VCHAR', ''), - 'forum_rules_bitfield' => array('UINT:11', 0), + 'forum_rules_bitfield' => array('VARBINARY', array('default' => '', 'mssql' => '0x', 'postgres' => '\000')), 'forum_rules_options' => array('UINT:11', 0), 'forum_rules_uid' => array('VCHAR:5', ''), 'forum_topics_per_page' => array('TINT:4', 0), @@ -921,7 +939,7 @@ function get_schema_struct() 'group_type' => array('TINT:4', 1), 'group_name' => array('VCHAR_CI', ''), 'group_desc' => array('TEXT', ''), - 'group_desc_bitfield' => array('UINT:11', 0), + 'group_desc_bitfield' => array('VARBINARY', array('default' => '', 'mssql' => '0x', 'postgres' => '\000')), 'group_desc_options' => array('UINT:11', 0), 'group_desc_uid' => array('VCHAR:5', ''), 'group_display' => array('BOOL', 0), @@ -1077,8 +1095,9 @@ function get_schema_struct() 'post_checksum' => array('VCHAR:32', ''), 'post_encoding' => array('VCHAR:20', 'iso-8859-1'), 'post_attachment' => array('BOOL', 0), - 'bbcode_bitfield' => array('UINT:11', 0), + 'bbcode_bitfield' => array('VARBINARY', array('default' => '', 'mssql' => '0x', 'postgres' => '\000')), 'bbcode_uid' => array('VCHAR:5', ''), + 'post_postcount' => array('BOOL', 1), 'post_edit_time' => array('TIMESTAMP', 0), 'post_edit_reason' => array('STEXT', ''), 'post_edit_user' => array('UINT', 0), @@ -1092,6 +1111,7 @@ function get_schema_struct() 'poster_ip' => array('INDEX', 'poster_ip'), 'poster_id' => array('INDEX', 'poster_id'), 'post_approved' => array('INDEX', 'post_approved'), + 'post_postcount' => array('INDEX', 'post_postcount'), 'post_time' => array('INDEX', 'post_time'), ), ); @@ -1114,7 +1134,7 @@ function get_schema_struct() 'message_edit_user' => array('UINT', 0), 'message_encoding' => array('VCHAR:20', 'iso-8859-1'), 'message_attachment' => array('BOOL', 0), - 'bbcode_bitfield' => array('UINT:11', 0), + 'bbcode_bitfield' => array('VARBINARY', array('default' => '', 'mssql' => '0x', 'postgres' => '\000')), 'bbcode_uid' => array('VCHAR:5', ''), 'message_edit_time' => array('TIMESTAMP', 0), 'message_edit_count' => array('USINT', 0), @@ -1386,7 +1406,7 @@ function get_schema_struct() 'template_name' => array('VCHAR', ''), 'template_copyright' => array('VCHAR', ''), 'template_path' => array('VCHAR:100', ''), - 'bbcode_bitfield' => array('UINT:11', 6921), + 'bbcode_bitfield' => array('VARBINARY', array('default' => '', 'mysql' => '0x90D8', 'mssql' => '0x90D8', 'oracle' => '90D8', 'postgres' => '\220\330')), 'template_storedb' => array('BOOL', 0), ), 'PRIMARY_KEY' => 'template_id', @@ -1445,6 +1465,7 @@ function get_schema_struct() 'btn_search' => array('VCHAR:200', ''), 'btn_edit' => array('VCHAR:200', ''), 'btn_report' => array('VCHAR:200', ''), + 'btn_warn' => array('VCHAR:200', ''), 'btn_email' => array('VCHAR:200', ''), 'btn_www' => array('VCHAR:200', ''), 'btn_icq' => array('VCHAR:200', ''), @@ -1471,41 +1492,41 @@ function get_schema_struct() 'sub_forum_new' => array('VCHAR:200', ''), 'folder' => array('VCHAR:200', ''), 'folder_moved' => array('VCHAR:200', ''), - 'folder_posted' => array('VCHAR:200', ''), + 'folder_post' => array('VCHAR:200', ''), 'folder_new' => array('VCHAR:200', ''), - 'folder_new_posted' => array('VCHAR:200', ''), + 'folder_new_post' => array('VCHAR:200', ''), 'folder_hot' => array('VCHAR:200', ''), - 'folder_hot_posted' => array('VCHAR:200', ''), + 'folder_hot_post' => array('VCHAR:200', ''), 'folder_hot_new' => array('VCHAR:200', ''), - 'folder_hot_new_posted' => array('VCHAR:200', ''), - 'folder_locked' => array('VCHAR:200', ''), - 'folder_locked_posted' => array('VCHAR:200', ''), - 'folder_locked_new' => array('VCHAR:200', ''), - 'folder_locked_new_posted' => array('VCHAR:200', ''), - 'folder_locked_announce' => array('VCHAR:200', ''), - 'folder_locked_announce_new' => array('VCHAR:200', ''), - 'folder_locked_announce_posted' => array('VCHAR:200', ''), - 'folder_locked_announce_new_posted' => array('VCHAR:200', ''), - 'folder_locked_global' => array('VCHAR:200', ''), - 'folder_locked_global_new' => array('VCHAR:200', ''), - 'folder_locked_global_posted' => array('VCHAR:200', ''), - 'folder_locked_global_new_posted' => array('VCHAR:200', ''), - 'folder_locked_sticky' => array('VCHAR:200', ''), - 'folder_locked_sticky_new' => array('VCHAR:200', ''), - 'folder_locked_sticky_posted' => array('VCHAR:200', ''), - 'folder_locked_sticky_new_posted' => array('VCHAR:200', ''), + 'folder_hot_new_post' => array('VCHAR:200', ''), + 'folder_lock' => array('VCHAR:200', ''), + 'folder_lock_post' => array('VCHAR:200', ''), + 'folder_lock_new' => array('VCHAR:200', ''), + 'folder_lock_new_post' => array('VCHAR:200', ''), + 'folder_lock_announce' => array('VCHAR:200', ''), + 'folder_lock_announce_new' => array('VCHAR:200', ''), + 'folder_lock_announce_post' => array('VCHAR:200', ''), + 'folder_lock_announce_new_post' => array('VCHAR:200', ''), + 'folder_lock_global' => array('VCHAR:200', ''), + 'folder_lock_global_new' => array('VCHAR:200', ''), + 'folder_lock_global_post' => array('VCHAR:200', ''), + 'folder_lock_global_new_post' => array('VCHAR:200', ''), + 'folder_lock_sticky' => array('VCHAR:200', ''), + 'folder_lock_sticky_new' => array('VCHAR:200', ''), + 'folder_lock_sticky_post' => array('VCHAR:200', ''), + 'folder_lock_sticky_new_post' => array('VCHAR:200', ''), 'folder_sticky' => array('VCHAR:200', ''), - 'folder_sticky_posted' => array('VCHAR:200', ''), + 'folder_sticky_post' => array('VCHAR:200', ''), 'folder_sticky_new' => array('VCHAR:200', ''), - 'folder_sticky_new_posted' => array('VCHAR:200', ''), + 'folder_sticky_new_post' => array('VCHAR:200', ''), 'folder_announce' => array('VCHAR:200', ''), - 'folder_announce_posted' => array('VCHAR:200', ''), + 'folder_announce_post' => array('VCHAR:200', ''), 'folder_announce_new' => array('VCHAR:200', ''), - 'folder_announce_new_posted'=> array('VCHAR:200', ''), + 'folder_announce_new_post' => array('VCHAR:200', ''), 'folder_global' => array('VCHAR:200', ''), - 'folder_global_posted' => array('VCHAR:200', ''), + 'folder_global_post' => array('VCHAR:200', ''), 'folder_global_new' => array('VCHAR:200', ''), - 'folder_global_new_posted' => array('VCHAR:200', ''), + 'folder_global_new_post' => array('VCHAR:200', ''), 'poll_left' => array('VCHAR:200', ''), 'poll_center' => array('VCHAR:200', ''), 'poll_right' => array('VCHAR:200', ''), @@ -1677,7 +1698,7 @@ function get_schema_struct() 'user_avatar_height' => array('TINT:4', 0), 'user_sig' => array('MTEXT', ''), 'user_sig_bbcode_uid' => array('VCHAR:5', ''), - 'user_sig_bbcode_bitfield' => array('UINT:11', 0), + 'user_sig_bbcode_bitfield' => array('VARBINARY', array('default' => '', 'mssql' => '0x', 'postgres' => '\000')), 'user_from' => array('VCHAR:100', ''), 'user_icq' => array('VCHAR:15', ''), 'user_aim' => array('VCHAR', ''), diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index fad0185de9..9f7e68bfe5 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -165,7 +165,7 @@ class acp_groups case 'delete': if (!$auth->acl_get('a_groupdel')) { - trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id)); + trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action)); } $error = group_delete($group_id, $group_row['group_name']); @@ -176,13 +176,15 @@ class acp_groups break; } + $back_link = ($action == 'delete') ? $this->u_action : $this->u_action . '&action=list&g=' . $group_id; + if ($error) { - trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&action=list&g=' . $group_id)); + trigger_error($user->lang[$error] . adm_back_link($back_link)); } $message = ($action == 'delete') ? 'GROUP_DELETED' : 'GROUP_USERS_REMOVE'; - trigger_error($user->lang[$message] . adm_back_link($this->u_action)); + trigger_error($user->lang[$message] . adm_back_link($back_link)); } else { diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 5588f0dae9..4aedb63df6 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -209,37 +209,17 @@ class acp_main trigger_error($user->lang['NO_ADMIN']); } - $post_count_ary = $auth->acl_getf('f_postcount'); - $forum_read_ary = $auth->acl_getf('f_read'); - - $forum_ary = array(); - foreach ($post_count_ary as $forum_id => $allowed) - { - if ($allowed['f_postcount'] && $forum_read_ary[$forum_id]['f_read']) - { - $forum_ary[] = $forum_id; - } - } + $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id + FROM ' . POSTS_TABLE . ' + WHERE post_postcount = 1 + GROUP BY poster_id'; + $result = $db->sql_query($sql); - if (!sizeof($forum_ary)) - { - $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_posts = 0'); - } - else + while ($row = $db->sql_fetchrow($result)) { - $sql = 'SELECT COUNT(post_id) AS num_posts, poster_id - FROM ' . POSTS_TABLE . ' - WHERE poster_id <> ' . ANONYMOUS . ' - AND forum_id IN (' . implode(', ', $forum_ary) . ') - GROUP BY poster_id'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}"); - } - $db->sql_freeresult($result); + $db->sql_query('UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['poster_id']}"); } + $db->sql_freeresult($result); add_log('admin', 'LOG_RESYNC_POSTCOUNTS'); diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index e5d1e76ac7..6c557807bb 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -89,7 +89,7 @@ parse_css_file = {PARSE_CSS_FILE} pagination_sep = \'{PAGINATION_SEP}\' '; - $this->imageset_keys = 'site_logo, btn_post, btn_post_pm, btn_reply, btn_reply_pm, btn_locked, btn_profile, btn_pm, btn_delete, btn_info, btn_quote, btn_search, btn_edit, btn_report, btn_warn, btn_email, btn_www, btn_icq, btn_aim, btn_yim, btn_msnm, btn_jabber, btn_online, btn_offline, btn_friend, btn_foe, icon_unapproved, icon_reported, icon_attach, icon_post, icon_post_new, icon_post_latest, icon_post_newest, forum, forum_new, forum_locked, forum_link, sub_forum, sub_forum_new, folder, folder_moved, folder_posted, folder_new, folder_new_posted, folder_hot, folder_hot_posted, folder_hot_new, folder_hot_new_posted, folder_locked, folder_locked_posted, folder_locked_new, folder_locked_new_posted, folder_locked_announce, folder_locked_announce_new, folder_locked_announce_posted, folder_locked_announce_new_posted, folder_locked_global, folder_locked_global_new, folder_locked_global_posted, folder_locked_global_new_posted, folder_locked_sticky, folder_locked_sticky_new, folder_locked_sticky_posted, folder_locked_sticky_new_posted, folder_sticky, folder_sticky_posted, folder_sticky_new, folder_sticky_new_posted, folder_announce, folder_announce_posted, folder_announce_new, folder_announce_new_posted, folder_global, folder_global_posted, folder_global_new, folder_global_new_posted, poll_left, poll_center, poll_right, attach_progress_bar, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10'; + $this->imageset_keys = 'site_logo, btn_post, btn_post_pm, btn_reply, btn_reply_pm, btn_locked, btn_profile, btn_pm, btn_delete, btn_info, btn_quote, btn_search, btn_edit, btn_report, btn_warn, btn_email, btn_www, btn_icq, btn_aim, btn_yim, btn_msnm, btn_jabber, btn_online, btn_offline, btn_friend, btn_foe, icon_unapproved, icon_reported, icon_attach, icon_post, icon_post_new, icon_post_latest, icon_post_newest, forum, forum_new, forum_locked, forum_link, sub_forum, sub_forum_new, folder, folder_moved, folder_post, folder_new, folder_new_post, folder_hot, folder_hot_post, folder_hot_new, folder_hot_new_post, folder_lock, folder_lock_post, folder_lock_new, folder_lock_new_post, folder_lock_announce, folder_lock_announce_new, folder_lock_announce_post, folder_lock_announce_new_post, folder_lock_global, folder_lock_global_new, folder_lock_global_post, folder_lock_global_new_post, folder_lock_sticky, folder_lock_sticky_new, folder_lock_sticky_post, folder_lock_sticky_new_post, folder_sticky, folder_sticky_post, folder_sticky_new, folder_sticky_new_post, folder_announce, folder_announce_post, folder_announce_new, folder_announce_new_post, folder_global, folder_global_post, folder_global_new, folder_global_new_post, poll_left, poll_center, poll_right, attach_progress_bar, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10'; // Execute overall actions switch ($action) @@ -1286,7 +1286,7 @@ pagination_sep = \'{PAGINATION_SEP}\' 'forum', 'forum_new', 'forum_locked', 'forum_link', 'sub_forum', 'sub_forum_new', ), 'folders' => array( - 'folder', 'folder_moved', 'folder_posted', 'folder_new', 'folder_new_posted', 'folder_hot', 'folder_hot_posted', 'folder_hot_new', 'folder_hot_new_posted', 'folder_locked', 'folder_locked_posted', 'folder_locked_new', 'folder_locked_new_posted', 'folder_locked_announce', 'folder_locked_announce_new', 'folder_locked_announce_posted', 'folder_locked_announce_new_posted', 'folder_locked_global', 'folder_locked_global_new', 'folder_locked_global_posted', 'folder_locked_global_new_posted', 'folder_locked_sticky', 'folder_locked_sticky_new', 'folder_locked_sticky_posted', 'folder_locked_sticky_new_posted', 'folder_sticky', 'folder_sticky_posted', 'folder_sticky_new', 'folder_sticky_new_posted', 'folder_announce', 'folder_announce_posted', 'folder_announce_new', 'folder_announce_new_posted', 'folder_global', 'folder_global_posted', 'folder_global_new', 'folder_global_new_posted', + 'folder', 'folder_moved', 'folder_post', 'folder_new', 'folder_new_post', 'folder_hot', 'folder_hot_post', 'folder_hot_new', 'folder_hot_new_post', 'folder_lock', 'folder_lock_post', 'folder_lock_new', 'folder_lock_new_post', 'folder_lock_announce', 'folder_lock_announce_new', 'folder_lock_announce_post', 'folder_lock_announce_new_post', 'folder_lock_global', 'folder_lock_global_new', 'folder_lock_global_post', 'folder_lock_global_new_post', 'folder_lock_sticky', 'folder_lock_sticky_new', 'folder_lock_sticky_post', 'folder_lock_sticky_new_post', 'folder_sticky', 'folder_sticky_post', 'folder_sticky_new', 'folder_sticky_new_post', 'folder_announce', 'folder_announce_post', 'folder_announce_new', 'folder_announce_new_post', 'folder_global', 'folder_global_post', 'folder_global_new', 'folder_global_new_post', ), 'polls' => array( 'poll_left', 'poll_center', 'poll_right', diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index d5355ca600..320cee5bf5 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2276,6 +2276,41 @@ function get_preg_expression($mode) return ''; } +/** +* Truncates string while retaining special characters if going over the max length +* The default max length is 60 at the moment +*/ +function truncate_string($string, $max_length = 60) +{ + $chars = array(); + + // split the multibyte characters first + $string_ary = preg_split('#(&\#[0-9]+;)#', $string, -1, PREG_SPLIT_DELIM_CAPTURE); + + // Now go through the array and split the other characters + foreach ($string_ary as $key => $value) + { + if (strpos($value, '&#') === 0) + { + $chars[] = $value; + continue; + } + + // decode html entities and put them back later + $_chars = str_split(html_entity_decode($value)); + $chars = array_merge($chars, array_map('htmlspecialchars', $_chars)); + } + + // Now check the length ;) + if (sizeof($chars) <= $max_length) + { + return $string; + } + + // Cut off the last elements from the array + return implode('', array_slice($chars, 0, $max_length)); +} + // Handler, header and footer /** @@ -2863,6 +2898,8 @@ function garbage_collection() $db->sql_close(); } +/** +*/ class bitfield { var $data; @@ -2872,26 +2909,22 @@ class bitfield $this->data = $bitfield; } + /** + */ function get($n) { - /** - * Get the ($n / 8)th char - */ + // Get the ($n / 8)th char $byte = $n >> 3; if (!isset($this->data[$byte])) { - /** - * Of course, if it doesn't exist then the result if FALSE - */ - return FALSE; + // Of course, if it doesn't exist then the result if FALSE + return false; } $c = $this->data[$byte]; - /** - * Lookup the ($n % 8)th bit of the byte - */ + // Lookup the ($n % 8)th bit of the byte $bit = 7 - ($n & 7); return (bool) (ord($c) & (1 << $bit)); } diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 11e2623167..a3b471a46e 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -563,9 +563,9 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = return false; } - $post_ids = $topic_ids = $forum_ids = array(); + $post_ids = $topic_ids = $forum_ids = $post_counts = array(); - $sql = 'SELECT post_id, poster_id, topic_id, forum_id + $sql = 'SELECT post_id, poster_id, post_postcount, topic_id, forum_id FROM ' . POSTS_TABLE . " WHERE $where_type " . ((!is_array($where_ids)) ? '= ' . (int) $where_ids : 'IN (' . implode(', ', array_map('intval', $where_ids)) . ')'); $result = $db->sql_query($sql); @@ -576,6 +576,11 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = $poster_ids[] = $row['poster_id']; $topic_ids[] = $row['topic_id']; $forum_ids[] = $row['forum_id']; + + if ($row['post_postcount']) + { + $post_counts[$row['poster_id']] = (!empty($post_counts[$row['poster_id']])) ? $post_counts[$row['poster_id']] + 1 : 1; + } } $db->sql_freeresult($result); @@ -598,6 +603,18 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync = } unset($table_ary); + // Adjust users post counts + if (sizeof($post_counts)) + { + foreach ($post_counts as $poster_id => $substract) + { + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_posts = user_posts - ' . $substract . ' + WHERE user_id = ' . $poster_id; + $db->sql_query($sql); + } + } + // Remove the message from the search index $search_type = basename($config['search_type']); diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 5048489c56..95fd0d21b8 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -641,8 +641,8 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold if ($topic_row['topic_status'] == ITEM_LOCKED) { $topic_type = $user->lang['VIEW_TOPIC_LOCKED']; - $folder = 'folder_locked_global'; - $folder_new = 'folder_locked_global_new'; + $folder = 'folder_lock_global'; + $folder_new = 'folder_lock_global_new'; } break; @@ -654,8 +654,8 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold if ($topic_row['topic_status'] == ITEM_LOCKED) { $topic_type = $user->lang['VIEW_TOPIC_LOCKED']; - $folder = 'folder_locked_announce'; - $folder_new = 'folder_locked_announce_new'; + $folder = 'folder_lock_announce'; + $folder_new = 'folder_lock_announce_new'; } break; @@ -667,8 +667,8 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold if ($topic_row['topic_status'] == ITEM_LOCKED) { $topic_type = $user->lang['VIEW_TOPIC_LOCKED']; - $folder = 'folder_locked_sticky'; - $folder_new = 'folder_locked_sticky_new'; + $folder = 'folder_lock_sticky'; + $folder_new = 'folder_lock_sticky_new'; } break; @@ -689,8 +689,8 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold if ($topic_row['topic_status'] == ITEM_LOCKED) { $topic_type = $user->lang['VIEW_TOPIC_LOCKED']; - $folder = 'folder_locked'; - $folder_new = 'folder_locked_new'; + $folder = 'folder_lock'; + $folder_new = 'folder_lock_new'; } break; } @@ -701,7 +701,7 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold // Posted image? if (!empty($topic_row['topic_posted']) && $topic_row['topic_posted']) { - $folder_img .= '_posted'; + $folder_img .= '_post'; } } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 328677d4a9..254352503d 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1267,7 +1267,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) break; } - $sql_data[USERS_TABLE] = ($auth->acl_get('f_postcount', $forum_id)) ? 'user_posts = user_posts - 1' : ''; +// $sql_data[USERS_TABLE] = ($data['post_postcount']) ? 'user_posts = user_posts - 1' : ''; $db->sql_transaction('begin'); @@ -1346,6 +1346,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $post_mode = ($data['topic_first_post_id'] == $data['topic_last_post_id']) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit')); } + // First of all make sure the subject and topic title are having the correct length. + // To achive this without cutting off between special chars we convert to an array and then count the elements. + $subject = truncate_string($subject); + $data['topic_title'] = truncate_string($data['topic_title']); + // Collect some basic informations about which tables and which rows to update/insert $sql_data = array(); $poster_id = ($mode == 'edit') ? $data['poster_id'] : (int) $user->data['user_id']; @@ -1374,6 +1379,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u 'post_attachment' => (isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0, 'bbcode_bitfield' => $data['bbcode_bitfield'], 'bbcode_uid' => $data['bbcode_uid'], + 'post_postcount' => ($auth->acl_get('f_postcount', $data['forum_id']) ? 1 : 0, 'post_edit_locked' => $data['post_edit_locked'] ); break; diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index b004cbeff1..03fe3319fc 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -343,24 +343,13 @@ function change_poster(&$post_info, $userdata) } // Adjust post counts - $auth_user_from = new auth(); - $auth_user_from->acl($post_info); - - $auth_user_to = new auth(); - $auth_user_to->acl($userdata); - - // Decrease post count by one for the old user - if ($auth_user_from->acl_get('f_postcount', $post_info['forum_id'])) + if ($post_info['post_postcount']) { $sql = 'UPDATE ' . USERS_TABLE . ' SET user_posts = user_posts - 1 WHERE user_id = ' . $post_info['user_id']; $db->sql_query($sql); - } - // Increase post count by one for the new user - if ($auth_user_to->acl_get('f_postcount', $post_info['forum_id'])) - { $sql = 'UPDATE ' . USERS_TABLE . ' SET user_posts = user_posts + 1 WHERE user_id = ' . $userdata['user_id']; diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 844ff468a0..5281860ac5 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -187,7 +187,7 @@ class template $filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx; - $recompile = (($config['load_tplcompile'] && @filemtime($filename) < filemtime($this->files[$handle])) || !file_exists($filename)) ? true : false; + $recompile = (($config['load_tplcompile'] && @filemtime($filename) < filemtime($this->files[$handle])) || !file_exists($filename) || @filesize($filename) === 0) ? true : false; // Recompile page if the original template is newer, otherwise load the compiled version if (!$recompile) diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index f40e35934f..5ca9b6fb8f 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -266,7 +266,7 @@ class ucp_main // Which folder should we display? if ($row['forum_status'] == ITEM_LOCKED) { - $folder_image = ($unread_forum) ? 'folder_locked_new' : 'folder_locked'; + $folder_image = ($unread_forum) ? 'folder_lock_new' : 'folder_lock'; $folder_alt = 'FORUM_LOCKED'; } else diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 942d802318..c7b9a2d1b7 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -660,6 +660,7 @@ CREATE TABLE phpbb_posts ( post_attachment INTEGER DEFAULT 0 NOT NULL, bbcode_bitfield CHAR(255) DEFAULT '' NOT NULL, bbcode_uid VARCHAR(5) DEFAULT '' NOT NULL, + post_postcount INTEGER DEFAULT 1 NOT NULL, post_edit_time INTEGER DEFAULT 0 NOT NULL, post_edit_reason BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, post_edit_user INTEGER DEFAULT 0 NOT NULL, @@ -674,6 +675,7 @@ CREATE INDEX phpbb_posts_topic_id ON phpbb_posts(topic_id);; CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts(poster_ip);; CREATE INDEX phpbb_posts_poster_id ON phpbb_posts(poster_id);; CREATE INDEX phpbb_posts_post_approved ON phpbb_posts(post_approved);; +CREATE INDEX phpbb_posts_post_postcount ON phpbb_posts(post_postcount);; CREATE INDEX phpbb_posts_post_time ON phpbb_posts(post_time);; CREATE GENERATOR phpbb_posts_gen;; @@ -1234,41 +1236,41 @@ CREATE TABLE phpbb_styles_imageset ( sub_forum_new VARCHAR(200) DEFAULT '' NOT NULL, folder VARCHAR(200) DEFAULT '' NOT NULL, folder_moved VARCHAR(200) DEFAULT '' NOT NULL, - folder_posted VARCHAR(200) DEFAULT '' NOT NULL, + folder_post VARCHAR(200) DEFAULT '' NOT NULL, folder_new VARCHAR(200) DEFAULT '' NOT NULL, - folder_new_posted VARCHAR(200) DEFAULT '' NOT NULL, + folder_new_post VARCHAR(200) DEFAULT '' NOT NULL, folder_hot VARCHAR(200) DEFAULT '' NOT NULL, - folder_hot_posted VARCHAR(200) DEFAULT '' NOT NULL, + folder_hot_post VARCHAR(200) DEFAULT '' NOT NULL, folder_hot_new VARCHAR(200) DEFAULT '' NOT NULL, - folder_hot_new_posted VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_posted VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_new VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_new_posted VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_announce VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_announce_new VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_announce_posted VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_announce_new_posted VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_global VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_global_new VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_global_posted VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_global_new_posted VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_sticky VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_sticky_new VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_sticky_posted VARCHAR(200) DEFAULT '' NOT NULL, - folder_locked_sticky_new_posted VARCHAR(200) DEFAULT '' NOT NULL, + folder_hot_new_post VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_post VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_new VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_new_post VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_announce VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_announce_new VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_announce_post VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_announce_new_post VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_global VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_global_new VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_global_post VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_global_new_post VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_sticky VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_sticky_new VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_sticky_post VARCHAR(200) DEFAULT '' NOT NULL, + folder_lock_sticky_new_post VARCHAR(200) DEFAULT '' NOT NULL, folder_sticky VARCHAR(200) DEFAULT '' NOT NULL, - folder_sticky_posted VARCHAR(200) DEFAULT '' NOT NULL, + folder_sticky_post VARCHAR(200) DEFAULT '' NOT NULL, folder_sticky_new VARCHAR(200) DEFAULT '' NOT NULL, - folder_sticky_new_posted VARCHAR(200) DEFAULT '' NOT NULL, + folder_sticky_new_post VARCHAR(200) DEFAULT '' NOT NULL, folder_announce VARCHAR(200) DEFAULT '' NOT NULL, - folder_announce_posted VARCHAR(200) DEFAULT '' NOT NULL, + folder_announce_post VARCHAR(200) DEFAULT '' NOT NULL, folder_announce_new VARCHAR(200) DEFAULT '' NOT NULL, - folder_announce_new_posted VARCHAR(200) DEFAULT '' NOT NULL, + folder_announce_new_post VARCHAR(200) DEFAULT '' NOT NULL, folder_global VARCHAR(200) DEFAULT '' NOT NULL, - folder_global_posted VARCHAR(200) DEFAULT '' NOT NULL, + folder_global_post VARCHAR(200) DEFAULT '' NOT NULL, folder_global_new VARCHAR(200) DEFAULT '' NOT NULL, - folder_global_new_posted VARCHAR(200) DEFAULT '' NOT NULL, + folder_global_new_post VARCHAR(200) DEFAULT '' NOT NULL, poll_left VARCHAR(200) DEFAULT '' NOT NULL, poll_center VARCHAR(200) DEFAULT '' NOT NULL, poll_right VARCHAR(200) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index a6d1b7bfa7..241fdc3be8 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -676,6 +676,7 @@ CREATE TABLE [phpbb_posts] ( [post_attachment] [int] DEFAULT (0) NOT NULL , [bbcode_bitfield] [varbinary] (255) DEFAULT (0x) NOT NULL , [bbcode_uid] [varchar] (5) DEFAULT ('') NOT NULL , + [post_postcount] [int] DEFAULT (1) NOT NULL , [post_edit_time] [int] DEFAULT (0) NOT NULL , [post_edit_reason] [varchar] (3000) DEFAULT ('') NOT NULL , [post_edit_user] [int] DEFAULT (0) NOT NULL , @@ -706,6 +707,9 @@ GO CREATE INDEX [post_approved] ON [phpbb_posts]([post_approved]) ON [PRIMARY] GO +CREATE INDEX [post_postcount] ON [phpbb_posts]([post_postcount]) ON [PRIMARY] +GO + CREATE INDEX [post_time] ON [phpbb_posts]([post_time]) ON [PRIMARY] GO @@ -1246,41 +1250,41 @@ CREATE TABLE [phpbb_styles_imageset] ( [sub_forum_new] [varchar] (200) DEFAULT ('') NOT NULL , [folder] [varchar] (200) DEFAULT ('') NOT NULL , [folder_moved] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_posted] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_post] [varchar] (200) DEFAULT ('') NOT NULL , [folder_new] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_new_posted] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_new_post] [varchar] (200) DEFAULT ('') NOT NULL , [folder_hot] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_hot_posted] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_hot_post] [varchar] (200) DEFAULT ('') NOT NULL , [folder_hot_new] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_hot_new_posted] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_posted] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_new] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_new_posted] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_announce] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_announce_new] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_announce_posted] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_announce_new_posted] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_global] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_global_new] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_global_posted] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_global_new_posted] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_sticky] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_sticky_new] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_sticky_posted] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_locked_sticky_new_posted] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_hot_new_post] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_post] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_new] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_new_post] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_announce] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_announce_new] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_announce_post] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_announce_new_post] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_global] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_global_new] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_global_post] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_global_new_post] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_sticky] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_sticky_new] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_sticky_post] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_lock_sticky_new_post] [varchar] (200) DEFAULT ('') NOT NULL , [folder_sticky] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_sticky_posted] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_sticky_post] [varchar] (200) DEFAULT ('') NOT NULL , [folder_sticky_new] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_sticky_new_posted] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_sticky_new_post] [varchar] (200) DEFAULT ('') NOT NULL , [folder_announce] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_announce_posted] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_announce_post] [varchar] (200) DEFAULT ('') NOT NULL , [folder_announce_new] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_announce_new_posted] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_announce_new_post] [varchar] (200) DEFAULT ('') NOT NULL , [folder_global] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_global_posted] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_global_post] [varchar] (200) DEFAULT ('') NOT NULL , [folder_global_new] [varchar] (200) DEFAULT ('') NOT NULL , - [folder_global_new_posted] [varchar] (200) DEFAULT ('') NOT NULL , + [folder_global_new_post] [varchar] (200) DEFAULT ('') NOT NULL , [poll_left] [varchar] (200) DEFAULT ('') NOT NULL , [poll_center] [varchar] (200) DEFAULT ('') NOT NULL , [poll_right] [varchar] (200) DEFAULT ('') NOT NULL , diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql index 79640beacf..8d2ceebe7d 100644 --- a/phpBB/install/schemas/mysql_schema.sql +++ b/phpBB/install/schemas/mysql_schema.sql @@ -433,6 +433,7 @@ CREATE TABLE phpbb_posts ( post_attachment tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_bitfield varbinary(255) DEFAULT '' NOT NULL, bbcode_uid varchar(5) DEFAULT '' NOT NULL, + post_postcount tinyint(1) UNSIGNED DEFAULT '1' NOT NULL, post_edit_time int(11) UNSIGNED DEFAULT '0' NOT NULL, post_edit_reason text DEFAULT '' NOT NULL, post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, @@ -444,6 +445,7 @@ CREATE TABLE phpbb_posts ( KEY poster_ip (poster_ip), KEY poster_id (poster_id), KEY post_approved (post_approved), + KEY post_postcount (post_postcount), KEY post_time (post_time) ); @@ -798,41 +800,41 @@ CREATE TABLE phpbb_styles_imageset ( sub_forum_new varchar(200) DEFAULT '' NOT NULL, folder varchar(200) DEFAULT '' NOT NULL, folder_moved varchar(200) DEFAULT '' NOT NULL, - folder_posted varchar(200) DEFAULT '' NOT NULL, + folder_post varchar(200) DEFAULT '' NOT NULL, folder_new varchar(200) DEFAULT '' NOT NULL, - folder_new_posted varchar(200) DEFAULT '' NOT NULL, + folder_new_post varchar(200) DEFAULT '' NOT NULL, folder_hot varchar(200) DEFAULT '' NOT NULL, - folder_hot_posted varchar(200) DEFAULT '' NOT NULL, + folder_hot_post varchar(200) DEFAULT '' NOT NULL, folder_hot_new varchar(200) DEFAULT '' NOT NULL, - folder_hot_new_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked varchar(200) DEFAULT '' NOT NULL, - folder_locked_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_new varchar(200) DEFAULT '' NOT NULL, - folder_locked_new_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_announce varchar(200) DEFAULT '' NOT NULL, - folder_locked_announce_new varchar(200) DEFAULT '' NOT NULL, - folder_locked_announce_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_announce_new_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_global varchar(200) DEFAULT '' NOT NULL, - folder_locked_global_new varchar(200) DEFAULT '' NOT NULL, - folder_locked_global_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_global_new_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_sticky varchar(200) DEFAULT '' NOT NULL, - folder_locked_sticky_new varchar(200) DEFAULT '' NOT NULL, - folder_locked_sticky_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_sticky_new_posted varchar(200) DEFAULT '' NOT NULL, + folder_hot_new_post varchar(200) DEFAULT '' NOT NULL, + folder_lock varchar(200) DEFAULT '' NOT NULL, + folder_lock_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_new varchar(200) DEFAULT '' NOT NULL, + folder_lock_new_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_announce varchar(200) DEFAULT '' NOT NULL, + folder_lock_announce_new varchar(200) DEFAULT '' NOT NULL, + folder_lock_announce_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_announce_new_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_global varchar(200) DEFAULT '' NOT NULL, + folder_lock_global_new varchar(200) DEFAULT '' NOT NULL, + folder_lock_global_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_global_new_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_sticky varchar(200) DEFAULT '' NOT NULL, + folder_lock_sticky_new varchar(200) DEFAULT '' NOT NULL, + folder_lock_sticky_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_sticky_new_post varchar(200) DEFAULT '' NOT NULL, folder_sticky varchar(200) DEFAULT '' NOT NULL, - folder_sticky_posted varchar(200) DEFAULT '' NOT NULL, + folder_sticky_post varchar(200) DEFAULT '' NOT NULL, folder_sticky_new varchar(200) DEFAULT '' NOT NULL, - folder_sticky_new_posted varchar(200) DEFAULT '' NOT NULL, + folder_sticky_new_post varchar(200) DEFAULT '' NOT NULL, folder_announce varchar(200) DEFAULT '' NOT NULL, - folder_announce_posted varchar(200) DEFAULT '' NOT NULL, + folder_announce_post varchar(200) DEFAULT '' NOT NULL, folder_announce_new varchar(200) DEFAULT '' NOT NULL, - folder_announce_new_posted varchar(200) DEFAULT '' NOT NULL, + folder_announce_new_post varchar(200) DEFAULT '' NOT NULL, folder_global varchar(200) DEFAULT '' NOT NULL, - folder_global_posted varchar(200) DEFAULT '' NOT NULL, + folder_global_post varchar(200) DEFAULT '' NOT NULL, folder_global_new varchar(200) DEFAULT '' NOT NULL, - folder_global_new_posted varchar(200) DEFAULT '' NOT NULL, + folder_global_new_post varchar(200) DEFAULT '' NOT NULL, poll_left varchar(200) DEFAULT '' NOT NULL, poll_center varchar(200) DEFAULT '' NOT NULL, poll_right varchar(200) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index e4e28db8a7..f6a1038d2d 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -779,6 +779,7 @@ CREATE TABLE phpbb_posts ( post_attachment number(1) DEFAULT '0' NOT NULL, bbcode_bitfield raw(255) DEFAULT '' NOT NULL, bbcode_uid varchar2(5) DEFAULT '' NOT NULL, + post_postcount number(1) DEFAULT '1' NOT NULL, post_edit_time number(11) DEFAULT '0' NOT NULL, post_edit_reason varchar2(3000) DEFAULT '' NOT NULL, post_edit_user number(8) DEFAULT '0' NOT NULL, @@ -798,6 +799,8 @@ CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id) / CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved) / +CREATE INDEX phpbb_posts_post_postcount ON phpbb_posts (post_postcount) +/ CREATE INDEX phpbb_posts_post_time ON phpbb_posts (post_time) / @@ -1433,41 +1436,41 @@ CREATE TABLE phpbb_styles_imageset ( sub_forum_new varchar2(200) DEFAULT '' NOT NULL, folder varchar2(200) DEFAULT '' NOT NULL, folder_moved varchar2(200) DEFAULT '' NOT NULL, - folder_posted varchar2(200) DEFAULT '' NOT NULL, + folder_post varchar2(200) DEFAULT '' NOT NULL, folder_new varchar2(200) DEFAULT '' NOT NULL, - folder_new_posted varchar2(200) DEFAULT '' NOT NULL, + folder_new_post varchar2(200) DEFAULT '' NOT NULL, folder_hot varchar2(200) DEFAULT '' NOT NULL, - folder_hot_posted varchar2(200) DEFAULT '' NOT NULL, + folder_hot_post varchar2(200) DEFAULT '' NOT NULL, folder_hot_new varchar2(200) DEFAULT '' NOT NULL, - folder_hot_new_posted varchar2(200) DEFAULT '' NOT NULL, - folder_locked varchar2(200) DEFAULT '' NOT NULL, - folder_locked_posted varchar2(200) DEFAULT '' NOT NULL, - folder_locked_new varchar2(200) DEFAULT '' NOT NULL, - folder_locked_new_posted varchar2(200) DEFAULT '' NOT NULL, - folder_locked_announce varchar2(200) DEFAULT '' NOT NULL, - folder_locked_announce_new varchar2(200) DEFAULT '' NOT NULL, - folder_locked_announce_posted varchar2(200) DEFAULT '' NOT NULL, - folder_locked_announce_new_posted varchar2(200) DEFAULT '' NOT NULL, - folder_locked_global varchar2(200) DEFAULT '' NOT NULL, - folder_locked_global_new varchar2(200) DEFAULT '' NOT NULL, - folder_locked_global_posted varchar2(200) DEFAULT '' NOT NULL, - folder_locked_global_new_posted varchar2(200) DEFAULT '' NOT NULL, - folder_locked_sticky varchar2(200) DEFAULT '' NOT NULL, - folder_locked_sticky_new varchar2(200) DEFAULT '' NOT NULL, - folder_locked_sticky_posted varchar2(200) DEFAULT '' NOT NULL, - folder_locked_sticky_new_posted varchar2(200) DEFAULT '' NOT NULL, + folder_hot_new_post varchar2(200) DEFAULT '' NOT NULL, + folder_lock varchar2(200) DEFAULT '' NOT NULL, + folder_lock_post varchar2(200) DEFAULT '' NOT NULL, + folder_lock_new varchar2(200) DEFAULT '' NOT NULL, + folder_lock_new_post varchar2(200) DEFAULT '' NOT NULL, + folder_lock_announce varchar2(200) DEFAULT '' NOT NULL, + folder_lock_announce_new varchar2(200) DEFAULT '' NOT NULL, + folder_lock_announce_post varchar2(200) DEFAULT '' NOT NULL, + folder_lock_announce_new_post varchar2(200) DEFAULT '' NOT NULL, + folder_lock_global varchar2(200) DEFAULT '' NOT NULL, + folder_lock_global_new varchar2(200) DEFAULT '' NOT NULL, + folder_lock_global_post varchar2(200) DEFAULT '' NOT NULL, + folder_lock_global_new_post varchar2(200) DEFAULT '' NOT NULL, + folder_lock_sticky varchar2(200) DEFAULT '' NOT NULL, + folder_lock_sticky_new varchar2(200) DEFAULT '' NOT NULL, + folder_lock_sticky_post varchar2(200) DEFAULT '' NOT NULL, + folder_lock_sticky_new_post varchar2(200) DEFAULT '' NOT NULL, folder_sticky varchar2(200) DEFAULT '' NOT NULL, - folder_sticky_posted varchar2(200) DEFAULT '' NOT NULL, + folder_sticky_post varchar2(200) DEFAULT '' NOT NULL, folder_sticky_new varchar2(200) DEFAULT '' NOT NULL, - folder_sticky_new_posted varchar2(200) DEFAULT '' NOT NULL, + folder_sticky_new_post varchar2(200) DEFAULT '' NOT NULL, folder_announce varchar2(200) DEFAULT '' NOT NULL, - folder_announce_posted varchar2(200) DEFAULT '' NOT NULL, + folder_announce_post varchar2(200) DEFAULT '' NOT NULL, folder_announce_new varchar2(200) DEFAULT '' NOT NULL, - folder_announce_new_posted varchar2(200) DEFAULT '' NOT NULL, + folder_announce_new_post varchar2(200) DEFAULT '' NOT NULL, folder_global varchar2(200) DEFAULT '' NOT NULL, - folder_global_posted varchar2(200) DEFAULT '' NOT NULL, + folder_global_post varchar2(200) DEFAULT '' NOT NULL, folder_global_new varchar2(200) DEFAULT '' NOT NULL, - folder_global_new_posted varchar2(200) DEFAULT '' NOT NULL, + folder_global_new_post varchar2(200) DEFAULT '' NOT NULL, poll_left varchar2(200) DEFAULT '' NOT NULL, poll_center varchar2(200) DEFAULT '' NOT NULL, poll_right varchar2(200) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 8f4a5ecffd..7feffaacc6 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -537,6 +537,7 @@ CREATE TABLE phpbb_posts ( post_attachment INT2 DEFAULT '0' NOT NULL CHECK (post_attachment >= 0), bbcode_bitfield bytea DEFAULT '\000' NOT NULL, bbcode_uid varchar(5) DEFAULT '' NOT NULL, + post_postcount INT2 DEFAULT '1' NOT NULL CHECK (post_postcount >= 0), post_edit_time INT4 DEFAULT '0' NOT NULL CHECK (post_edit_time >= 0), post_edit_reason varchar(3000) DEFAULT '' NOT NULL, post_edit_user INT4 DEFAULT '0' NOT NULL CHECK (post_edit_user >= 0), @@ -550,6 +551,7 @@ CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id); CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip); CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id); CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved); +CREATE INDEX phpbb_posts_post_postcount ON phpbb_posts (post_postcount); CREATE INDEX phpbb_posts_post_time ON phpbb_posts (post_time); /* Table: 'phpbb_privmsgs' */ @@ -694,7 +696,7 @@ CREATE SEQUENCE phpbb_ranks_seq; CREATE TABLE phpbb_ranks ( rank_id INT4 DEFAULT nextval('phpbb_ranks_seq'), rank_title varchar(255) DEFAULT '' NOT NULL, - rank_min INT4 DEFAULT '0' NOT NULL CHECK (rank_min >= -1), + rank_min INT4 DEFAULT '0' NOT NULL CHECK (rank_min >= 0), rank_special INT2 DEFAULT '0' NOT NULL CHECK (rank_special >= 0), rank_image varchar(255) DEFAULT '' NOT NULL, PRIMARY KEY (rank_id) @@ -932,41 +934,41 @@ CREATE TABLE phpbb_styles_imageset ( sub_forum_new varchar(200) DEFAULT '' NOT NULL, folder varchar(200) DEFAULT '' NOT NULL, folder_moved varchar(200) DEFAULT '' NOT NULL, - folder_posted varchar(200) DEFAULT '' NOT NULL, + folder_post varchar(200) DEFAULT '' NOT NULL, folder_new varchar(200) DEFAULT '' NOT NULL, - folder_new_posted varchar(200) DEFAULT '' NOT NULL, + folder_new_post varchar(200) DEFAULT '' NOT NULL, folder_hot varchar(200) DEFAULT '' NOT NULL, - folder_hot_posted varchar(200) DEFAULT '' NOT NULL, + folder_hot_post varchar(200) DEFAULT '' NOT NULL, folder_hot_new varchar(200) DEFAULT '' NOT NULL, - folder_hot_new_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked varchar(200) DEFAULT '' NOT NULL, - folder_locked_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_new varchar(200) DEFAULT '' NOT NULL, - folder_locked_new_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_announce varchar(200) DEFAULT '' NOT NULL, - folder_locked_announce_new varchar(200) DEFAULT '' NOT NULL, - folder_locked_announce_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_announce_new_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_global varchar(200) DEFAULT '' NOT NULL, - folder_locked_global_new varchar(200) DEFAULT '' NOT NULL, - folder_locked_global_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_global_new_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_sticky varchar(200) DEFAULT '' NOT NULL, - folder_locked_sticky_new varchar(200) DEFAULT '' NOT NULL, - folder_locked_sticky_posted varchar(200) DEFAULT '' NOT NULL, - folder_locked_sticky_new_posted varchar(200) DEFAULT '' NOT NULL, + folder_hot_new_post varchar(200) DEFAULT '' NOT NULL, + folder_lock varchar(200) DEFAULT '' NOT NULL, + folder_lock_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_new varchar(200) DEFAULT '' NOT NULL, + folder_lock_new_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_announce varchar(200) DEFAULT '' NOT NULL, + folder_lock_announce_new varchar(200) DEFAULT '' NOT NULL, + folder_lock_announce_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_announce_new_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_global varchar(200) DEFAULT '' NOT NULL, + folder_lock_global_new varchar(200) DEFAULT '' NOT NULL, + folder_lock_global_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_global_new_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_sticky varchar(200) DEFAULT '' NOT NULL, + folder_lock_sticky_new varchar(200) DEFAULT '' NOT NULL, + folder_lock_sticky_post varchar(200) DEFAULT '' NOT NULL, + folder_lock_sticky_new_post varchar(200) DEFAULT '' NOT NULL, folder_sticky varchar(200) DEFAULT '' NOT NULL, - folder_sticky_posted varchar(200) DEFAULT '' NOT NULL, + folder_sticky_post varchar(200) DEFAULT '' NOT NULL, folder_sticky_new varchar(200) DEFAULT '' NOT NULL, - folder_sticky_new_posted varchar(200) DEFAULT '' NOT NULL, + folder_sticky_new_post varchar(200) DEFAULT '' NOT NULL, folder_announce varchar(200) DEFAULT '' NOT NULL, - folder_announce_posted varchar(200) DEFAULT '' NOT NULL, + folder_announce_post varchar(200) DEFAULT '' NOT NULL, folder_announce_new varchar(200) DEFAULT '' NOT NULL, - folder_announce_new_posted varchar(200) DEFAULT '' NOT NULL, + folder_announce_new_post varchar(200) DEFAULT '' NOT NULL, folder_global varchar(200) DEFAULT '' NOT NULL, - folder_global_posted varchar(200) DEFAULT '' NOT NULL, + folder_global_post varchar(200) DEFAULT '' NOT NULL, folder_global_new varchar(200) DEFAULT '' NOT NULL, - folder_global_new_posted varchar(200) DEFAULT '' NOT NULL, + folder_global_new_post varchar(200) DEFAULT '' NOT NULL, poll_left varchar(200) DEFAULT '' NOT NULL, poll_center varchar(200) DEFAULT '' NOT NULL, poll_right varchar(200) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index fe8d612e4c..cd0c9349c9 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -381,7 +381,7 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) INSERT INTO phpbb_styles (style_name, style_copyright, template_id, theme_id, imageset_id) VALUES ('subSilver', '© phpBB Group', 1, 1, 1); # -- phpbb_styles_imageset -INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path, site_logo, btn_post, btn_post_pm, btn_reply, btn_reply_pm, btn_locked, btn_profile, btn_pm, btn_delete, btn_info, btn_quote, btn_search, btn_edit, btn_report, btn_warn, btn_email, btn_www, btn_icq, btn_aim, btn_yim, btn_msnm, btn_jabber, btn_online, btn_offline, btn_friend, btn_foe, icon_unapproved, icon_reported, icon_attach, icon_post, icon_post_new, icon_post_latest, icon_post_newest, forum, forum_new, forum_locked, forum_link, sub_forum, sub_forum_new, folder, folder_moved, folder_posted, folder_new, folder_new_posted, folder_hot, folder_hot_posted, folder_hot_new, folder_hot_new_posted, folder_locked, folder_locked_posted, folder_locked_new, folder_locked_new_posted, folder_locked_announce, folder_locked_announce_new, folder_locked_announce_posted, folder_locked_announce_new_posted, folder_locked_global, folder_locked_global_new, folder_locked_global_posted, folder_locked_global_new_posted, folder_locked_sticky, folder_locked_sticky_new, folder_locked_sticky_posted, folder_locked_sticky_new_posted, folder_sticky, folder_sticky_posted, folder_sticky_new, folder_sticky_new_posted, folder_announce, folder_announce_posted, folder_announce_new, folder_announce_new_posted, folder_global, folder_global_posted, folder_global_new, folder_global_new_posted, poll_left, poll_center, poll_right, attach_progress_bar, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10) VALUES ('subSilver', '© phpBB Group', 'subSilver', 'sitelogo.gif*94*170', '{LANG}/btn_post.gif*27*97', '{LANG}/btn_post_pm.gif*27*97', '{LANG}/btn_reply.gif*27*97', '{LANG}/btn_reply_pm.gif*20*90', '{LANG}/btn_locked.gif*27*97', '{LANG}/btn_profile.gif*20*72', '{LANG}/btn_pm.gif*20*72', '{LANG}/btn_delete.gif*20*20', '{LANG}/btn_info.gif*20*20', '{LANG}/btn_quote.gif*20*90', '{LANG}/btn_search.gif*20*72', '{LANG}/btn_edit.gif*20*90', '{LANG}/btn_report.gif*20*20', '{LANG}/btn_warn.gif*20*20', '{LANG}/btn_email.gif*20*72', '{LANG}/btn_www.gif*20*72', '{LANG}/btn_icq.gif*20*72', '{LANG}/btn_aim.gif*20*72', '{LANG}/btn_yim.gif*20*72', '{LANG}/btn_msnm.gif*20*72', '{LANG}/btn_jabber.gif*20*72', '{LANG}/btn_online.gif*20*72', '{LANG}/btn_offline.gif*20*72', '', '', 'icon_unapproved.gif*18*19', 'icon_reported.gif*18*19', 'icon_attach.gif*18*14', 'icon_minipost.gif*9*12', 'icon_minipost_new.gif*9*12', 'icon_latest_reply.gif*9*18', 'icon_newest_reply.gif*9*18', 'folder_big.gif*25*46', 'folder_new_big.gif*25*46', 'folder_locked_big.gif*25*46', 'folder_link_big.gif*25*46', 'subfolder_big.gif*25*46', 'subfolder_new_big.gif*25*46', 'folder.gif*18*19', 'folder_moved.gif*18*19', 'folder_posted.gif*18*19', 'folder_new.gif*18*19', 'folder_new_posted.gif*18*19', 'folder_hot.gif*18*19', 'folder_hot_posted.gif*18*19', 'folder_new_hot.gif*18*19', 'folder_new_hot_posted.gif*18*19', 'folder_lock.gif*18*19', 'folder_lock_posted.gif*18*19', 'folder_lock_new.gif*18*19', 'folder_lock_new_posted.gif*18*19', 'folder_lock_announce.gif*18*19', 'folder_lock_announce_new.gif*18*19', 'folder_lock_announce_posted.gif*18*19', 'folder_lock_announce_new_posted.gif*18*19', 'folder_lock_announce.gif*18*19', 'folder_lock_announce_new.gif*18*19', 'folder_lock_announce_posted.gif*18*19', 'folder_lock_announce_new_posted.gif*18*19', 'folder_lock_sticky.gif*18*19', 'folder_lock_sticky_new.gif*18*19', 'folder_lock_sticky_posted.gif*18*19', 'folder_lock_sticky_new_posted.gif*18*19', 'folder_sticky.gif*18*19', 'folder_sticky_posted.gif*18*19', 'folder_sticky_new.gif*18*19', 'folder_sticky_new_posted.gif*18*19', 'folder_announce.gif*18*19', 'folder_announce_posted.gif*18*19', 'folder_announce_new.gif*18*19', 'folder_announce_new_posted.gif*18*19', 'folder_announce.gif*18*19', 'folder_announce_posted.gif*18*19', 'folder_announce_new.gif*18*19', 'folder_announce_new_posted.gif*18*19', 'vote_lcap.gif*12*4', 'voting_bar.gif*12', 'vote_rcap.gif*12*4', 'progress_bar.gif*16*280', '', '', '', '', '', '', '', '', '', ''); +INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path, site_logo, btn_post, btn_post_pm, btn_reply, btn_reply_pm, btn_locked, btn_profile, btn_pm, btn_delete, btn_info, btn_quote, btn_search, btn_edit, btn_report, btn_warn, btn_email, btn_www, btn_icq, btn_aim, btn_yim, btn_msnm, btn_jabber, btn_online, btn_offline, btn_friend, btn_foe, icon_unapproved, icon_reported, icon_attach, icon_post, icon_post_new, icon_post_latest, icon_post_newest, forum, forum_new, forum_locked, forum_link, sub_forum, sub_forum_new, folder, folder_moved, folder_post, folder_new, folder_new_post, folder_hot, folder_hot_post, folder_hot_new, folder_hot_new_post, folder_lock, folder_lock_post, folder_lock_new, folder_lock_new_post, folder_lock_announce, folder_lock_announce_new, folder_lock_announce_post, folder_lock_announce_new_post, folder_lock_global, folder_lock_global_new, folder_lock_global_post, folder_lock_global_new_post, folder_lock_sticky, folder_lock_sticky_new, folder_lock_sticky_post, folder_lock_sticky_new_post, folder_sticky, folder_sticky_post, folder_sticky_new, folder_sticky_new_post, folder_announce, folder_announce_post, folder_announce_new, folder_announce_new_post, folder_global, folder_global_post, folder_global_new, folder_global_new_post, poll_left, poll_center, poll_right, attach_progress_bar, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10) VALUES ('subSilver', '© phpBB Group', 'subSilver', 'sitelogo.gif*94*170', '{LANG}/btn_post.gif*27*97', '{LANG}/btn_post_pm.gif*27*97', '{LANG}/btn_reply.gif*27*97', '{LANG}/btn_reply_pm.gif*20*90', '{LANG}/btn_locked.gif*27*97', '{LANG}/btn_profile.gif*20*72', '{LANG}/btn_pm.gif*20*72', '{LANG}/btn_delete.gif*20*20', '{LANG}/btn_info.gif*20*20', '{LANG}/btn_quote.gif*20*90', '{LANG}/btn_search.gif*20*72', '{LANG}/btn_edit.gif*20*90', '{LANG}/btn_report.gif*20*20', '{LANG}/btn_warn.gif*20*20', '{LANG}/btn_email.gif*20*72', '{LANG}/btn_www.gif*20*72', '{LANG}/btn_icq.gif*20*72', '{LANG}/btn_aim.gif*20*72', '{LANG}/btn_yim.gif*20*72', '{LANG}/btn_msnm.gif*20*72', '{LANG}/btn_jabber.gif*20*72', '{LANG}/btn_online.gif*20*72', '{LANG}/btn_offline.gif*20*72', '', '', 'icon_unapproved.gif*18*19', 'icon_reported.gif*18*19', 'icon_attach.gif*18*14', 'icon_minipost.gif*9*12', 'icon_minipost_new.gif*9*12', 'icon_latest_reply.gif*9*18', 'icon_newest_reply.gif*9*18', 'folder_big.gif*25*46', 'folder_new_big.gif*25*46', 'folder_locked_big.gif*25*46', 'folder_link_big.gif*25*46', 'subfolder_big.gif*25*46', 'subfolder_new_big.gif*25*46', 'folder.gif*18*19', 'folder_moved.gif*18*19', 'folder_posted.gif*18*19', 'folder_new.gif*18*19', 'folder_new_posted.gif*18*19', 'folder_hot.gif*18*19', 'folder_hot_posted.gif*18*19', 'folder_new_hot.gif*18*19', 'folder_new_hot_posted.gif*18*19', 'folder_lock.gif*18*19', 'folder_lock_posted.gif*18*19', 'folder_lock_new.gif*18*19', 'folder_lock_new_posted.gif*18*19', 'folder_lock_announce.gif*18*19', 'folder_lock_announce_new.gif*18*19', 'folder_lock_announce_posted.gif*18*19', 'folder_lock_announce_new_posted.gif*18*19', 'folder_lock_announce.gif*18*19', 'folder_lock_announce_new.gif*18*19', 'folder_lock_announce_posted.gif*18*19', 'folder_lock_announce_new_posted.gif*18*19', 'folder_lock_sticky.gif*18*19', 'folder_lock_sticky_new.gif*18*19', 'folder_lock_sticky_posted.gif*18*19', 'folder_lock_sticky_new_posted.gif*18*19', 'folder_sticky.gif*18*19', 'folder_sticky_posted.gif*18*19', 'folder_sticky_new.gif*18*19', 'folder_sticky_new_posted.gif*18*19', 'folder_announce.gif*18*19', 'folder_announce_posted.gif*18*19', 'folder_announce_new.gif*18*19', 'folder_announce_new_posted.gif*18*19', 'folder_announce.gif*18*19', 'folder_announce_posted.gif*18*19', 'folder_announce_new.gif*18*19', 'folder_announce_new_posted.gif*18*19', 'vote_lcap.gif*12*4', 'voting_bar.gif*12', 'vote_rcap.gif*12*4', 'progress_bar.gif*16*280', '', '', '', '', '', '', '', '', '', ''); # -- phpbb_styles_template INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path) VALUES ('subSilver', '© phpBB Group', 'subSilver'); @@ -417,7 +417,7 @@ INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VAL INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (7, 2, 0, 1); # -- Ranks -INSERT INTO phpbb_ranks (rank_title, rank_min, rank_special, rank_image) VALUES ('Site Admin', -1, 1, ''); +INSERT INTO phpbb_ranks (rank_title, rank_min, rank_special, rank_image) VALUES ('Site Admin', 0, 1, ''); # -- Roles data diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 816ee95cfa..9e109815d1 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -435,6 +435,7 @@ CREATE TABLE phpbb_posts ( post_attachment tinyint(1) NOT NULL DEFAULT '0', bbcode_bitfield blob NOT NULL DEFAULT '', bbcode_uid varchar(5) NOT NULL DEFAULT '', + post_postcount tinyint(1) NOT NULL DEFAULT '1', post_edit_time int(11) NOT NULL DEFAULT '0', post_edit_reason text(65535) NOT NULL DEFAULT '', post_edit_user mediumint(8) NOT NULL DEFAULT '0', @@ -448,6 +449,7 @@ CREATE INDEX phpbb_posts_topic_id ON phpbb_posts (topic_id);; CREATE INDEX phpbb_posts_poster_ip ON phpbb_posts (poster_ip);; CREATE INDEX phpbb_posts_poster_id ON phpbb_posts (poster_id);; CREATE INDEX phpbb_posts_post_approved ON phpbb_posts (post_approved);; +CREATE INDEX phpbb_posts_post_postcount ON phpbb_posts (post_postcount);; CREATE INDEX phpbb_posts_post_time ON phpbb_posts (post_time);; # Table: 'phpbb_privmsgs' @@ -807,41 +809,41 @@ CREATE TABLE phpbb_styles_imageset ( sub_forum_new varchar(200) NOT NULL DEFAULT '', folder varchar(200) NOT NULL DEFAULT '', folder_moved varchar(200) NOT NULL DEFAULT '', - folder_posted varchar(200) NOT NULL DEFAULT '', + folder_post varchar(200) NOT NULL DEFAULT '', folder_new varchar(200) NOT NULL DEFAULT '', - folder_new_posted varchar(200) NOT NULL DEFAULT '', + folder_new_post varchar(200) NOT NULL DEFAULT '', folder_hot varchar(200) NOT NULL DEFAULT '', - folder_hot_posted varchar(200) NOT NULL DEFAULT '', + folder_hot_post varchar(200) NOT NULL DEFAULT '', folder_hot_new varchar(200) NOT NULL DEFAULT '', - folder_hot_new_posted varchar(200) NOT NULL DEFAULT '', - folder_locked varchar(200) NOT NULL DEFAULT '', - folder_locked_posted varchar(200) NOT NULL DEFAULT '', - folder_locked_new varchar(200) NOT NULL DEFAULT '', - folder_locked_new_posted varchar(200) NOT NULL DEFAULT '', - folder_locked_announce varchar(200) NOT NULL DEFAULT '', - folder_locked_announce_new varchar(200) NOT NULL DEFAULT '', - folder_locked_announce_posted varchar(200) NOT NULL DEFAULT '', - folder_locked_announce_new_posted varchar(200) NOT NULL DEFAULT '', - folder_locked_global varchar(200) NOT NULL DEFAULT '', - folder_locked_global_new varchar(200) NOT NULL DEFAULT '', - folder_locked_global_posted varchar(200) NOT NULL DEFAULT '', - folder_locked_global_new_posted varchar(200) NOT NULL DEFAULT '', - folder_locked_sticky varchar(200) NOT NULL DEFAULT '', - folder_locked_sticky_new varchar(200) NOT NULL DEFAULT '', - folder_locked_sticky_posted varchar(200) NOT NULL DEFAULT '', - folder_locked_sticky_new_posted varchar(200) NOT NULL DEFAULT '', + folder_hot_new_post varchar(200) NOT NULL DEFAULT '', + folder_lock varchar(200) NOT NULL DEFAULT '', + folder_lock_post varchar(200) NOT NULL DEFAULT '', + folder_lock_new varchar(200) NOT NULL DEFAULT '', + folder_lock_new_post varchar(200) NOT NULL DEFAULT '', + folder_lock_announce varchar(200) NOT NULL DEFAULT '', + folder_lock_announce_new varchar(200) NOT NULL DEFAULT '', + folder_lock_announce_post varchar(200) NOT NULL DEFAULT '', + folder_lock_announce_new_post varchar(200) NOT NULL DEFAULT '', + folder_lock_global varchar(200) NOT NULL DEFAULT '', + folder_lock_global_new varchar(200) NOT NULL DEFAULT '', + folder_lock_global_post varchar(200) NOT NULL DEFAULT '', + folder_lock_global_new_post varchar(200) NOT NULL DEFAULT '', + folder_lock_sticky varchar(200) NOT NULL DEFAULT '', + folder_lock_sticky_new varchar(200) NOT NULL DEFAULT '', + folder_lock_sticky_post varchar(200) NOT NULL DEFAULT '', + folder_lock_sticky_new_post varchar(200) NOT NULL DEFAULT '', folder_sticky varchar(200) NOT NULL DEFAULT '', - folder_sticky_posted varchar(200) NOT NULL DEFAULT '', + folder_sticky_post varchar(200) NOT NULL DEFAULT '', folder_sticky_new varchar(200) NOT NULL DEFAULT '', - folder_sticky_new_posted varchar(200) NOT NULL DEFAULT '', + folder_sticky_new_post varchar(200) NOT NULL DEFAULT '', folder_announce varchar(200) NOT NULL DEFAULT '', - folder_announce_posted varchar(200) NOT NULL DEFAULT '', + folder_announce_post varchar(200) NOT NULL DEFAULT '', folder_announce_new varchar(200) NOT NULL DEFAULT '', - folder_announce_new_posted varchar(200) NOT NULL DEFAULT '', + folder_announce_new_post varchar(200) NOT NULL DEFAULT '', folder_global varchar(200) NOT NULL DEFAULT '', - folder_global_posted varchar(200) NOT NULL DEFAULT '', + folder_global_post varchar(200) NOT NULL DEFAULT '', folder_global_new varchar(200) NOT NULL DEFAULT '', - folder_global_new_posted varchar(200) NOT NULL DEFAULT '', + folder_global_new_post varchar(200) NOT NULL DEFAULT '', poll_left varchar(200) NOT NULL DEFAULT '', poll_center varchar(200) NOT NULL DEFAULT '', poll_right varchar(200) NOT NULL DEFAULT '', diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index 40232e28b2..141768c2dd 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -178,40 +178,40 @@ $lang = array_merge($lang, array( 'IMG_FOLDER' => 'Topic', 'IMG_FOLDER_ANNOUNCE' => 'Announcement', 'IMG_FOLDER_ANNOUNCE_NEW' => 'Announcement new posts', - 'IMG_FOLDER_ANNOUNCE_POSTED' => 'Announcement posted to', - 'IMG_FOLDER_ANNOUNCE_NEW_POSTED' => 'Announcement posted to new', + 'IMG_FOLDER_ANNOUNCE_POST' => 'Announcement posted to', + 'IMG_FOLDER_ANNOUNCE_NEW_POST' => 'Announcement posted to new', 'IMG_FOLDER_GLOBAL' => 'Global', 'IMG_FOLDER_GLOBAL_NEW' => 'Global new posts', - 'IMG_FOLDER_GLOBAL_POSTED' => 'Global posted to', - 'IMG_FOLDER_GLOBAL_NEW_POSTED' => 'Global posted to new', + 'IMG_FOLDER_GLOBAL_POST' => 'Global posted to', + 'IMG_FOLDER_GLOBAL_NEW_POST' => 'Global posted to new', 'IMG_FOLDER_HOT' => 'Topic hot', 'IMG_FOLDER_HOT_NEW' => 'Topic hot new posts', - 'IMG_FOLDER_HOT_POSTED' => 'Topic hot posted to', - 'IMG_FOLDER_HOT_NEW_POSTED' => 'Topic hot posted to new', - 'IMG_FOLDER_LOCKED' => 'Topic locked', - 'IMG_FOLDER_LOCKED_NEW' => 'Topic locked new', - 'IMG_FOLDER_LOCKED_POSTED' => 'Topic locked posted to', - 'IMG_FOLDER_LOCKED_NEW_POSTED' => 'Topic locked posted to new', - 'IMG_FOLDER_LOCKED_ANNOUNCE' => 'Announcement locked', - 'IMG_FOLDER_LOCKED_ANNOUNCE_NEW' => 'Announcement locked new posts', - 'IMG_FOLDER_LOCKED_ANNOUNCE_POSTED' => 'Announcement locked posted to', - 'IMG_FOLDER_LOCKED_ANNOUNCE_NEW_POSTED' => 'Announcement locked posted to new', - 'IMG_FOLDER_LOCKED_GLOBAL' => 'Global locked', - 'IMG_FOLDER_LOCKED_GLOBAL_NEW' => 'Global locked new posts', - 'IMG_FOLDER_LOCKED_GLOBAL_POSTED' => 'Global locked posted to', - 'IMG_FOLDER_LOCKED_GLOBAL_NEW_POSTED' => 'Global locked posted to new', - 'IMG_FOLDER_LOCKED_STICKY' => 'Sticky topic locked', - 'IMG_FOLDER_LOCKED_STICKY_POSTED' => 'Sticky topic locked posted to', - 'IMG_FOLDER_LOCKED_STICKY_NEW' => 'Sticky topic locked new posts', - 'IMG_FOLDER_LOCKED_STICKY_NEW_POSTED' => 'Sticky topic locked posted to new', + 'IMG_FOLDER_HOT_POST' => 'Topic hot posted to', + 'IMG_FOLDER_HOT_NEW_POST' => 'Topic hot posted to new', + 'IMG_FOLDER_LOCK' => 'Topic locked', + 'IMG_FOLDER_LOCK_NEW' => 'Topic locked new', + 'IMG_FOLDER_LOCK_POST' => 'Topic locked posted to', + 'IMG_FOLDER_LOCK_NEW_POST' => 'Topic locked posted to new', + 'IMG_FOLDER_LOCK_ANNOUNCE' => 'Announcement locked', + 'IMG_FOLDER_LOCK_ANNOUNCE_NEW' => 'Announcement locked new posts', + 'IMG_FOLDER_LOCK_ANNOUNCE_POST' => 'Announcement locked posted to', + 'IMG_FOLDER_LOCK_ANNOUNCE_NEW_POST' => 'Announcement locked posted to new', + 'IMG_FOLDER_LOCK_GLOBAL' => 'Global locked', + 'IMG_FOLDER_LOCK_GLOBAL_NEW' => 'Global locked new posts', + 'IMG_FOLDER_LOCK_GLOBAL_POST' => 'Global locked posted to', + 'IMG_FOLDER_LOCK_GLOBAL_NEW_POST' => 'Global locked posted to new', + 'IMG_FOLDER_LOCK_STICKY' => 'Sticky topic locked', + 'IMG_FOLDER_LOCK_STICKY_POST' => 'Sticky topic locked posted to', + 'IMG_FOLDER_LOCK_STICKY_NEW' => 'Sticky topic locked new posts', + 'IMG_FOLDER_LOCK_STICKY_NEW_POST' => 'Sticky topic locked posted to new', 'IMG_FOLDER_MOVED' => 'Topic moved', 'IMG_FOLDER_NEW' => 'Topic new posts', - 'IMG_FOLDER_NEW_POSTED' => 'Topic posted to new', - 'IMG_FOLDER_POSTED' => 'Topic posted to', + 'IMG_FOLDER_NEW_POST' => 'Topic posted to new', + 'IMG_FOLDER_POST' => 'Topic posted to', 'IMG_FOLDER_STICKY' => 'Sticky topic', - 'IMG_FOLDER_STICKY_POSTED' => 'Sticky topic posted to', + 'IMG_FOLDER_STICKY_POST' => 'Sticky topic posted to', 'IMG_FOLDER_STICKY_NEW' => 'Sticky topic new posts', - 'IMG_FOLDER_STICKY_NEW_POSTED' => 'Sticky topic posted to new', + 'IMG_FOLDER_STICKY_NEW_POST' => 'Sticky topic posted to new', 'IMG_FORUM' => 'Forum', 'IMG_FORUM_NEW' => 'Forum new posts', diff --git a/phpBB/posting.php b/phpBB/posting.php index 077fd2557f..fb63904a48 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1276,7 +1276,8 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data) 'post_approved' => $post_data['post_approved'], 'post_reported' => $post_data['post_reported'], 'post_time' => $post_data['post_time'], - 'poster_id' => $post_data['poster_id'] + 'poster_id' => $post_data['poster_id'], + 'post_postcount' => $post_data['post_postcount'] ); $next_post_id = delete_post($forum_id, $topic_id, $post_id, $data); diff --git a/phpBB/styles/subSilver/imageset/imageset.cfg b/phpBB/styles/subSilver/imageset/imageset.cfg index 28a33e165c..88103072c6 100644 --- a/phpBB/styles/subSilver/imageset/imageset.cfg +++ b/phpBB/styles/subSilver/imageset/imageset.cfg @@ -63,41 +63,41 @@ img_sub_forum = subfolder_big.gif*25*46 img_sub_forum_new = subfolder_new_big.gif*25*46 img_folder = folder.gif*18*19 img_folder_moved = folder_moved.gif*18*19 -img_folder_posted = folder_posted.gif*18*19 +img_folder_post = folder_posted.gif*18*19 img_folder_new = folder_new.gif*18*19 -img_folder_new_posted = folder_new_posted.gif*18*19 +img_folder_new_post = folder_new_posted.gif*18*19 img_folder_hot = folder_hot.gif*18*19 -img_folder_hot_posted = folder_hot_posted.gif*18*19 +img_folder_hot_post = folder_hot_posted.gif*18*19 img_folder_hot_new = folder_new_hot.gif*18*19 -img_folder_hot_new_posted = folder_new_hot_posted.gif*18*19 -img_folder_locked = folder_lock.gif*18*19 -img_folder_locked_posted = folder_lock_posted.gif*18*19 -img_folder_locked_new = folder_lock_new.gif*18*19 -img_folder_locked_new_posted = folder_lock_new_posted.gif*18*19 -img_folder_locked_announce = folder_lock_announce.gif*18*19 -img_folder_locked_announce_new = folder_lock_announce_new.gif*18*19 -img_folder_locked_announce_posted = folder_lock_announce_posted.gif*18*19 -img_folder_locked_announce_new_posted = folder_lock_announce_new_posted.gif*18*19 -img_folder_locked_global = folder_lock_announce.gif*18*19 -img_folder_locked_global_new = folder_lock_announce_new.gif*18*19 -img_folder_locked_global_posted = folder_lock_announce_posted.gif*18*19 -img_folder_locked_global_new_posted = folder_lock_announce_new_posted.gif*18*19 -img_folder_locked_sticky = folder_lock_sticky.gif*18*19 -img_folder_locked_sticky_new = folder_lock_sticky_new.gif*18*19 -img_folder_locked_sticky_posted = folder_lock_sticky_posted.gif*18*19 -img_folder_locked_sticky_new_posted = folder_lock_sticky_new_posted.gif*18*19 +img_folder_hot_new_post = folder_new_hot_posted.gif*18*19 +img_folder_lock = folder_lock.gif*18*19 +img_folder_lock_post = folder_lock_posted.gif*18*19 +img_folder_lock_new = folder_lock_new.gif*18*19 +img_folder_lock_new_post = folder_lock_new_posted.gif*18*19 +img_folder_lock_announce = folder_lock_announce.gif*18*19 +img_folder_lock_announce_new = folder_lock_announce_new.gif*18*19 +img_folder_lock_announce_post = folder_lock_announce_posted.gif*18*19 +img_folder_lock_announce_new_post = folder_lock_announce_new_posted.gif*18*19 +img_folder_lock_global = folder_lock_announce.gif*18*19 +img_folder_lock_global_new = folder_lock_announce_new.gif*18*19 +img_folder_lock_global_post = folder_lock_announce_posted.gif*18*19 +img_folder_lock_global_new_post = folder_lock_announce_new_posted.gif*18*19 +img_folder_lock_sticky = folder_lock_sticky.gif*18*19 +img_folder_lock_sticky_new = folder_lock_sticky_new.gif*18*19 +img_folder_lock_sticky_post = folder_lock_sticky_posted.gif*18*19 +img_folder_lock_sticky_new_post = folder_lock_sticky_new_posted.gif*18*19 img_folder_sticky = folder_sticky.gif*18*19 -img_folder_sticky_posted = folder_sticky_posted.gif*18*19 +img_folder_sticky_post = folder_sticky_posted.gif*18*19 img_folder_sticky_new = folder_sticky_new.gif*18*19 -img_folder_sticky_new_posted = folder_sticky_new_posted.gif*18*19 +img_folder_sticky_new_post = folder_sticky_new_posted.gif*18*19 img_folder_announce = folder_announce.gif*18*19 -img_folder_announce_posted = folder_announce_posted.gif*18*19 +img_folder_announce_post = folder_announce_posted.gif*18*19 img_folder_announce_new = folder_announce_new.gif*18*19 -img_folder_announce_new_posted = folder_announce_new_posted.gif*18*19 +img_folder_announce_new_post = folder_announce_new_posted.gif*18*19 img_folder_global = folder_announce.gif*18*19 -img_folder_global_posted = folder_announce_posted.gif*18*19 +img_folder_global_post = folder_announce_posted.gif*18*19 img_folder_global_new = folder_announce_new.gif*18*19 -img_folder_global_new_posted = folder_announce_new_posted.gif*18*19 +img_folder_global_new_post = folder_announce_new_posted.gif*18*19 img_poll_left = vote_lcap.gif*12*4 img_poll_center = voting_bar.gif*12* img_poll_right = vote_rcap.gif*12*4 diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 4b7075fbf4..a016c4b51e 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -247,8 +247,8 @@ $template->assign_vars(array( 'FOLDER_NEW_IMG' => $user->img('folder_new', 'NEW_POSTS'), 'FOLDER_HOT_IMG' => $user->img('folder_hot', 'NO_NEW_POSTS_HOT'), 'FOLDER_HOT_NEW_IMG' => $user->img('folder_hot_new', 'NEW_POSTS_HOT'), - 'FOLDER_LOCKED_IMG' => $user->img('folder_locked', 'NO_NEW_POSTS_LOCKED'), - 'FOLDER_LOCKED_NEW_IMG' => $user->img('folder_locked_new', 'NEW_POSTS_LOCKED'), + 'FOLDER_LOCKED_IMG' => $user->img('folder_lock', 'NO_NEW_POSTS_LOCKED'), + 'FOLDER_LOCKED_NEW_IMG' => $user->img('folder_lock_new', 'NEW_POSTS_LOCKED'), 'FOLDER_STICKY_IMG' => $user->img('folder_sticky', 'POST_STICKY'), 'FOLDER_STICKY_NEW_IMG' => $user->img('folder_sticky_new', 'POST_STICKY'), 'FOLDER_ANNOUNCE_IMG' => $user->img('folder_announce', 'POST_ANNOUNCEMENT'), |