From 8e1e48a7b69b78e10297869e3aaf224e5c12e493 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 23 Feb 2012 10:55:57 +0100 Subject: [PATCH 01/30] [ticket/8636] Add resync option to topic_view moderation page PHPBB3-8636 --- phpBB/includes/mcp/mcp_topic.php | 11 +++++++++++ phpBB/styles/prosilver/template/mcp_topic.html | 1 + phpBB/styles/subsilver2/template/mcp_topic.html | 1 + 3 files changed, 13 insertions(+) diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index d7cc1e795a..7d4edaf362 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -50,6 +50,16 @@ function mcp_topic_view($id, $mode, $action) $submitted_id_list = request_var('post_ids', array(0)); $checked_ids = $post_id_list = request_var('post_id_list', array(0)); + // Resync Topic? + if ($action == 'resync') + { + if (!function_exists('mcp_resync_topics')) + { + include($phpbb_root_path . 'includes/mcp/mcp_forum.' . $phpEx); + } + mcp_resync_topics(array($topic_id)); + } + // Split Topic? if ($action == 'split_all' || $action == 'split_beyond') { @@ -320,6 +330,7 @@ function mcp_topic_view($id, $mode, $action) 'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false, 'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false, 'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false, + 'S_CAN_SYNC' => $auth->acl_get('m_', $topic_info['forum_id']), 'S_REPORT_VIEW' => ($action == 'reports') ? true : false, 'S_MERGE_VIEW' => ($action == 'merge') ? true : false, 'S_SPLIT_VIEW' => ($action == 'split') ? true : false, diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html index a4d2a0f600..2a5f52f038 100644 --- a/phpBB/styles/prosilver/template/mcp_topic.html +++ b/phpBB/styles/prosilver/template/mcp_topic.html @@ -158,6 +158,7 @@ onload_functions.push('subPanels()'); +  
{L_MARK_ALL} :: {L_UNMARK_ALL}
diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html index 13865d26ee..f9f9382ff2 100644 --- a/phpBB/styles/subsilver2/template/mcp_topic.html +++ b/phpBB/styles/subsilver2/template/mcp_topic.html @@ -135,6 +135,7 @@ +   From 025de9ee191654825f6ba09a4804e6ef3633b8cb Mon Sep 17 00:00:00 2001 From: rxu Date: Thu, 8 Mar 2012 14:57:47 +0800 Subject: [PATCH 02/30] [ticket/10684] Send notifications for users with stale bans PHPBB3-10684 --- phpBB/includes/functions_posting.php | 36 +++++++++++++++------------- phpBB/includes/functions_user.php | 29 ++++++++++++++++++++++ 2 files changed, 48 insertions(+), 17 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index f920be9c4b..faf904467f 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1180,28 +1180,23 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id $topic_title = ($topic_notification) ? $topic_title : $subject; $topic_title = censor_text($topic_title); - // Get banned User ID's - $sql = 'SELECT ban_userid - FROM ' . BANLIST_TABLE . ' - WHERE ban_userid <> 0 - AND ban_exclude <> 1'; - $result = $db->sql_query($sql); - - $sql_ignore_users = ANONYMOUS . ', ' . $user->data['user_id']; - while ($row = $db->sql_fetchrow($result)) + // Exclude guests, current user and banned users from notifications + if (!function_exists('phpbb_get_banned_users_ids')) { - $sql_ignore_users .= ', ' . (int) $row['ban_userid']; + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } - $db->sql_freeresult($result); + $sql_ignore_users = phpbb_get_banned_users_ids(); + $sql_ignore_users[ANONYMOUS] = ANONYMOUS; + $sql_ignore_users[$user->data['user_id']] = $user->data['user_id']; $notify_rows = array(); // -- get forum_userids || topic_userids $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber FROM ' . (($topic_notification) ? TOPICS_WATCH_TABLE : FORUMS_WATCH_TABLE) . ' w, ' . USERS_TABLE . ' u - WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . " - AND w.user_id NOT IN ($sql_ignore_users) - AND w.notify_status = " . NOTIFY_YES . ' + WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . ' + AND ' . $db->sql_in_set('w.user_id', $sql_ignore_users, true) . ' + AND w.notify_status = ' . NOTIFY_YES . ' AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') AND u.user_id = w.user_id'; $result = $db->sql_query($sql); @@ -1225,16 +1220,23 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id // forum notification is sent to those not already receiving topic notifications if ($topic_notification) { + // Add users who has been already notified to ignore list if (sizeof($notify_rows)) { - $sql_ignore_users .= ', ' . implode(', ', array_keys($notify_rows)); + foreach ($notify_rows as $user_id => $row) + { + if (!isset($sql_ignore_users[$user_id])) + { + $sql_ignore_users[$user_id] = $user_id; + } + } } $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u WHERE fw.forum_id = $forum_id - AND fw.user_id NOT IN ($sql_ignore_users) - AND fw.notify_status = " . NOTIFY_YES . ' + AND " . $db->sql_in_set('fw.user_id', $sql_ignore_users, true) . ' + AND fw.notify_status = ' . NOTIFY_YES . ' AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ') AND u.user_id = fw.user_id'; $result = $db->sql_query($sql); diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 6b5cca8abb..aea94a0d34 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -3587,4 +3587,33 @@ function remove_newly_registered($user_id, $user_data = false) return $user_data['group_id']; } +/** +* Get a list of banned users' ids, ignoring stale buns which were not wiped yet. +* +* @return array Array of banned users' ids if any, empty array otherwise +*/ +function phpbb_get_banned_users_ids() +{ + global $db; + + // Get banned User ID's + // Ignore stale bans which were not wiped yet + $banned_ids_list = array(); + $sql = 'SELECT ban_userid + FROM ' . BANLIST_TABLE . ' + WHERE ban_userid <> 0 + AND ban_exclude <> 1 + AND (ban_end > ' . time() . ' + OR ban_end = 0)'; + $result = $db->sql_query($sql); + while ($row = $db->sql_fetchrow($result)) + { + $user_id = (int) $row['ban_userid']; + $banned_ids_list[$user_id] = $user_id; + } + $db->sql_freeresult($result); + + return $banned_ids_list; +} + ?> \ No newline at end of file From ee6783109ad7af70665c98d6bbc12d170bc0f892 Mon Sep 17 00:00:00 2001 From: rxu Date: Fri, 9 Mar 2012 16:41:49 +0800 Subject: [PATCH 03/30] [ticket/10684] Fix 2 typos in comment lines. PHPBB3-10684 --- phpBB/includes/functions_posting.php | 2 +- phpBB/includes/functions_user.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index faf904467f..ce9762284d 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1220,7 +1220,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id // forum notification is sent to those not already receiving topic notifications if ($topic_notification) { - // Add users who has been already notified to ignore list + // Add users who have been already notified to ignore list if (sizeof($notify_rows)) { foreach ($notify_rows as $user_id => $row) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index aea94a0d34..dec8d09082 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -3588,7 +3588,7 @@ function remove_newly_registered($user_id, $user_data = false) } /** -* Get a list of banned users' ids, ignoring stale buns which were not wiped yet. +* Get a list of banned users' ids, ignoring stale bans which were not wiped yet. * * @return array Array of banned users' ids if any, empty array otherwise */ From f563647e4b97fc62aa91bc3bf7c81fcc715f17c3 Mon Sep 17 00:00:00 2001 From: rxu Date: Fri, 9 Mar 2012 22:35:13 +0800 Subject: [PATCH 04/30] [ticket/10684] Remove isset() for $sql_ignore_users update PHPBB3-10684 --- phpBB/includes/functions_posting.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index ce9762284d..c9b4267c35 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1225,10 +1225,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id { foreach ($notify_rows as $user_id => $row) { - if (!isset($sql_ignore_users[$user_id])) - { - $sql_ignore_users[$user_id] = $user_id; - } + $sql_ignore_users[$user_id] = $user_id; } } From 89a6cb2886dfd4659e6db67e27e42c4df763f723 Mon Sep 17 00:00:00 2001 From: rxu Date: Sat, 10 Mar 2012 00:17:39 +0800 Subject: [PATCH 05/30] [ticket/10684] Refactor $sql_ignore_users array update PHPBB3-10684 --- phpBB/includes/functions_posting.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index c9b4267c35..af26d8ed0f 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1214,21 +1214,15 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id 'method' => $row['user_notify_type'], 'allowed' => false ); + + // Add users who have been already notified to ignore list + $sql_ignore_users[$row['user_id']] = $row['user_id']; } $db->sql_freeresult($result); // forum notification is sent to those not already receiving topic notifications if ($topic_notification) { - // Add users who have been already notified to ignore list - if (sizeof($notify_rows)) - { - foreach ($notify_rows as $user_id => $row) - { - $sql_ignore_users[$user_id] = $user_id; - } - } - $sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u WHERE fw.forum_id = $forum_id @@ -1272,7 +1266,6 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id } } - // Now, we have to do a little step before really sending, we need to distinguish our users a little bit. ;) $msg_users = $delete_ids = $update_notification = array(); foreach ($notify_rows as $user_id => $row) From a79b3490c2b21d283d7bc1f15c4923180e0f10b2 Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 11 Mar 2012 00:56:07 +0800 Subject: [PATCH 06/30] [ticket/10684] Cast user_id to integer PHPBB3-10684 --- phpBB/includes/functions_posting.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index af26d8ed0f..073ce1ff4e 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1203,8 +1203,9 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id while ($row = $db->sql_fetchrow($result)) { - $notify_rows[$row['user_id']] = array( - 'user_id' => $row['user_id'], + $notify_user_id = (int) $row['user_id']; + $notify_rows[$notify_user_id] = array( + 'user_id' => $notify_user_id, 'username' => $row['username'], 'user_email' => $row['user_email'], 'user_jabber' => $row['user_jabber'], @@ -1216,7 +1217,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id ); // Add users who have been already notified to ignore list - $sql_ignore_users[$row['user_id']] = $row['user_id']; + $sql_ignore_users[$notify_user_id] = $notify_user_id; } $db->sql_freeresult($result); @@ -1234,8 +1235,9 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id while ($row = $db->sql_fetchrow($result)) { - $notify_rows[$row['user_id']] = array( - 'user_id' => $row['user_id'], + $notify_user_id = (int) $row['user_id']; + $notify_rows[$notify_user_id] = array( + 'user_id' => $notify_user_id, 'username' => $row['username'], 'user_email' => $row['user_email'], 'user_jabber' => $row['user_jabber'], From 24f1896b3c1591fd73eedd014dc6ebb214804f4d Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Sun, 11 Mar 2012 09:42:56 +0000 Subject: [PATCH 07/30] [ticket/10697] Updating gitignore to match develop branch PHPBB3-10697 --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7d789c59a1..d875beb784 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ *~ /phpunit.xml +/phpBB/cache/*.html /phpBB/cache/*.php /phpBB/cache/queue.php.lock /phpBB/config.php +/phpBB/ext/* /phpBB/files/* /phpBB/images/avatars/gallery/* /phpBB/images/avatars/upload/* From 321d0d9b56011e049b245b6d54975b6c67b3b15b Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 12 Mar 2012 01:44:00 +0800 Subject: [PATCH 08/30] [ticket/10684] Adjust pm_notifications() to handle stale bans - Add parameter (array) to the function phpbb_get_banned_users_ids() - Fix function pm_notification() to handle users with stale bans PHPBB3-10684 --- phpBB/includes/functions_privmsgs.php | 17 ++++++----------- phpBB/includes/functions_user.php | 14 +++++++++----- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index c40ceb088f..8303fc3754 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1622,6 +1622,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i $subject = censor_text($subject); + // Exclude guests, current user and banned users from notifications unset($recipients[ANONYMOUS], $recipients[$user->data['user_id']]); if (!sizeof($recipients)) @@ -1629,18 +1630,12 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i return; } - // Get banned User ID's - $sql = 'SELECT ban_userid - FROM ' . BANLIST_TABLE . ' - WHERE ' . $db->sql_in_set('ban_userid', array_map('intval', array_keys($recipients))) . ' - AND ban_exclude = 0'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) + if (!function_exists('phpbb_get_banned_users_ids')) { - unset($recipients[$row['ban_userid']]); + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } - $db->sql_freeresult($result); + $banned_users = phpbb_get_banned_users_ids(array_keys($recipients)); + $recipients = array_diff(array_map('intval', array_keys($recipients)), $banned_users); if (!sizeof($recipients)) { @@ -1649,7 +1644,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i $sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber FROM ' . USERS_TABLE . ' - WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($recipients))); + WHERE ' . $db->sql_in_set('user_id', $recipients); $result = $db->sql_query($sql); $msg_list_ary = array(); diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index dec8d09082..8f40401f0b 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -3588,22 +3588,26 @@ function remove_newly_registered($user_id, $user_data = false) } /** -* Get a list of banned users' ids, ignoring stale bans which were not wiped yet. +* Get a list of banned users' ids, ignoring stale bans which were not cleaned yet. * +* @param array $users_ids_array Array of users' ids to check for banning, +* leave empty to get complete list of banned ids * @return array Array of banned users' ids if any, empty array otherwise */ -function phpbb_get_banned_users_ids() +function phpbb_get_banned_users_ids($users_ids_array = array()) { global $db; + $sql_users_ids = (!empty($users_ids_array)) ? $db->sql_in_set('ban_userid', $users_ids_array) : 'ban_userid <> 0'; + // Get banned User ID's // Ignore stale bans which were not wiped yet $banned_ids_list = array(); $sql = 'SELECT ban_userid - FROM ' . BANLIST_TABLE . ' - WHERE ban_userid <> 0 + FROM ' . BANLIST_TABLE . " + WHERE $sql_users_ids AND ban_exclude <> 1 - AND (ban_end > ' . time() . ' + AND (ban_end > " . time() . ' OR ban_end = 0)'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) From da395edbca3e25d1758a6b8c26d14c2e48f112d9 Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 12 Mar 2012 01:47:28 +0800 Subject: [PATCH 09/30] [ticket/10684] Remove intval mapping for array keys PHP manual for arrays http://php.net/manual/en/language.types.array.php states that the following key cast will occur: Strings containing valid integers will be cast to the integer type. E.g. the key "8" will actually be stored under 8. Thus, no intval mapping for numeric array keys is needed. PHPBB3-10684 --- phpBB/includes/functions_privmsgs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 8303fc3754..4ea8f74153 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1635,7 +1635,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } $banned_users = phpbb_get_banned_users_ids(array_keys($recipients)); - $recipients = array_diff(array_map('intval', array_keys($recipients)), $banned_users); + $recipients = array_diff(array_keys($recipients), $banned_users); if (!sizeof($recipients)) { From ff8d5237688beee9ea36848e1ac49565e538c2cd Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 12 Mar 2012 01:57:51 +0800 Subject: [PATCH 10/30] [ticket/10684] Rename function phpbb_get_banned_users_ids() parameter PHPBB3-10684 --- phpBB/includes/functions_user.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 8f40401f0b..8c42a5bb42 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -3590,15 +3590,15 @@ function remove_newly_registered($user_id, $user_data = false) /** * Get a list of banned users' ids, ignoring stale bans which were not cleaned yet. * -* @param array $users_ids_array Array of users' ids to check for banning, -* leave empty to get complete list of banned ids +* @param array $users_ids Array of users' ids to check for banning, +* leave empty to get complete list of banned ids * @return array Array of banned users' ids if any, empty array otherwise */ -function phpbb_get_banned_users_ids($users_ids_array = array()) +function phpbb_get_banned_users_ids($users_ids = array()) { global $db; - $sql_users_ids = (!empty($users_ids_array)) ? $db->sql_in_set('ban_userid', $users_ids_array) : 'ban_userid <> 0'; + $sql_users_ids = (!empty($users_ids)) ? $db->sql_in_set('ban_userid', $users_ids) : 'ban_userid <> 0'; // Get banned User ID's // Ignore stale bans which were not wiped yet From 3b7a6a3eface3389b48358206fff3cb22615dc30 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 12 Mar 2012 00:39:12 +0100 Subject: [PATCH 11/30] [ticket/10689] Fix "First character"-option in "Find a member"-search PHPBB3-10689 --- phpBB/memberlist.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index b3c0bae16a..2a2ee407a0 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1346,6 +1346,7 @@ switch ($mode) if ($mode) { $params[] = "mode=$mode"; + $u_first_char_params[] = "mode=$mode"; } $sort_params[] = "mode=$mode"; From 33dce916e2ed58f1823f3b3fc1b2d72ae3c6686a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 14 Mar 2012 22:22:22 +0100 Subject: [PATCH 12/30] [ticket/10690] Fix undefined UNAPPROVED_POSTS_ZERO_TOTAL in queue PHPBB3-10690 --- phpBB/language/en/mcp.php | 1 + phpBB/styles/prosilver/template/mcp_queue.html | 2 +- phpBB/styles/subsilver2/template/mcp_queue.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index 664365b1ec..bd25d403ab 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -238,6 +238,7 @@ $lang = array_merge($lang, array( 'NO_POST' => 'You have to select a post in order to warn the user for a post.', 'NO_POST_REPORT' => 'This post was not reported.', 'NO_POST_SELECTED' => 'You must select at least one post to perform this action.', + 'NO_POSTS_QUEUE' => 'There are no posts waiting for approval.', 'NO_REASON_DISAPPROVAL' => 'Please give an appropriate reason for disapproval.', 'NO_REPORT' => 'No report found', 'NO_REPORTS' => 'No reports found', diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html index 5f16ebe7d0..f86678ebe4 100644 --- a/phpBB/styles/prosilver/template/mcp_queue.html +++ b/phpBB/styles/prosilver/template/mcp_queue.html @@ -78,7 +78,7 @@ -

