diff options
| -rw-r--r-- | build/build.xml | 8 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_board.php | 26 | ||||
| -rw-r--r-- | phpBB/includes/functions_admin.php | 20 | ||||
| -rw-r--r-- | phpBB/includes/functions_display.php | 5 | ||||
| -rw-r--r-- | phpBB/includes/functions_posting.php | 11 | ||||
| -rw-r--r-- | phpBB/includes/mcp/mcp_front.php | 22 | ||||
| -rw-r--r-- | phpBB/ucp.php | 11 | ||||
| -rw-r--r-- | phpBB/viewforum.php | 5 | ||||
| -rw-r--r-- | phpBB/viewtopic.php | 11 | ||||
| -rw-r--r-- | tests/dbal/fixtures/massmail_crossjoin.xml | 16 | ||||
| -rw-r--r-- | tests/dbal/fixtures/three_users.xml | 16 | ||||
| -rw-r--r-- | tests/session/fixtures/sessions_empty.xml | 16 | ||||
| -rw-r--r-- | tests/session/fixtures/sessions_full.xml | 16 |
13 files changed, 134 insertions, 49 deletions
diff --git a/build/build.xml b/build/build.xml index fbc1a91e1b..c942142b5e 100644 --- a/build/build.xml +++ b/build/build.xml @@ -119,6 +119,7 @@ <target name="create-package" depends="prepare-new-version,old-version-diffs"> <exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" /> <exec dir="build" command="php -f build_diff.php '${prevversion}' '${newversion}' > logs/build_diff.log" escape="false" /> + <exec dir="build" escape="false" command="diff -crNEBwd old_versions/release-${prevversion}/language new_version/phpBB3/language > save/save_${prevversion}_to_${newversion}/language/phpbb-${prevversion}_to_${newversion}_language.patch" /> @@ -128,6 +129,13 @@ <exec dir="build" escape="false" command="diff -crNEBwd old_versions/release-${prevversion}/styles/subsilver2 new_version/phpBB3/styles/subsilver2 > save/save_${prevversion}_to_${newversion}/subsilver2/phpbb-${prevversion}_to_${newversion}_subsilver2.patch" /> + + <exec dir="build" escape="false" + command="git shortlog --summary --numbered release-${prevversion}...HEAD > + save/save_${prevversion}_to_${newversion}/phpbb-${prevversion}_to_${newversion}_git_shortlog.txt" /> + <exec dir="build" escape="false" + command="git diff --stat release-${prevversion}...HEAD > + save/save_${prevversion}_to_${newversion}/phpbb-${prevversion}_to_${newversion}_git_diffstat.txt" /> </target> <!-- diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 890bac62b7..c99541ea7a 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -236,7 +236,7 @@ class acp_board 'max_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:8:180', 'type' => false, 'method' => false, 'explain' => false,), 'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,), - 'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true), + 'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'select', 'method' => 'select_acc_activation', 'explain' => true), 'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'text:4:4', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']), 'new_member_group_default'=> array('lang' => 'NEW_MEMBER_GROUP_DEFAULT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:1', 'type' => 'custom:5:180', 'method' => 'username_length', 'explain' => true), @@ -772,24 +772,28 @@ class acp_board /** * Select account activation method */ - function select_acc_activation($value, $key = '') + function select_acc_activation($selected_value, $value) { global $user, $config; - $radio_ary = array( - USER_ACTIVATION_DISABLE => 'ACC_DISABLE', - USER_ACTIVATION_NONE => 'ACC_NONE', + $act_ary = array( + 'ACC_DISABLE' => USER_ACTIVATION_DISABLE, + 'ACC_NONE' => USER_ACTIVATION_NONE, ); - if ($config['email_enable']) { - $radio_ary[USER_ACTIVATION_SELF] = 'ACC_USER'; - $radio_ary[USER_ACTIVATION_ADMIN] = 'ACC_ADMIN'; - } + $act_ary['ACC_USER'] = USER_ACTIVATION_SELF; + $act_ary['ACC_ADMIN'] = USER_ACTIVATION_ADMIN; + } + $act_options = ''; - $radio_text = h_radio('config[require_activation]', $radio_ary, $value, 'require_activation', $key, '<br />'); + foreach ($act_ary as $key => $value) + { + $selected = ($selected_value == $value) ? ' selected="selected"' : ''; + $act_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$key] . '</option>'; + } - return $radio_text; + return $act_options; } /** diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index e877674715..82fe97bd6d 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2366,7 +2366,7 @@ function cache_moderators() $ug_id_ary = array_keys($hold_ary); // Remove users who have group memberships with DENY moderator permissions - $sql = $db->sql_build_query('SELECT', array( + $sql_ary = array( 'SELECT' => 'a.forum_id, ug.user_id, g.group_id', 'FROM' => array( @@ -2379,8 +2379,8 @@ function cache_moderators() 'LEFT_JOIN' => array( array( 'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'), - 'ON' => 'a.auth_role_id = r.role_id' - ) + 'ON' => 'a.auth_role_id = r.role_id', + ), ), 'WHERE' => '(o.auth_option_id = a.auth_option_id OR o.auth_option_id = r.auth_option_id) @@ -2392,7 +2392,8 @@ function cache_moderators() AND ' . $db->sql_in_set('ug.user_id', $ug_id_ary) . " AND ug.user_pending = 0 AND o.auth_option " . $db->sql_like_expression('m_' . $db->any_char), - )); + ); + $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -2796,18 +2797,18 @@ function update_foes($group_id = false, $user_id = false) if (is_array($group_id) && sizeof($group_id)) { // Grab group settings... - $sql = $db->sql_build_query('SELECT', array( + $sql_ary = array( 'SELECT' => 'a.group_id', 'FROM' => array( ACL_OPTIONS_TABLE => 'ao', - ACL_GROUPS_TABLE => 'a' + ACL_GROUPS_TABLE => 'a', ), 'LEFT_JOIN' => array( array( 'FROM' => array(ACL_ROLES_DATA_TABLE => 'r'), - 'ON' => 'a.auth_role_id = r.role_id' + 'ON' => 'a.auth_role_id = r.role_id', ), ), @@ -2815,8 +2816,9 @@ function update_foes($group_id = false, $user_id = false) AND ' . $db->sql_in_set('a.group_id', $group_id) . " AND ao.auth_option IN ('a_', 'm_')", - 'GROUP_BY' => 'a.group_id' - )); + 'GROUP_BY' => 'a.group_id', + ); + $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); $groups = array(); diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 39d0793030..2b871a21ec 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -110,7 +110,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod $sql_array['SELECT'] .= ', fa.user_id'; } - $sql = $db->sql_build_query('SELECT', array( + $sql_ary = array( 'SELECT' => $sql_array['SELECT'], 'FROM' => $sql_array['FROM'], 'LEFT_JOIN' => $sql_array['LEFT_JOIN'], @@ -118,8 +118,9 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod 'WHERE' => $sql_where, 'ORDER_BY' => 'f.left_id', - )); + ); + $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); $forum_tracking_info = array(); diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index dd8437da1a..960359b936 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1005,7 +1005,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id $mode = 'post_review'; } - $sql = $db->sql_build_query('SELECT', array( + $sql_ary = array( 'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe', 'FROM' => array( @@ -1016,14 +1016,15 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id 'LEFT_JOIN' => array( array( 'FROM' => array(ZEBRA_TABLE => 'z'), - 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id' - ) + 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id', + ), ), 'WHERE' => $db->sql_in_set('p.post_id', $post_list) . ' - AND u.user_id = p.poster_id' - )); + AND u.user_id = p.poster_id', + ); + $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); $bbcode_bitfield = ''; diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index bd2eca50c4..ee74a04c91 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -159,7 +159,7 @@ function mcp_front_view($id, $mode, $action) if ($total) { - $sql = $db->sql_build_query('SELECT', array( + $sql_ary = array( 'SELECT' => 'r.report_time, p.post_id, p.post_subject, p.post_time, p.post_attachment, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name', 'FROM' => array( @@ -167,14 +167,14 @@ function mcp_front_view($id, $mode, $action) REPORTS_REASONS_TABLE => 'rr', TOPICS_TABLE => 't', USERS_TABLE => array('u', 'u2'), - POSTS_TABLE => 'p' + POSTS_TABLE => 'p', ), 'LEFT_JOIN' => array( array( 'FROM' => array(FORUMS_TABLE => 'f'), - 'ON' => 'f.forum_id = p.forum_id' - ) + 'ON' => 'f.forum_id = p.forum_id', + ), ), 'WHERE' => 'r.post_id = p.post_id @@ -186,8 +186,9 @@ function mcp_front_view($id, $mode, $action) AND p.poster_id = u2.user_id AND ' . $db->sql_in_set('p.forum_id', $forum_list), - 'ORDER_BY' => 'p.post_time DESC' - )); + 'ORDER_BY' => 'p.post_time DESC', + ); + $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query_limit($sql, 5); while ($row = $db->sql_fetchrow($result)) @@ -255,14 +256,14 @@ function mcp_front_view($id, $mode, $action) { include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx); - $sql = $db->sql_build_query('SELECT', array( + $sql_ary = array( 'SELECT' => 'r.report_id, r.report_time, p.msg_id, p.message_subject, p.message_time, p.to_address, p.bcc_address, p.message_attachment, u.username, u.username_clean, u.user_colour, u.user_id, u2.username as author_name, u2.username_clean as author_name_clean, u2.user_colour as author_colour, u2.user_id as author_id', 'FROM' => array( REPORTS_TABLE => 'r', REPORTS_REASONS_TABLE => 'rr', USERS_TABLE => array('u', 'u2'), - PRIVMSGS_TABLE => 'p' + PRIVMSGS_TABLE => 'p', ), 'WHERE' => 'r.pm_id = p.msg_id @@ -272,8 +273,9 @@ function mcp_front_view($id, $mode, $action) AND r.user_id = u.user_id AND p.author_id = u2.user_id', - 'ORDER_BY' => 'p.message_time DESC' - )); + 'ORDER_BY' => 'p.message_time DESC', + ); + $sql_ary = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query_limit($sql, 5); $pm_by_id = $pm_list = array(); diff --git a/phpBB/ucp.php b/phpBB/ucp.php index 505dbb998b..c8a0795bcb 100644 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -274,19 +274,19 @@ if ($module->is_active('zebra', 'friends')) // Output listing of friends online $update_time = $config['load_online_time'] * 60; - $sql = $db->sql_build_query('SELECT_DISTINCT', array( + $sql_ary = array( 'SELECT' => 'u.user_id, u.username, u.username_clean, u.user_colour, MAX(s.session_time) as online_time, MIN(s.session_viewonline) AS viewonline', 'FROM' => array( USERS_TABLE => 'u', - ZEBRA_TABLE => 'z' + ZEBRA_TABLE => 'z', ), 'LEFT_JOIN' => array( array( 'FROM' => array(SESSIONS_TABLE => 's'), - 'ON' => 's.session_user_id = z.zebra_id' - ) + 'ON' => 's.session_user_id = z.zebra_id', + ), ), 'WHERE' => 'z.user_id = ' . $user->data['user_id'] . ' @@ -296,8 +296,9 @@ if ($module->is_active('zebra', 'friends')) 'GROUP_BY' => 'z.zebra_id, u.user_id, u.username_clean, u.user_colour, u.username', 'ORDER_BY' => 'u.username_clean ASC', - )); + ); + $sql = $db->sql_build_query('SELECT_DISTINCT', $sql_ary); $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index caed794671..3b10d828d3 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -375,7 +375,7 @@ if ($forum_data['forum_type'] == FORUM_POST) $sql_anounce_array['SELECT'] = $sql_array['SELECT'] . ', f.forum_name'; // Obtain announcements ... removed sort ordering, sort by time in all cases - $sql = $db->sql_build_query('SELECT', array( + $sql_ary = array( 'SELECT' => $sql_anounce_array['SELECT'], 'FROM' => $sql_array['FROM'], 'LEFT_JOIN' => $sql_anounce_array['LEFT_JOIN'], @@ -386,7 +386,8 @@ if ($forum_data['forum_type'] == FORUM_POST) AND t.topic_type = ' . POST_GLOBAL . ')', 'ORDER_BY' => 't.topic_time DESC', - )); + ); + $sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index ceb9f3ea1c..e78ba73cd7 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -943,7 +943,7 @@ if (!sizeof($post_list)) // We need to grab it because we do reverse ordering sometimes $max_post_time = 0; -$sql = $db->sql_build_query('SELECT', array( +$sql_ary = array( 'SELECT' => 'u.*, z.friend, z.foe, p.*', 'FROM' => array( @@ -954,14 +954,15 @@ $sql = $db->sql_build_query('SELECT', array( 'LEFT_JOIN' => array( array( 'FROM' => array(ZEBRA_TABLE => 'z'), - 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id' - ) + 'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id', + ), ), 'WHERE' => $db->sql_in_set('p.post_id', $post_list) . ' - AND u.user_id = p.poster_id' -)); + AND u.user_id = p.poster_id', +); +$sql = $db->sql_build_query('SELECT', $sql_ary); $result = $db->sql_query($sql); $now = phpbb_gmgetdate(time() + $user->timezone + $user->dst); diff --git a/tests/dbal/fixtures/massmail_crossjoin.xml b/tests/dbal/fixtures/massmail_crossjoin.xml index 801205eb81..ef0a2b7149 100644 --- a/tests/dbal/fixtures/massmail_crossjoin.xml +++ b/tests/dbal/fixtures/massmail_crossjoin.xml @@ -12,20 +12,36 @@ <column>user_id</column> <column>username</column> <column>username_clean</column> + <column>user_permissions</column> + <column>user_sig</column> + <column>user_occ</column> + <column>user_interests</column> <row> <value>1</value> <value>mass email</value> <value>mass email</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> <row> <value>2</value> <value>banned</value> <value>banned</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> <row> <value>3</value> <value>not in group</value> <value>not in group</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> </table> <table name="phpbb_user_group"> diff --git a/tests/dbal/fixtures/three_users.xml b/tests/dbal/fixtures/three_users.xml index a6789f4a01..a50e3e8634 100644 --- a/tests/dbal/fixtures/three_users.xml +++ b/tests/dbal/fixtures/three_users.xml @@ -3,17 +3,33 @@ <table name="phpbb_users"> <column>user_id</column> <column>username_clean</column> + <column>user_permissions</column> + <column>user_sig</column> + <column>user_occ</column> + <column>user_interests</column> <row> <value>1</value> <value>barfoo</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> <row> <value>2</value> <value>foobar</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> <row> <value>3</value> <value>bertie</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> </table> </dataset> diff --git a/tests/session/fixtures/sessions_empty.xml b/tests/session/fixtures/sessions_empty.xml index f94337314e..0e6ddccd88 100644 --- a/tests/session/fixtures/sessions_empty.xml +++ b/tests/session/fixtures/sessions_empty.xml @@ -3,17 +3,33 @@ <table name="phpbb_users"> <column>user_id</column> <column>username_clean</column> + <column>user_permissions</column> + <column>user_sig</column> + <column>user_occ</column> + <column>user_interests</column> <row> <value>1</value> <value>anonymous</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> <row> <value>3</value> <value>foo</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> <row> <value>4</value> <value>bar</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> </table> <table name="phpbb_sessions"> diff --git a/tests/session/fixtures/sessions_full.xml b/tests/session/fixtures/sessions_full.xml index bf6fc65997..509687f4d2 100644 --- a/tests/session/fixtures/sessions_full.xml +++ b/tests/session/fixtures/sessions_full.xml @@ -3,17 +3,33 @@ <table name="phpbb_users"> <column>user_id</column> <column>username_clean</column> + <column>user_permissions</column> + <column>user_sig</column> + <column>user_occ</column> + <column>user_interests</column> <row> <value>1</value> <value>anonymous</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> <row> <value>3</value> <value>foo</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> <row> <value>4</value> <value>bar</value> + <value></value> + <value></value> + <value></value> + <value></value> </row> </table> <table name="phpbb_sessions"> |