{L_NO_TOPICS_QUEUE}{L_UNAPPROVED_POSTS_ZERO_TOTAL}

+

{L_NO_TOPICS_QUEUE}{L_NO_POSTS_QUEUE}

diff --git a/phpBB/styles/subsilver2/template/mcp_queue.html b/phpBB/styles/subsilver2/template/mcp_queue.html index 6e39ccd272..d13af91888 100644 --- a/phpBB/styles/subsilver2/template/mcp_queue.html +++ b/phpBB/styles/subsilver2/template/mcp_queue.html @@ -27,7 +27,7 @@ - {L_NO_TOPICS_QUEUE}{L_UNAPPROVED_POSTS_ZERO_TOTAL} + {L_NO_TOPICS_QUEUE}{L_NO_POSTS_QUEUE} From 71afba0dedd2fcc4e478e191acc23277df8209c9 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 15 Mar 2012 22:46:06 -0400 Subject: [PATCH 13/30] [task/php54] Refactor error_reporting call slightly. Separate error level assignment into a variable in this commit so that the only difference between Olympus and Ascraeus is the addition of logic altering $level. PHPBB3-10615 --- phpBB/includes/startup.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php index bbe2f127f1..178fb30435 100644 --- a/phpBB/includes/startup.php +++ b/phpBB/includes/startup.php @@ -19,7 +19,8 @@ if (!defined('E_DEPRECATED')) { define('E_DEPRECATED', 8192); } -error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); +$level = E_ALL & ~E_NOTICE & ~E_DEPRECATED; +error_reporting($level); /* * Remove variables created by register_globals from the global scope From 5efdbfa5e4e3c00c08167cdfff912ee4937f4fd2 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 15 Mar 2012 22:47:42 -0400 Subject: [PATCH 14/30] [task/php54] Disable E_STRICT in Olympus when running on PHP 5.4. We cannot use static in Olympus because it must be PHP 4 compatible. Therefore disable E_STRICT for Olympus. This commit should be reverted for Ascraeus. PHPBB3-10615 --- phpBB/includes/startup.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/phpBB/includes/startup.php b/phpBB/includes/startup.php index 178fb30435..cf216a65db 100644 --- a/phpBB/includes/startup.php +++ b/phpBB/includes/startup.php @@ -20,6 +20,21 @@ if (!defined('E_DEPRECATED')) define('E_DEPRECATED', 8192); } $level = E_ALL & ~E_NOTICE & ~E_DEPRECATED; +if (version_compare(PHP_VERSION, '5.4.0-dev', '>=')) +{ + // PHP 5.4 adds E_STRICT to E_ALL. + // Our utf8 normalizer triggers E_STRICT output on PHP 5.4. + // Unfortunately it cannot be made E_STRICT-clean while + // continuing to work on PHP 4. + // Therefore, in phpBB 3.0.x we disable E_STRICT on PHP 5.4+, + // while phpBB 3.1 will fix utf8 normalizer. + // E_STRICT is defined starting with PHP 5 + if (!defined('E_STRICT')) + { + define('E_STRICT', 2048); + } + $level &= ~E_STRICT; +} error_reporting($level); /* From ccdd176b72250be2e8f72bd13147679a5f2a263b Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Fri, 16 Mar 2012 04:56:41 -0400 Subject: [PATCH 15/30] [task/php54-ascraeus] Bring p_master#module_auth into PHP 5 era. Split module_auth into a static and a non-static version. Call the static version statically and the non-static version non-statically. PHPBB3-10615 --- phpBB/includes/acp/acp_users.php | 2 +- phpBB/includes/functions_module.php | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 97f4b1b5fd..cf6716c322 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -128,7 +128,7 @@ class acp_users $dropdown_modes = array(); while ($row = $db->sql_fetchrow($result)) { - if (!$this->p_master->module_auth($row['module_auth'])) + if (!$this->p_master->module_auth_self($row['module_auth'])) { continue; } diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index db7defdc48..1c1bc42a11 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -128,7 +128,7 @@ class p_master foreach ($this->module_cache['modules'] as $key => $row) { // Not allowed to view module? - if (!$this->module_auth($row['module_auth'])) + if (!$this->module_auth_self($row['module_auth'])) { unset($this->module_cache['modules'][$key]); continue; @@ -315,9 +315,23 @@ class p_master } /** - * Check module authorisation + * Check module authorisation. + * + * This is a non-static version that uses $this->acl_forum_id + * for the forum id. */ - function module_auth($module_auth, $forum_id = false) + function module_auth_self($module_auth) + { + return self::module_auth($module_auth, $this->acl_forum_id); + } + + /** + * Check module authorisation. + * + * This is a static version, it must be given $forum_id. + * See also module_auth_self. + */ + static function module_auth($module_auth, $forum_id) { global $auth, $config; global $request; @@ -365,8 +379,6 @@ class p_master // Make sure $id seperation is working fine $module_auth = str_replace(' , ', ',', $module_auth); - $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id; - $is_auth = false; eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z0-9_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z0-9_]+)#', '#cfg_([a-z0-9_]+)#', '#request_([a-zA-Z0-9_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']', '$request->variable(\'\\1\', false)'), $module_auth) . ');'); From c551b46115c889ac955649fe5513fb1d39d9979e Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Mon, 19 Mar 2012 17:11:30 +0530 Subject: [PATCH 16/30] [ticket/10691] Fixed the speed of creating search index $time is now initialized after each batch iteration. Speed for each batch iteration of creating search index is fixed. PHPBB3-10691 --- phpBB/develop/create_search_index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/develop/create_search_index.php b/phpBB/develop/create_search_index.php index 28001035f6..c1a7125d61 100644 --- a/phpBB/develop/create_search_index.php +++ b/phpBB/develop/create_search_index.php @@ -36,7 +36,6 @@ $search_errors = array(); $search = new $class_name($search_errors); $batch_size = isset($argv[2]) ? $argv[2] : 2000; -$time = time(); if (method_exists($search, 'create_index')) { @@ -68,6 +67,7 @@ else while ($post_counter <= $max_post_id) { $row_count = 0; + $time = time(); printf("Processing posts with %d <= post_id <= %d\n", $post_counter + 1, From 2005c339ff26bf189fb818f0e25d6c0954b9702a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 20 Mar 2012 17:45:08 +0100 Subject: [PATCH 17/30] =?UTF-8?q?[ticket/10717]=20Fix=20profile=20field=20?= =?UTF-8?q?sample=20in=20prosilver=C2=B4s=20memberlist=5Fview.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PHPBB3-10717 --- phpBB/styles/prosilver/template/memberlist_view.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index cfec07cff0..2758a7e6cc 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -69,7 +69,7 @@
{L_JABBER}:
{L_SEND_JABBER_MESSAGE}
{L_JABBER}:
{USER_JABBER}
-
{postrow.PROFILE_FIELD1_NAME}:
{postrow.PROFILE_FIELD1_VALUE}
+
{PROFILE_FIELD1_NAME}:
{PROFILE_FIELD1_VALUE}
From 92f771eb82b64bb35e0cd42534ddd0306a6aef68 Mon Sep 17 00:00:00 2001 From: Dhruv Goel Date: Thu, 22 Mar 2012 03:10:14 +0530 Subject: [PATCH 18/30] [ticket/10704] minor typo in a comment Make sure $id separation is working fine PHPBB3-10704 --- phpBB/includes/functions_module.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index db7defdc48..ae4f0f238e 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -362,7 +362,7 @@ class p_master $module_auth = implode(' ', $tokens); - // Make sure $id seperation is working fine + // Make sure $id separation is working fine $module_auth = str_replace(' , ', ',', $module_auth); $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id; From 4dafcc2525fa72f2bd91760fae49e51ff9d1a0ef Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Wed, 21 Mar 2012 22:57:29 +0000 Subject: [PATCH 19/30] [task/travis] Adding Travis Continuous Intergration Support PHPBB3-10718 --- .travis.yml | 33 +++++++++++++++++++++++++++++++++ travis/mysql.travis.xml | 28 ++++++++++++++++++++++++++++ travis/postgres.travis.xml | 30 ++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 .travis.yml create mode 100644 travis/mysql.travis.xml create mode 100644 travis/postgres.travis.xml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..e091954e0e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,33 @@ +language: php +php: + - 5.2 + - 5.3 + - 5.4 + +env: + - DB=mysql + - DB=postgres + +before_script: + - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi" + - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi" + - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3' ]; then pyrus install --force phpunit/DbUnit; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.4' ]; then pyrus install --force phpunit/DbUnit; fi" + - phpenv rehash + +script: + - phpunit --configuration travis/$DB.travis.xml + +notifications: + email: + recipients: + - m@michaelcullum.com + on_success: never + on_failure: always + +branches: + only: + develop + task/travis diff --git a/travis/mysql.travis.xml b/travis/mysql.travis.xml new file mode 100644 index 0000000000..a849f50136 --- /dev/null +++ b/travis/mysql.travis.xml @@ -0,0 +1,28 @@ + + + + + ../tests/ + + + + + + + + + + + + + diff --git a/travis/postgres.travis.xml b/travis/postgres.travis.xml new file mode 100644 index 0000000000..e44696a335 --- /dev/null +++ b/travis/postgres.travis.xml @@ -0,0 +1,30 @@ + + + + + ../tests/ + + + + + + + + + + + + + + + From 9120c7691e28ca298eb83ebbe12a82c2723cfeee Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Wed, 21 Mar 2012 23:25:50 +0000 Subject: [PATCH 20/30] [task/travis] Removing development information PHPBB3-10718 --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e091954e0e..8e870ca9c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,11 +23,12 @@ script: notifications: email: recipients: - - m@michaelcullum.com + - dev-team@phpbb.com on_success: never - on_failure: always + on_failure: change branches: only: develop + develop-olympus task/travis From 4325bbf4c601332614f456df969983d85829e931 Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Wed, 21 Mar 2012 23:30:56 +0000 Subject: [PATCH 21/30] [task/travis] Add automated testing to readme PHPBB3-10718 --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 6b94f898a3..f7dfc4926e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,12 @@ Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the dev 3. [Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git) 4. Send us a pull request +## AUTOMATED TESTING + +We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below. +Develop - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop)](http://travis-ci.org/phpbb/phpbb3) +Develop-Olympus - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb3) + ## LICENSE [GNU General Public License v2](http://opensource.org/licenses/gpl-2.0.php) From 5a9dd1994fc20aaebe3145540b630826d7333998 Mon Sep 17 00:00:00 2001 From: rxu Date: Thu, 22 Mar 2012 21:19:01 +0800 Subject: [PATCH 22/30] [ticket/10684] Adjust function and parameter name, minor changes. PHPBB3-10684 --- phpBB/includes/functions_posting.php | 4 ++-- phpBB/includes/functions_privmsgs.php | 4 ++-- phpBB/includes/functions_user.php | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 073ce1ff4e..7f45b2da8c 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1181,11 +1181,11 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id $topic_title = censor_text($topic_title); // Exclude guests, current user and banned users from notifications - if (!function_exists('phpbb_get_banned_users_ids')) + if (!function_exists('phpbb_get_banned_user_ids')) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } - $sql_ignore_users = phpbb_get_banned_users_ids(); + $sql_ignore_users = phpbb_get_banned_user_ids(); $sql_ignore_users[ANONYMOUS] = ANONYMOUS; $sql_ignore_users[$user->data['user_id']] = $user->data['user_id']; diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 4ea8f74153..447920cfd5 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1630,11 +1630,11 @@ function pm_notification($mode, $author, $recipients, $subject, $message, $msg_i return; } - if (!function_exists('phpbb_get_banned_users_ids')) + if (!function_exists('phpbb_get_banned_user_ids')) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); } - $banned_users = phpbb_get_banned_users_ids(array_keys($recipients)); + $banned_users = phpbb_get_banned_user_ids(array_keys($recipients)); $recipients = array_diff(array_keys($recipients), $banned_users); if (!sizeof($recipients)) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 8c42a5bb42..10fb57ea97 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -3588,24 +3588,24 @@ function remove_newly_registered($user_id, $user_data = false) } /** -* Get a list of banned users' ids, ignoring stale bans which were not cleaned yet. +* Gets user ids of currently banned registered users. * -* @param array $users_ids Array of users' ids to check for banning, +* @param array $user_ids Array of users' ids to check for banning, * leave empty to get complete list of banned ids * @return array Array of banned users' ids if any, empty array otherwise */ -function phpbb_get_banned_users_ids($users_ids = array()) +function phpbb_get_banned_user_ids($user_ids = array()) { global $db; - $sql_users_ids = (!empty($users_ids)) ? $db->sql_in_set('ban_userid', $users_ids) : 'ban_userid <> 0'; + $sql_user_ids = (!empty($user_ids)) ? $db->sql_in_set('ban_userid', $user_ids) : 'ban_userid <> 0'; // Get banned User ID's // Ignore stale bans which were not wiped yet $banned_ids_list = array(); $sql = 'SELECT ban_userid FROM ' . BANLIST_TABLE . " - WHERE $sql_users_ids + WHERE $sql_user_ids AND ban_exclude <> 1 AND (ban_end > " . time() . ' OR ban_end = 0)'; From d1980f6ad616e800ff82299ceafc5c8c763c6570 Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Thu, 22 Mar 2012 13:32:58 +0000 Subject: [PATCH 23/30] [task/travis] Fixing some travis issues PHPBB3-10718 --- .travis.yml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e870ca9c2..bf97a20850 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ notifications: email: recipients: - dev-team@phpbb.com - on_success: never + on_success: change on_failure: change branches: diff --git a/README.md b/README.md index f7dfc4926e..51e65176c6 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the dev ## AUTOMATED TESTING We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below. -Develop - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop)](http://travis-ci.org/phpbb/phpbb3) -Develop-Olympus - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb3) +develop - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop)](http://travis-ci.org/phpbb/phpbb3) +develop-olympus - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb3) ## LICENSE From c7f65fba627680e7de81ae6c7ea9c1e0fc4359ea Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Thu, 22 Mar 2012 14:13:25 +0000 Subject: [PATCH 24/30] [task/travis] Rename travis phpunit config files PHPBB3-10718 --- .travis.yml | 2 +- travis/{mysql.travis.xml => phpunit-mysql-travis.xml} | 0 travis/{postgres.travis.xml => phpunit-postgres-travis.xml} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename travis/{mysql.travis.xml => phpunit-mysql-travis.xml} (100%) rename travis/{postgres.travis.xml => phpunit-postgres-travis.xml} (100%) diff --git a/.travis.yml b/.travis.yml index bf97a20850..d638e1cccd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_script: - phpenv rehash script: - - phpunit --configuration travis/$DB.travis.xml + - phpunit --configuration travis/phpunit-$DB-travis.xml notifications: email: diff --git a/travis/mysql.travis.xml b/travis/phpunit-mysql-travis.xml similarity index 100% rename from travis/mysql.travis.xml rename to travis/phpunit-mysql-travis.xml diff --git a/travis/postgres.travis.xml b/travis/phpunit-postgres-travis.xml similarity index 100% rename from travis/postgres.travis.xml rename to travis/phpunit-postgres-travis.xml From 115ee7f3b815567cf598178225022b2d7d7f5310 Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Thu, 22 Mar 2012 14:44:36 +0000 Subject: [PATCH 25/30] [task/travis] Some more small travis fixes PHPBB3-10718 --- .travis.yml | 6 ------ travis/phpunit-mysql-travis.xml | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d638e1cccd..78221d588c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,9 +26,3 @@ notifications: - dev-team@phpbb.com on_success: change on_failure: change - -branches: - only: - develop - develop-olympus - task/travis diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml index a849f50136..807dfbcdaa 100644 --- a/travis/phpunit-mysql-travis.xml +++ b/travis/phpunit-mysql-travis.xml @@ -8,7 +8,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="true" - strict="true" + strict="true" bootstrap="../tests/bootstrap.php"> From 4000d8051d4e7c07338d48023c4f4c82610a2ddb Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Wed, 21 Mar 2012 23:33:13 +0000 Subject: [PATCH 26/30] [task/travis] Dropping support for 5.2 in develop branch PHPBB3-10718 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 78221d588c..e2cb463911 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: php php: - - 5.2 - 5.3 - 5.4 From e034eb96b777978c4b32dad89b46a7fc6e85f52e Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Thu, 22 Mar 2012 14:56:55 +0000 Subject: [PATCH 27/30] [task/travis-develop2] Update version from 5.3 to 5.3.2 PHPBB3-10718 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e2cb463911..8c07f48372 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: php php: - - 5.3 + - 5.3.2 - 5.4 env: From 0172ced4e202e5d8dfb0086a0370007113f39c5b Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Thu, 22 Mar 2012 00:06:46 +0000 Subject: [PATCH 28/30] [ticket/10719] Revert "Skip functional tests on PHP 5.2" This reverts commit 9c861a0350ae67f06a38ee6efc890412a32751f4. PHPBB3-10719 --- phpunit.xml.all | 4 ---- phpunit.xml.dist | 4 ---- phpunit.xml.functional | 4 ---- tests/bootstrap.php | 6 +----- 4 files changed, 1 insertion(+), 17 deletions(-) diff --git a/phpunit.xml.all b/phpunit.xml.all index b835a38c20..fde3bbb1a7 100644 --- a/phpunit.xml.all +++ b/phpunit.xml.all @@ -14,10 +14,6 @@ ./tests/ - ./tests/functional - - - ./tests/functional diff --git a/phpunit.xml.dist b/phpunit.xml.dist index da31dce5e3..27dee48aac 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -14,10 +14,6 @@ ./tests/ - ./tests/functional - - - ./tests/functional diff --git a/phpunit.xml.functional b/phpunit.xml.functional index 91d569e65b..9facbcff8b 100644 --- a/phpunit.xml.functional +++ b/phpunit.xml.functional @@ -14,10 +14,6 @@ ./tests/ - ./tests/functional - - - ./tests/functional diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 302701e3b3..f103d8f15a 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -25,8 +25,4 @@ require_once 'test_framework/phpbb_test_case_helpers.php'; require_once 'test_framework/phpbb_test_case.php'; require_once 'test_framework/phpbb_database_test_case.php'; require_once 'test_framework/phpbb_database_test_connection_manager.php'; - -if (version_compare(PHP_VERSION, '5.3.0-dev', '>=')) -{ - require_once 'test_framework/phpbb_functional_test_case.php'; -} +require_once 'test_framework/phpbb_functional_test_case.php'; From 0ed66ad0e8d11c802520046b446aa5622a637df9 Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Thu, 22 Mar 2012 16:00:10 +0000 Subject: [PATCH 29/30] [task/travis] Exclude functional and slow tests PHPBB3-10718 --- travis/phpunit-mysql-travis.xml | 6 ++++++ travis/phpunit-postgres-travis.xml | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml index 807dfbcdaa..79215c8de1 100644 --- a/travis/phpunit-mysql-travis.xml +++ b/travis/phpunit-mysql-travis.xml @@ -16,6 +16,12 @@ + + + slow + + + diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml index e44696a335..02db76ae78 100644 --- a/travis/phpunit-postgres-travis.xml +++ b/travis/phpunit-postgres-travis.xml @@ -16,6 +16,12 @@ + + + slow + + + From 841d11c6cd90d331c2923ba7851dd5f813203ddf Mon Sep 17 00:00:00 2001 From: Michael Cullum Date: Thu, 22 Mar 2012 16:09:58 +0000 Subject: [PATCH 30/30] [task/travis] Refactor php version check for dbunit install PHPBB3-10718 --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 78221d588c..d73bbd2a48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,7 @@ before_script: - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi" - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3' ]; then pyrus install --force phpunit/DbUnit; fi" - - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.4' ]; then pyrus install --force phpunit/DbUnit; fi" + - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; else pyrus install --force phpunit/DbUnit; fi" - phpenv rehash script: