You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(193) |
Nov
(393) |
Dec
(347) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(401) |
Feb
(232) |
Mar
(343) |
Apr
(129) |
May
(129) |
Jun
(116) |
Jul
(189) |
Aug
(129) |
Sep
(68) |
Oct
(172) |
Nov
(298) |
Dec
(148) |
2003 |
Jan
(264) |
Feb
(210) |
Mar
(322) |
Apr
(309) |
May
(234) |
Jun
(188) |
Jul
(215) |
Aug
(161) |
Sep
(234) |
Oct
(163) |
Nov
(110) |
Dec
(7) |
2004 |
Jan
(95) |
Feb
(107) |
Mar
(55) |
Apr
(3) |
May
(49) |
Jun
(35) |
Jul
(57) |
Aug
(43) |
Sep
(56) |
Oct
(40) |
Nov
(25) |
Dec
(21) |
2005 |
Jan
(93) |
Feb
(25) |
Mar
(22) |
Apr
(72) |
May
(45) |
Jun
(24) |
Jul
(29) |
Aug
(20) |
Sep
(50) |
Oct
(93) |
Nov
(69) |
Dec
(183) |
2006 |
Jan
(185) |
Feb
(143) |
Mar
(402) |
Apr
(260) |
May
(322) |
Jun
(367) |
Jul
(234) |
Aug
(299) |
Sep
(206) |
Oct
(288) |
Nov
(338) |
Dec
(307) |
2007 |
Jan
(296) |
Feb
(250) |
Mar
(261) |
Apr
(434) |
May
(539) |
Jun
(274) |
Jul
(440) |
Aug
(190) |
Sep
(128) |
Oct
(249) |
Nov
(86) |
Dec
(51) |
2008 |
Jan
(177) |
Feb
(67) |
Mar
(61) |
Apr
(48) |
May
(56) |
Jun
(97) |
Jul
(60) |
Aug
(64) |
Sep
(151) |
Oct
(79) |
Nov
(109) |
Dec
(123) |
2009 |
Jan
(70) |
Feb
(70) |
Mar
(73) |
Apr
(80) |
May
(22) |
Jun
(193) |
Jul
(191) |
Aug
(181) |
Sep
(120) |
Oct
(48) |
Nov
(24) |
Dec
|
From: Meik S. <acy...@ph...> - 2009-09-20 18:51:24
|
Author: acydburn Date: Sun Sep 20 19:50:35 2009 New Revision: 10172 Log: remove unnecessary query parts... thanks to asinshesq for pointing it out. Modified: branches/phpBB-3_0_0/phpBB/includes/functions.php Modified: branches/phpBB-3_0_0/phpBB/includes/functions.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions.php Sun Sep 20 19:50:35 2009 *************** *** 1693,1703 **** 'LEFT_JOIN' => array( array( 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'), ! 'ON' => "tt.user_id = $user_id AND t.topic_id = tt.topic_id AND tt.mark_time > $last_mark", ), array( 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'), ! 'ON' => "ft.user_id = $user_id AND t.forum_id = ft.forum_id AND ft.mark_time > $last_mark", ), ), --- 1693,1703 ---- 'LEFT_JOIN' => array( array( 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'), ! 'ON' => "tt.user_id = $user_id AND t.topic_id = tt.topic_id", ), array( 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'), ! 'ON' => "ft.user_id = $user_id AND t.forum_id = ft.forum_id", ), ), *************** *** 1705,1714 **** ( (tt.mark_time IS NOT NULL AND t.topic_last_post_time > tt.mark_time) OR (tt.mark_time IS NULL AND ft.mark_time IS NOT NULL AND t.topic_last_post_time > ft.mark_time) OR ! ( ! ((tt.mark_time IS NULL AND ft.mark_time IS NULL) OR (tt.mark_time < $last_mark AND ft.mark_time < $last_mark)) ! AND t.topic_last_post_time > $last_mark ! ) ) $sql_extra $sql_sort", --- 1705,1711 ---- ( (tt.mark_time IS NOT NULL AND t.topic_last_post_time > tt.mark_time) OR (tt.mark_time IS NULL AND ft.mark_time IS NOT NULL AND t.topic_last_post_time > ft.mark_time) OR ! (tt.mark_time IS NULL AND ft.mark_time IS NULL AND t.topic_last_post_time > $last_mark) ) $sql_extra $sql_sort", |
From: Meik S. <acy...@ph...> - 2009-09-20 17:52:26
|
Author: acydburn Date: Sun Sep 20 18:52:06 2009 New Revision: 10171 Log: forgot to add display active flag to forum data in r10169 for bug #19135 Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_forums.php Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_forums.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/acp/acp_forums.php (original) --- branches/phpBB-3_0_0/phpBB/includes/acp/acp_forums.php Sun Sep 20 18:52:06 2009 *************** *** 443,449 **** 'prune_days' => 7, 'prune_viewed' => 7, 'prune_freq' => 1, ! 'forum_flags' => FORUM_FLAG_POST_REVIEW, 'forum_options' => 0, 'forum_password' => '', 'forum_password_confirm'=> '', --- 443,449 ---- 'prune_days' => 7, 'prune_viewed' => 7, 'prune_freq' => 1, ! 'forum_flags' => FORUM_FLAG_POST_REVIEW + FORUM_FLAG_ACTIVE_TOPICS, 'forum_options' => 0, 'forum_password' => '', 'forum_password_confirm'=> '', |
From: Meik S. <acy...@ph...> - 2009-09-20 17:09:06
|
Author: acydburn Date: Sun Sep 20 18:08:16 2009 New Revision: 10170 Log: note correct username if post/topic get's removed if user is anonymous Modified: branches/phpBB-3_0_0/phpBB/posting.php Modified: branches/phpBB-3_0_0/phpBB/posting.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/posting.php (original) --- branches/phpBB-3_0_0/phpBB/posting.php Sun Sep 20 18:08:16 2009 *************** *** 1569,1585 **** ); $next_post_id = delete_post($forum_id, $topic_id, $post_id, $data); if ($next_post_id === false) { ! add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_data['username']); $meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id"); $message = $user->lang['POST_DELETED']; } else { ! add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_data['username']); $meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=$next_post_id") . "#p$next_post_id"; $message = $user->lang['POST_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>'); --- 1569,1586 ---- ); $next_post_id = delete_post($forum_id, $topic_id, $post_id, $data); + $post_username = ($post_data['poster_id'] == ANONYMOUS && !empty($post_data['post_username'])) ? $post_data['post_username'] : $post_data['username']; if ($next_post_id === false) { ! add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_username); $meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id"); $message = $user->lang['POST_DELETED']; } else { ! add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_username); $meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=$next_post_id") . "#p$next_post_id"; $message = $user->lang['POST_DELETED'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>'); |
From: Meik S. <acy...@ph...> - 2009-09-20 16:46:45
|
Author: acydburn Date: Sun Sep 20 17:46:31 2009 New Revision: 10169 Log: set "display active topics" to true by default for new forum creation... regression/addition from/to bug #19135 Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_forums.php Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_forums.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/acp/acp_forums.php (original) --- branches/phpBB-3_0_0/phpBB/includes/acp/acp_forums.php Sun Sep 20 17:46:31 2009 *************** *** 171,177 **** $forum_data['forum_status'] = ITEM_UNLOCKED; } ! $forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', false) : request_var('display_active', false); // Get data for forum rules if specified... if ($forum_data['forum_rules']) --- 171,177 ---- $forum_data['forum_status'] = ITEM_UNLOCKED; } ! $forum_data['show_active'] = ($forum_data['forum_type'] == FORUM_POST) ? request_var('display_recent', true) : request_var('display_active', true); // Get data for forum rules if specified... if ($forum_data['forum_rules']) |
From: Meik S. <acy...@ph...> - 2009-09-20 16:20:37
|
Author: acydburn Date: Sun Sep 20 17:20:20 2009 New Revision: 10168 Log: improve code to detect and solve conflicts for code removed from one version to another. Modified: branches/phpBB-3_0_0/phpBB/includes/diff/diff.php Modified: branches/phpBB-3_0_0/phpBB/includes/diff/diff.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/diff/diff.php (original) --- branches/phpBB-3_0_0/phpBB/includes/diff/diff.php Sun Sep 20 17:20:20 2009 *************** *** 997,1026 **** // CASE THREE: Removed lines (orig has the to-remove line(s), but final1 has additional lines which does not need to be removed). Just remove orig from final1 and then use final1 as final2/merge if (!sizeof($this->final2) && sizeof($this->orig) && sizeof($this->final1) && $this->orig !== $this->final1) { // First of all, try to find the code in orig in final1. ;) $compare_seq = sizeof($this->orig); ! $begin = -1; ! $j = $end = 0; ! foreach ($this->final1 as $i => $line) { if (trim($line) === trim($this->orig[$j])) { if ($begin === -1) { $begin = $i; } if (isset($this->orig[$j+1])) { $j++; } } - - if ($begin !== -1) - { - $end++; - } } if ($begin !== -1 && $begin + ($compare_seq - 1) == $end) --- 997,1034 ---- // CASE THREE: Removed lines (orig has the to-remove line(s), but final1 has additional lines which does not need to be removed). Just remove orig from final1 and then use final1 as final2/merge if (!sizeof($this->final2) && sizeof($this->orig) && sizeof($this->final1) && $this->orig !== $this->final1) { + $result = $this->_compare_conflict_seq('orig', 'final1'); + + if (!$result['merge_found']) + { + return; + } + // First of all, try to find the code in orig in final1. ;) $compare_seq = sizeof($this->orig); ! $begin = $end = -1; ! $j = 0; ! for ($i = 0, $size = sizeof($this->final1); $i < $size; $i++) { + $line = $this->final1[$i]; + if (trim($line) === trim($this->orig[$j])) { + // Mark begin if ($begin === -1) { $begin = $i; } + // End is always $i, the last found line + $end = $i; + if (isset($this->orig[$j+1])) { $j++; } } } if ($begin !== -1 && $begin + ($compare_seq - 1) == $end) |
From: Meik S. <acy...@ph...> - 2009-09-20 16:19:29
|
Author: acydburn Date: Sun Sep 20 17:18:41 2009 New Revision: 10167 Log: if preserve_cr is true and the file generated no conflict but is obviously not "empty" we tag it as modified because preserve_cr is the default mode for showing modifications (else the user gets a resolvable conflict and may wonder why ;)) Modified: branches/phpBB-3_0_0/phpBB/install/install_update.php Modified: branches/phpBB-3_0_0/phpBB/install/install_update.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/install_update.php (original) --- branches/phpBB-3_0_0/phpBB/install/install_update.php Sun Sep 20 17:18:41 2009 *************** *** 1469,1474 **** --- 1469,1481 ---- $update_list['up_to_date'][] = $update_ary; return; } + + // If we preserve cr tag it as modified because the conflict would not show in this mode anyway + if ($preserve_cr) + { + $update_list['modified'][] = $update_ary; + return; + } } else { |
From: Meik S. <acy...@ph...> - 2009-09-20 12:38:49
|
Author: acydburn Date: Sun Sep 20 13:32:27 2009 New Revision: 10166 Log: although we do not use force_approved_state check it nevertheless for the message displayed to the user - bug #51325 Modified: branches/phpBB-3_0_0/phpBB/posting.php Modified: branches/phpBB-3_0_0/phpBB/posting.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/posting.php (original) --- branches/phpBB-3_0_0/phpBB/posting.php Sun Sep 20 13:32:27 2009 *************** *** 1121,1133 **** // The last parameter tells submit_post if search indexer has to be run $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false); - if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === true) && ($mode == 'post' || $mode == 'reply' || $mode == 'quote')) { $captcha->reset(); } // Check the permissions for post approval. Moderators are not affected. ! if (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) { meta_refresh(10, $redirect_url); $message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD']; --- 1121,1133 ---- // The last parameter tells submit_post if search indexer has to be run $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false); if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === true) && ($mode == 'post' || $mode == 'reply' || $mode == 'quote')) { $captcha->reset(); } + // Check the permissions for post approval. Moderators are not affected. ! if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) || !empty($post_data['force_approved_state'])) { meta_refresh(10, $redirect_url); $message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD']; |
From: Joas S. <nic...@ph...> - 2009-09-19 12:58:46
|
Author: nickvergessen Date: Sat Sep 19 13:21:39 2009 New Revision: 10165 Log: Fix Bug #51655 - Missing global vars phpbb_root_path & phpEx Authorised by: AcydBurn Modified: branches/phpBB-3_0_0/phpBB/includes/functions_privmsgs.php Modified: branches/phpBB-3_0_0/phpBB/includes/functions_privmsgs.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions_privmsgs.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions_privmsgs.php Sat Sep 19 13:21:39 2009 *************** *** 1900,1906 **** */ function get_recipient_strings($pm_by_id) { ! global $user, $db; $address_list = $recipient_list = $address = array(); --- 1900,1906 ---- */ function get_recipient_strings($pm_by_id) { ! global $db, $phpbb_root_path, $phpEx, $user; $address_list = $recipient_list = $address = array(); |
From: Meik S. <acy...@ph...> - 2009-09-19 10:47:07
|
Author: acydburn Date: Sat Sep 19 11:46:19 2009 New Revision: 10164 Log: use existing language key for "private message not found" Modified: branches/phpBB-3_0_0/phpBB/report.php Modified: branches/phpBB-3_0_0/phpBB/report.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/report.php (original) --- branches/phpBB-3_0_0/phpBB/report.php Sat Sep 19 11:46:19 2009 *************** *** 118,124 **** if (!$report_data) { ! trigger_error('PM_NOT_EXIST'); } if ($report_data['message_reported']) --- 118,125 ---- if (!$report_data) { ! $user->add_lang('ucp'); ! trigger_error('NO_MESSAGE'); } if ($report_data['message_reported']) |
From: Meik S. <acy...@ph...> - 2009-09-18 18:19:43
|
Author: acydburn Date: Fri Sep 18 19:18:54 2009 New Revision: 10163 Log: Ok, after 20+ hours i think i fixed all grave issues with the updater - smaller memory footprint - better checks for already updated files - even less conflicts - fixed automatic conflict resolving after successful merges - no more conflicts for $Id$ changes - fixed skip_whitespace_changes bug where code blocks were added to diff_op_add whereby the previous or next diff_op_copy already had the change - correctly display merged files in diff view (previously it happened that the old file was used for comparision, although the new file was different/newer/merged) Modified: branches/phpBB-3_0_0/phpBB/includes/diff/diff.php branches/phpBB-3_0_0/phpBB/includes/diff/engine.php branches/phpBB-3_0_0/phpBB/install/install_update.php Modified: branches/phpBB-3_0_0/phpBB/includes/diff/diff.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/diff/diff.php (original) --- branches/phpBB-3_0_0/phpBB/includes/diff/diff.php Fri Sep 18 19:18:54 2009 *************** *** 71,78 **** { $count = 0; ! foreach ($this->_edits as $edit) { if (is_a($edit, 'diff_op_add') || is_a($edit, 'diff_op_change')) { $count += $edit->nfinal(); --- 71,80 ---- { $count = 0; ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if (is_a($edit, 'diff_op_add') || is_a($edit, 'diff_op_change')) { $count += $edit->nfinal(); *************** *** 92,99 **** { $count = 0; ! foreach ($this->_edits as $edit) { if (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_change')) { $count += $edit->norig(); --- 94,103 ---- { $count = 0; ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_change')) { $count += $edit->norig(); *************** *** 128,135 **** $rev->_edits = array(); ! foreach ($this->_edits as $edit) { $rev->_edits[] = $edit->reverse(); } --- 132,140 ---- $rev->_edits = array(); ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; $rev->_edits[] = $edit->reverse(); } *************** *** 143,155 **** */ function is_empty() { ! foreach ($this->_edits as $edit) { ! if (!is_a($edit, 'diff_op_copy')) { return false; } } return true; } --- 148,183 ---- */ function is_empty() { ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { ! $edit = $this->_edits[$i]; ! ! // skip diff_op_copy ! if (is_a($edit, 'diff_op_copy')) ! { ! continue; ! } ! ! if (is_a($edit, 'diff_op_delete') || is_a($edit, 'diff_op_add')) { + $orig = $edit->orig; + $final = $edit->final; + + // We can simplify one case where the array is usually supposed to be empty... + if (sizeof($orig) == 1 && trim($orig[0]) === '') $orig = array(); + if (sizeof($final) == 1 && trim($final[0]) === '') $final = array(); + + if (!$orig && !$final) + { + continue; + } + return false; } + + return false; } + return true; } *************** *** 164,171 **** { $lcs = 0; ! foreach ($this->_edits as $edit) { if (is_a($edit, 'diff_op_copy')) { $lcs += sizeof($edit->orig); --- 192,201 ---- { $lcs = 0; ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if (is_a($edit, 'diff_op_copy')) { $lcs += sizeof($edit->orig); *************** *** 185,192 **** { $lines = array(); ! foreach ($this->_edits as $edit) { if ($edit->orig) { array_splice($lines, sizeof($lines), 0, $edit->orig); --- 215,224 ---- { $lines = array(); ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if ($edit->orig) { array_splice($lines, sizeof($lines), 0, $edit->orig); *************** *** 206,213 **** { $lines = array(); ! foreach ($this->_edits as $edit) { if ($edit->final) { array_splice($lines, sizeof($lines), 0, $edit->final); --- 238,247 ---- { $lines = array(); ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if ($edit->final) { array_splice($lines, sizeof($lines), 0, $edit->final); *************** *** 258,265 **** $prevtype = null; ! foreach ($this->_edits as $edit) { if ($prevtype == get_class($edit)) { trigger_error("[diff] Edit sequence is non-optimal", E_USER_ERROR); --- 292,301 ---- $prevtype = null; ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if ($prevtype == get_class($edit)) { trigger_error("[diff] Edit sequence is non-optimal", E_USER_ERROR); *************** *** 456,469 **** * @param array $final1 The first version to compare to. * @param array $final2 The second version to compare to. */ ! function diff3(&$orig, &$final1, &$final2) { $diff_engine = new diff_engine(); ! $diff_1 = $diff_engine->diff($orig, $final1); ! $diff_2 = $diff_engine->diff($orig, $final2); ! unset($engine); $this->_edits = $this->_diff3($diff_1, $diff_2); } --- 492,505 ---- * @param array $final1 The first version to compare to. * @param array $final2 The second version to compare to. */ ! function diff3(&$orig, &$final1, &$final2, $preserve_cr = true) { $diff_engine = new diff_engine(); ! $diff_1 = $diff_engine->diff($orig, $final1, $preserve_cr); ! $diff_2 = $diff_engine->diff($orig, $final2, $preserve_cr); ! unset($diff_engine); $this->_edits = $this->_diff3($diff_1, $diff_2); } *************** *** 475,482 **** { $conflicts = 0; ! foreach ($this->_edits as $edit) { if ($edit->is_conflict()) { $conflicts++; --- 511,520 ---- { $conflicts = 0; ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if ($edit->is_conflict()) { $conflicts++; *************** *** 506,513 **** $lines = array(); ! foreach ($this->_edits as $edit) { if ($edit->is_conflict()) { // Start conflict label --- 544,553 ---- $lines = array(); ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if ($edit->is_conflict()) { // Start conflict label *************** *** 544,551 **** { $lines = array(); ! foreach ($this->_edits as $edit) { if ($edit->is_conflict()) { $lines = array_merge($lines, $edit->final2); --- 584,593 ---- { $lines = array(); ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if ($edit->is_conflict()) { $lines = array_merge($lines, $edit->final2); *************** *** 566,573 **** { $lines = array(); ! foreach ($this->_edits as $edit) { if ($edit->is_conflict()) { $lines = array_merge($lines, $edit->final1); --- 608,617 ---- { $lines = array(); ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if ($edit->is_conflict()) { $lines = array_merge($lines, $edit->final1); *************** *** 588,595 **** { $conflicts = array(); ! foreach ($this->_edits as $edit) { if ($edit->is_conflict()) { $conflicts[] = array($edit->final1, $edit->final2); --- 632,641 ---- { $conflicts = array(); ! for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++) { + $edit = $this->_edits[$i]; + if ($edit->is_conflict()) { $conflicts[] = array($edit->final1, $edit->final2); *************** *** 713,718 **** --- 759,767 ---- { if (!isset($this->_merged)) { + // Prepare the arrays before we compare them. ;) + $this->solve_prepare(); + if ($this->final1 === $this->final2) { $this->_merged = &$this->final1; *************** *** 742,747 **** --- 791,885 ---- } /** + * Function to prepare the arrays for comparing - we want to skip over newline changes + * @author acydburn + */ + function solve_prepare() + { + // We can simplify one case where the array is usually supposed to be empty... + if (sizeof($this->orig) == 1 && trim($this->orig[0]) === '') $this->orig = array(); + if (sizeof($this->final1) == 1 && trim($this->final1[0]) === '') $this->final1 = array(); + if (sizeof($this->final2) == 1 && trim($this->final2[0]) === '') $this->final2 = array(); + + // Now we only can have the case where the only difference between arrays are newlines, so compare all cases + + // First, some strings we can compare... + $orig = $final1 = $final2 = ''; + + foreach ($this->orig as $null => $line) $orig .= trim($line); + foreach ($this->final1 as $null => $line) $final1 .= trim($line); + foreach ($this->final2 as $null => $line) $final2 .= trim($line); + + // final1 === final2 + if ($final1 === $final2) + { + // We preserve the part which will be used in the merge later + $this->final2 = $this->final1; + } + // final1 === orig + else if ($final1 === $orig) + { + // Here it does not really matter what we choose, but we will use the new code + $this->orig = $this->final1; + } + // final2 === orig + else if ($final2 === $orig) + { + // Here it does not really matter too (final1 will be used), but we will use the new code + $this->orig = $this->final2; + } + } + + /** + * Find code portions from $orig in $final1 and use $final2 as merged instance if provided + * @author acydburn + */ + function _compare_conflict_seq($orig, $final1, $final2 = false) + { + $result = array('merge_found' => false, 'merge' => array()); + + $_orig = &$this->$orig; + $_final1 = &$this->$final1; + + // Ok, we basically search for $orig in $final1 + $compare_seq = sizeof($_orig); + + // Go through the conflict code + for ($i = 0, $j = 0, $size = sizeof($_final1); $i < $size; $i++, $j = $i) + { + $line = $_final1[$i]; + $skip = 0; + + for ($x = 0; $x < $compare_seq; $x++) + { + // Try to skip all matching lines + if (trim($line) === trim($_orig[$x])) + { + $line = (++$j < $size) ? $_final1[$j] : $line; + $skip++; + } + } + + if ($skip === $compare_seq) + { + $result['merge_found'] = true; + + if ($final2 !== false) + { + $result['merge'] = array_merge($result['merge'], $this->$final2); + } + $i += ($skip - 1); + } + else if ($final2 !== false) + { + $result['merge'][] = $line; + } + } + + return $result; + } + + /** * Tries to solve conflicts aggressively based on typical "assumptions" * @author acydburn */ *************** *** 753,807 **** // IF orig is found "as is" in final1 we replace the code directly in final1 and populate this as final2/merge if (sizeof($this->orig) && sizeof($this->final2)) { ! // Ok, we basically search for $this->orig in $this->final1 and replace it with $this->final2 ! $compare_seq = sizeof($this->orig); ! // Search for matching code block ! $merge = array(); ! $merge_found = false; ! // Go through the conflict code ! for ($i = 0, $j = 0, $size = sizeof($this->final1); $i < $size; $i++, $j = $i) { ! $line = $this->final1[$i]; ! $skip = 0; ! for ($x = 0; $x < $compare_seq; $x++) { ! // Try to skip all matching lines ! if (trim($line) === trim($this->orig[$x])) ! { ! $line = (++$j < $size) ? $this->final1[$j] : $line; ! $skip++; ! } } ! if ($skip === $compare_seq) { ! $merge_found = true; ! $merge = array_merge($merge, $this->final2); ! $i += ($skip - 1); } ! else { ! $merge[] = $line; } } - if ($merge_found) - { - $this->final2 = $merge; - $this->_merged = &$this->final2; - } - return; } // CASE TWO: Added lines from orig to final2 but final1 had added lines too. Just merge them. if (!sizeof($this->orig) && $this->final1 !== $this->final2 && sizeof($this->final1) && sizeof($this->final2)) { ! $this->final2 = array_merge($this->final1, $this->final2); ! $this->_merged = &$this->final2; return; } --- 891,995 ---- // IF orig is found "as is" in final1 we replace the code directly in final1 and populate this as final2/merge if (sizeof($this->orig) && sizeof($this->final2)) { ! $result = $this->_compare_conflict_seq('orig', 'final1', 'final2'); ! if ($result['merge_found']) ! { ! $this->final2 = $result['merge']; ! $this->_merged = &$this->final2; ! return; ! } ! $result = $this->_compare_conflict_seq('final2', 'final1'); ! ! if ($result['merge_found']) { ! $this->_merged = &$this->final1; ! return; ! } ! // Try to solve $Id$ issues. ;) ! if (sizeof($this->orig) == 1 && sizeof($this->final1) == 1 && sizeof($this->final2) == 1) ! { ! $match = '#^' . preg_quote('* @version $Id: ', '#') . '[a-z\._\- ]+[0-9]+ [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9\:Z]+ [a-z0-9_\- ]+\$$#'; ! ! if (preg_match($match, $this->orig[0]) && preg_match($match, $this->final1[0]) && preg_match($match, $this->final2[0])) { ! $this->_merged = &$this->final2; ! return; } + } ! $second_run = false; ! ! // Try to solve issues where the only reason why the above did not work is a newline being removed in the final1 code but exist in the orig/final2 code ! if (trim($this->orig[0]) === '' && trim($this->final2[0]) === '') ! { ! unset($this->orig[0], $this->final2[0]); ! $this->orig = array_values($this->orig); ! $this->final2 = array_values($this->final2); ! ! $second_run = true; ! } ! ! // The same is true for a line at the end. ;) ! if (sizeof($this->orig) && sizeof($this->final2) && sizeof($this->orig) === sizeof($this->final2) && trim($this->orig[sizeof($this->orig)-1]) === '' && trim($this->final2[sizeof($this->final2)-1]) === '') ! { ! unset($this->orig[sizeof($this->orig)-1], $this->final2[sizeof($this->final2)-1]); ! $this->orig = array_values($this->orig); ! $this->final2 = array_values($this->final2); ! ! $second_run = true; ! } ! ! if ($second_run) ! { ! $result = $this->_compare_conflict_seq('orig', 'final1', 'final2'); ! ! if ($result['merge_found']) { ! $this->final2 = $result['merge']; ! $this->_merged = &$this->final2; ! return; } ! ! $result = $this->_compare_conflict_seq('final2', 'final1'); ! ! if ($result['merge_found']) { ! $this->_merged = &$this->final1; ! return; } } return; } // CASE TWO: Added lines from orig to final2 but final1 had added lines too. Just merge them. if (!sizeof($this->orig) && $this->final1 !== $this->final2 && sizeof($this->final1) && sizeof($this->final2)) { ! $result = $this->_compare_conflict_seq('final2', 'final1'); ! ! if ($result['merge_found']) ! { ! $this->final2 = $this->final1; ! $this->_merged = &$this->final1; ! } ! else ! { ! $result = $this->_compare_conflict_seq('final1', 'final2'); ! ! if (!$result['merge_found']) ! { ! $this->final2 = array_merge($this->final1, $this->final2); ! $this->_merged = &$this->final2; ! } ! else ! { ! $this->final2 = $this->final1; ! $this->_merged = &$this->final1; ! } ! } return; } *************** *** 809,830 **** // CASE THREE: Removed lines (orig has the to-remove line(s), but final1 has additional lines which does not need to be removed). Just remove orig from final1 and then use final1 as final2/merge if (!sizeof($this->final2) && sizeof($this->orig) && sizeof($this->final1) && $this->orig !== $this->final1) { ! $merged = $this->final1; foreach ($this->final1 as $i => $line) { ! foreach ($this->orig as $j => $old_line) { ! if (trim($line) === trim($old_line)) { ! unset($merged[$i]); } } } ! if (sizeof($merged)) { ! $this->final2 = array_values($merged); $this->_merged = &$this->final2; } --- 997,1039 ---- // CASE THREE: Removed lines (orig has the to-remove line(s), but final1 has additional lines which does not need to be removed). Just remove orig from final1 and then use final1 as final2/merge if (!sizeof($this->final2) && sizeof($this->orig) && sizeof($this->final1) && $this->orig !== $this->final1) { ! // First of all, try to find the code in orig in final1. ;) ! $compare_seq = sizeof($this->orig); ! $begin = -1; ! $j = $end = 0; foreach ($this->final1 as $i => $line) { ! if (trim($line) === trim($this->orig[$j])) { ! if ($begin === -1) { ! $begin = $i; } + + if (isset($this->orig[$j+1])) + { + $j++; + } + } + + if ($begin !== -1) + { + $end++; } } ! if ($begin !== -1 && $begin + ($compare_seq - 1) == $end) { ! foreach ($this->final1 as $i => $line) ! { ! if ($i < $begin || $i > $end) ! { ! $merged[] = $line; ! } ! } ! ! $this->final2 = $merged; $this->_merged = &$this->final2; } Modified: branches/phpBB-3_0_0/phpBB/includes/diff/engine.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/diff/engine.php (original) --- branches/phpBB-3_0_0/phpBB/includes/diff/engine.php Fri Sep 18 19:18:54 2009 *************** *** 145,152 **** $this->_compareseq(0, sizeof($this->xv), 0, sizeof($this->yv)); // Merge edits when possible. ! $this->_shift_boundaries($from_lines, $this->xchanged, $this->ychanged); ! $this->_shift_boundaries($to_lines, $this->ychanged, $this->xchanged); // Compute the edit operations. $edits = array(); --- 145,165 ---- $this->_compareseq(0, sizeof($this->xv), 0, sizeof($this->yv)); // Merge edits when possible. ! if ($this->skip_whitespace_changes) ! { ! $from_lines_clean = array_map('trim', $from_lines); ! $to_lines_clean = array_map('trim', $to_lines); ! ! $this->_shift_boundaries($from_lines_clean, $this->xchanged, $this->ychanged); ! $this->_shift_boundaries($to_lines_clean, $this->ychanged, $this->xchanged); ! ! unset($from_lines_clean, $to_lines_clean); ! } ! else ! { ! $this->_shift_boundaries($from_lines, $this->xchanged, $this->ychanged); ! $this->_shift_boundaries($to_lines, $this->ychanged, $this->xchanged); ! } // Compute the edit operations. $edits = array(); Modified: branches/phpBB-3_0_0/phpBB/install/install_update.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/install_update.php (original) --- branches/phpBB-3_0_0/phpBB/install/install_update.php Fri Sep 18 19:18:54 2009 *************** *** 687,693 **** default: $diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename); ! $contents = implode("\n", $diff->merged_new_output()); unset($diff); break; } --- 687,693 ---- default: $diff = $this->return_diff($this->old_location . $original_filename, $phpbb_root_path . $file_struct['filename'], $this->new_location . $original_filename); ! $contents = implode("\n", $diff->merged_output()); unset($diff); break; } *************** *** 1104,1127 **** break; - /* - $diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $file, $this->new_location . $original_file); - - $tmp = array( - 'file1' => array(), - 'file2' => ($option == MERGE_NEW_FILE) ? implode("\n", $diff->merged_new_output()) : implode("\n", $diff->merged_orig_output()), - ); - - $diff = new diff($tmp['file1'], $tmp['file2']); - - unset($tmp); - - $template->assign_var('S_DIFF_NEW_FILE', true); - $diff_mode = 'inline'; - $this->page_title = 'VIEWING_FILE_CONTENTS'; - - break; - */ // Merge differences and use new phpBB code for conflicted blocks case MERGE_NEW_FILE: case MERGE_MOD_FILE: --- 1104,1109 ---- *************** *** 1175,1180 **** --- 1157,1163 ---- default: $diff = $this->return_diff($this->old_location . $original_file, $phpbb_root_path . $original_file, $this->new_location . $file); + $diff = $this->return_diff($phpbb_root_path . $file, $diff->merged_output()); break; } break; *************** *** 1362,1367 **** --- 1345,1353 ---- $update_ary['original'] = $original_file; } + // we only want to know if the files are successfully merged and newlines could result in errors (duplicate addition of lines and such things) + // Therefore we check for empty diffs with two methods, preserving newlines and not preserving them (which mostly works best, therefore the first option) + // On a successfull update the new location file exists but the old one does not exist. // Check for this circumstance, the new file need to be up-to-date with the current file then... if (!file_exists($this->old_location . $original_file) && file_exists($this->new_location . $original_file) && file_exists($phpbb_root_path . $file)) *************** *** 1401,1504 **** trigger_error($user->lang['INCOMPLETE_UPDATE_FILES'], E_USER_ERROR); } ! $tmp = array( ! 'file1' => file_get_contents($this->old_location . $original_file), ! 'file2' => file_get_contents($phpbb_root_path . $file), ! ); ! // We need to diff the contents here to make sure the file is really the one we expect ! $diff = new diff($tmp['file1'], $tmp['file2'], false); ! $empty_1 = $diff->is_empty(); ! unset($tmp, $diff); ! $tmp = array( ! 'file1' => file_get_contents($this->new_location . $original_file), ! 'file2' => file_get_contents($phpbb_root_path . $file), ! ); ! // We need to diff the contents here to make sure the file is really the one we expect ! $diff = new diff($tmp['file1'], $tmp['file2'], false); ! $empty_2 = $diff->is_empty(); ! unset($tmp, $diff); ! // If the file is not modified we are finished here... ! if ($empty_1) ! { ! // Further check if it is already up to date - it could happen that non-modified files ! // slip through if ($empty_2) { $update_list['up_to_date'][] = $update_ary; return; } - - $update_list['not_modified'][] = $update_ary; - return; } ! // If the file had been modified then we need to check if it is already up to date ! // if there are no differences we have an up-to-date file... ! if ($empty_2) { ! $update_list['up_to_date'][] = $update_ary; ! return; ! } ! // if the file is modified we try to make sure a merge succeed ! $tmp = array( ! 'file1' => file_get_contents($this->old_location . $original_file), ! 'file2' => file_get_contents($phpbb_root_path . $file), ! 'file3' => file_get_contents($this->new_location . $original_file), ! ); ! $diff = new diff3($tmp['file1'], $tmp['file2'], $tmp['file3'], false); ! unset($tmp); ! if ($diff->get_num_conflicts()) ! { ! $update_ary['conflicts'] = $diff->get_num_conflicts(); ! // There is one special case... users having merged with a conflicting file... we need to check this ! $tmp = array( ! 'file1' => file_get_contents($phpbb_root_path . $file), ! 'file2' => implode("\n", $diff->merged_orig_output()), ! ); ! $diff = new diff($tmp['file1'], $tmp['file2'], false); ! $empty = $diff->is_empty(); ! if ($empty) ! { ! unset($update_ary['conflicts']); ! unset($diff); ! $update_list['up_to_date'][] = $update_ary; ! return; ! } ! $update_list['conflict'][] = $update_ary; ! unset($diff); ! return; ! } ! $tmp = array( ! 'file1' => file_get_contents($phpbb_root_path . $file), ! 'file2' => implode("\n", $diff->merged_new_output()), ! ); ! // now compare the merged output with the original file to see if the modified file is up to date ! $diff = new diff($tmp['file1'], $tmp['file2'], false); ! $empty = $diff->is_empty(); ! if ($empty) ! { ! unset($diff); ! $update_list['up_to_date'][] = $update_ary; return; } --- 1387,1520 ---- trigger_error($user->lang['INCOMPLETE_UPDATE_FILES'], E_USER_ERROR); } ! $preserve_cr_ary = array(false, true); ! foreach ($preserve_cr_ary as $preserve_cr) ! { ! $tmp = array( ! 'file1' => file_get_contents($this->old_location . $original_file), ! 'file2' => file_get_contents($phpbb_root_path . $file), ! ); ! // We need to diff the contents here to make sure the file is really the one we expect ! $diff = new diff($tmp['file1'], $tmp['file2'], $preserve_cr); ! $empty_1 = $diff->is_empty(); ! unset($tmp, $diff); ! $tmp = array( ! 'file1' => file_get_contents($this->new_location . $original_file), ! 'file2' => file_get_contents($phpbb_root_path . $file), ! ); ! $diff = new diff($tmp['file1'], $tmp['file2'], $preserve_cr); ! $empty_2 = $diff->is_empty(); ! unset($tmp, $diff); ! ! // If the file is not modified we are finished here... ! if ($empty_1) ! { ! // Further check if it is already up to date - it could happen that non-modified files ! // slip through ! if ($empty_2) ! { ! $update_list['up_to_date'][] = $update_ary; ! return; ! } ! ! $update_list['not_modified'][] = $update_ary; ! return; ! } ! ! // If the file had been modified then we need to check if it is already up to date ! ! // if there are no differences we have an up-to-date file... if ($empty_2) { $update_list['up_to_date'][] = $update_ary; return; } } ! $conflicts = false; ! foreach ($preserve_cr_ary as $preserve_cr) { ! // if the file is modified we try to make sure a merge succeed ! $tmp = array( ! 'orig' => file_get_contents($this->old_location . $original_file), ! 'final1' => file_get_contents($phpbb_root_path . $file), ! 'final2' => file_get_contents($this->new_location . $original_file), ! ); ! $diff = new diff3($tmp['orig'], $tmp['final1'], $tmp['final2'], $preserve_cr); ! unset($tmp); ! if (!$diff->get_num_conflicts()) ! { ! $tmp = array( ! 'file1' => file_get_contents($phpbb_root_path . $file), ! 'file2' => implode("\n", $diff->merged_output()), ! ); ! // now compare the merged output with the original file to see if the modified file is up to date ! $diff2 = new diff($tmp['file1'], $tmp['file2'], $preserve_cr); ! $empty = $diff2->is_empty(); ! unset($diff, $diff2); ! if ($empty) ! { ! $update_list['up_to_date'][] = $update_ary; ! return; ! } ! } ! else ! { ! // There is one special case... users having merged with a conflicting file... we need to check this ! $tmp = array( ! 'file1' => file_get_contents($phpbb_root_path . $file), ! 'file2' => implode("\n", $diff->merged_new_output()), ! ); ! $diff2 = new diff($tmp['file1'], $tmp['file2'], $preserve_cr); ! $empty = $diff2->is_empty(); ! if (!$empty) ! { ! unset($tmp, $diff2); ! // We check if the user merged with his output ! $tmp = array( ! 'file1' => file_get_contents($phpbb_root_path . $file), ! 'file2' => implode("\n", $diff->merged_orig_output()), ! ); ! $diff2 = new diff($tmp['file1'], $tmp['file2'], $preserve_cr); ! $empty = $diff2->is_empty(); ! } ! if (!$empty) ! { ! $conflicts = $diff->get_num_conflicts(); ! } ! unset($diff, $diff2); ! if ($empty) ! { ! // A conflict got resolved... ! $update_list['up_to_date'][] = $update_ary; ! return; ! } ! } ! } ! if ($conflicts !== false) ! { ! $update_ary['conflicts'] = $conflicts; ! $update_list['conflict'][] = $update_ary; return; } *************** *** 1650,1656 **** /** * Wrapper for returning a diff object */ ! function &return_diff() { $args = func_get_args(); $three_way_diff = (func_num_args() > 2) ? true : false; --- 1666,1672 ---- /** * Wrapper for returning a diff object */ ! function return_diff() { $args = func_get_args(); $three_way_diff = (func_num_args() > 2) ? true : false; |
From: Joas S. <nic...@ph...> - 2009-09-18 14:57:45
|
Author: nickvergessen Date: Fri Sep 18 15:56:58 2009 New Revision: 10162 Log: fix r9814 - remove echo "aha"; - Happy birthday naderman Authorised by: naderman Modified: branches/phpBB-3_0_0/phpBB/includes/mcp/mcp_reports.php Modified: branches/phpBB-3_0_0/phpBB/includes/mcp/mcp_reports.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/mcp/mcp_reports.php (original) --- branches/phpBB-3_0_0/phpBB/includes/mcp/mcp_reports.php Fri Sep 18 15:56:58 2009 *************** *** 593,599 **** $db->sql_query($sql); if ($action == 'delete') ! {echo "aha"; delete_pm(ANONYMOUS, $close_report_posts, PRIVMSGS_INBOX); } } --- 593,599 ---- $db->sql_query($sql); if ($action == 'delete') ! { delete_pm(ANONYMOUS, $close_report_posts, PRIVMSGS_INBOX); } } |
From: Joas S. <nic...@ph...> - 2009-09-18 14:29:31
|
Author: nickvergessen Date: Fri Sep 18 15:28:45 2009 New Revision: 10161 Log: Fix Bug #51375 - Do not show QR in closed topics/forums Authorised by: AcydBurn Modified: branches/phpBB-3_0_0/phpBB/viewtopic.php Modified: branches/phpBB-3_0_0/phpBB/viewtopic.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/viewtopic.php (original) --- branches/phpBB-3_0_0/phpBB/viewtopic.php Fri Sep 18 15:28:45 2009 *************** *** 1678,1684 **** } // let's set up quick_reply ! $s_quick_reply = $user->data['is_registered'] && $config['allow_quick_reply'] && ($topic_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY) && $auth->acl_get('f_reply', $forum_id); if ($s_can_vote || $s_quick_reply) { --- 1678,1685 ---- } // let's set up quick_reply ! $s_allowed_reply = ((!$auth->acl_get('f_reply', $forum_id) || ($topic_data['forum_status'] == ITEM_LOCKED) || ($topic_data['topic_status'] == ITEM_LOCKED)) && !$auth->acl_get('m_edit', $forum_id)) ? false : true; ! $s_quick_reply = $s_allowed_reply && $user->data['is_registered'] && $config['allow_quick_reply'] && ($topic_data['forum_flags'] & FORUM_FLAG_QUICK_REPLY); if ($s_can_vote || $s_quick_reply) { |
From: Meik S. <acy...@ph...> - 2009-09-17 14:19:15
|
Author: acydburn Date: Thu Sep 17 15:18:57 2009 New Revision: 10160 Log: phpBB updater now solves common conflicts on it's own. This further reduces the chance of conflicts. (tested with some heavily modified files who previously generated a lot of conflicts) Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html branches/phpBB-3_0_0/phpBB/includes/diff/diff.php Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original) --- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Thu Sep 17 15:18:57 2009 *************** *** 244,249 **** --- 244,250 ---- <li>[Change] Resize oversized Topic icons (Bug #44415)</li> <li>[Change] Banned IPs are now sorted (Bug #43045 - Patch by DavidIQ)</li> <li>[Change] phpBB updater now skips sole whitespace/tab changes while computing differences. This reduces the chance of conflicts tremendously.</li> + <li>[Change] phpBB updater now solves common conflicts on it's own. This further reduces the chance of conflicts.</li> <li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li> <li>[Feature] Backported 3.2 captcha plugins. <ul> Modified: branches/phpBB-3_0_0/phpBB/includes/diff/diff.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/diff/diff.php (original) --- branches/phpBB-3_0_0/phpBB/includes/diff/diff.php Thu Sep 17 15:18:57 2009 *************** *** 727,733 **** --- 727,735 ---- } else { + // The following tries to aggressively solve conflicts... $this->_merged = false; + $this->solve_conflict(); } } *************** *** 738,743 **** --- 740,838 ---- { return ($this->merged() === false) ? true : false; } + + /** + * Tries to solve conflicts aggressively based on typical "assumptions" + * @author acydburn + */ + function solve_conflict() + { + $this->_merged = false; + + // CASE ONE: orig changed into final2, but modified/unknown code in final1. + // IF orig is found "as is" in final1 we replace the code directly in final1 and populate this as final2/merge + if (sizeof($this->orig) && sizeof($this->final2)) + { + // Ok, we basically search for $this->orig in $this->final1 and replace it with $this->final2 + $compare_seq = sizeof($this->orig); + + // Search for matching code block + $merge = array(); + $merge_found = false; + + // Go through the conflict code + for ($i = 0, $j = 0, $size = sizeof($this->final1); $i < $size; $i++, $j = $i) + { + $line = $this->final1[$i]; + $skip = 0; + + for ($x = 0; $x < $compare_seq; $x++) + { + // Try to skip all matching lines + if (trim($line) === trim($this->orig[$x])) + { + $line = (++$j < $size) ? $this->final1[$j] : $line; + $skip++; + } + } + + if ($skip === $compare_seq) + { + $merge_found = true; + $merge = array_merge($merge, $this->final2); + $i += ($skip - 1); + } + else + { + $merge[] = $line; + } + } + + if ($merge_found) + { + $this->final2 = $merge; + $this->_merged = &$this->final2; + } + + return; + } + + // CASE TWO: Added lines from orig to final2 but final1 had added lines too. Just merge them. + if (!sizeof($this->orig) && $this->final1 !== $this->final2 && sizeof($this->final1) && sizeof($this->final2)) + { + $this->final2 = array_merge($this->final1, $this->final2); + $this->_merged = &$this->final2; + + return; + } + + // CASE THREE: Removed lines (orig has the to-remove line(s), but final1 has additional lines which does not need to be removed). Just remove orig from final1 and then use final1 as final2/merge + if (!sizeof($this->final2) && sizeof($this->orig) && sizeof($this->final1) && $this->orig !== $this->final1) + { + $merged = $this->final1; + + foreach ($this->final1 as $i => $line) + { + foreach ($this->orig as $j => $old_line) + { + if (trim($line) === trim($old_line)) + { + unset($merged[$i]); + } + } + } + + if (sizeof($merged)) + { + $this->final2 = array_values($merged); + $this->_merged = &$this->final2; + } + + return; + } + + return; + } } /** |
From: Meik S. <acy...@ph...> - 2009-09-17 14:18:17
|
Author: acydburn Date: Thu Sep 17 14:39:50 2009 New Revision: 10158 Log: extend r9387 - check for existance of all functions we use... Modified: branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php branches/phpBB-3_0_0/phpBB/includes/session.php Modified: branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php Thu Sep 17 14:39:50 2009 *************** *** 1134,1140 **** global $user; $err_msg = ''; ! $local_host = (function_exists('php_uname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : $user->host; // If we are authenticating through pop-before-smtp, we // have to login ones before we get authenticated --- 1134,1140 ---- global $user; $err_msg = ''; ! $local_host = (function_exists('php_uname') && function_exists('gethostbyaddr') && function_exists('gethostbyname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : $user->host; // If we are authenticating through pop-before-smtp, we // have to login ones before we get authenticated Modified: branches/phpBB-3_0_0/phpBB/includes/session.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/session.php (original) --- branches/phpBB-3_0_0/phpBB/includes/session.php Thu Sep 17 14:39:50 2009 *************** *** 182,188 **** else { // Set to OS hostname or localhost ! $host = (function_exists('php_uname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : 'localhost'; } } --- 182,188 ---- else { // Set to OS hostname or localhost ! $host = (function_exists('php_uname') && function_exists('gethostbyaddr') && function_exists('gethostbyname')) ? gethostbyaddr(gethostbyname(php_uname('n'))) : 'localhost'; } } |
From: Andreas F. <ba...@ph...> - 2009-09-17 14:03:47
|
Author: bantu Date: Thu Sep 17 14:44:50 2009 New Revision: 10159 Log: Return integers when get_forum_list() is supposed to only return IDs. This will save us some calls to the sql escape function when used with sql_in_set(). Authorised by: acydburn Modified: branches/phpBB-3_0_0/phpBB/includes/functions_admin.php Modified: branches/phpBB-3_0_0/phpBB/includes/functions_admin.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions_admin.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions_admin.php Thu Sep 17 14:44:50 2009 *************** *** 254,260 **** if ($acl_list == '' || ($acl_list != '' && $auth->acl_gets($acl_list, $row['forum_id']))) { ! $rowset[] = ($id_only) ? $row['forum_id'] : $row; } } --- 254,260 ---- if ($acl_list == '' || ($acl_list != '' && $auth->acl_gets($acl_list, $row['forum_id']))) { ! $rowset[] = ($id_only) ? (int) $row['forum_id'] : $row; } } |
From: Meik S. <acy...@ph...> - 2009-09-17 08:15:42
|
Author: acydburn Date: Thu Sep 17 09:14:56 2009 New Revision: 10157 Log: found a much better method to skip whitespace/tab changes. :) This also solves even more unncessary conflicts - Bug #51365 Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html branches/phpBB-3_0_0/phpBB/includes/diff/engine.php Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original) --- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Thu Sep 17 09:14:56 2009 *************** *** 243,249 **** <li>[Change] Do not take edit post time into account for determining permission to delete last post in topic. (Bug #48615)</li> <li>[Change] Resize oversized Topic icons (Bug #44415)</li> <li>[Change] Banned IPs are now sorted (Bug #43045 - Patch by DavidIQ)</li> ! <li>[Change] phpBB updater now skips sole whitespace changes. This reduces the chance of conflicts tremendously.</li> <li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li> <li>[Feature] Backported 3.2 captcha plugins. <ul> --- 243,249 ---- <li>[Change] Do not take edit post time into account for determining permission to delete last post in topic. (Bug #48615)</li> <li>[Change] Resize oversized Topic icons (Bug #44415)</li> <li>[Change] Banned IPs are now sorted (Bug #43045 - Patch by DavidIQ)</li> ! <li>[Change] phpBB updater now skips sole whitespace/tab changes while computing differences. This reduces the chance of conflicts tremendously.</li> <li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li> <li>[Feature] Backported 3.2 captcha plugins. <ul> Modified: branches/phpBB-3_0_0/phpBB/includes/diff/engine.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/diff/engine.php (original) --- branches/phpBB-3_0_0/phpBB/includes/diff/engine.php Thu Sep 17 09:14:56 2009 *************** *** 49,54 **** --- 49,57 ---- */ class diff_engine { + /** + * If set to true we trim all lines before we compare them. This ensures that sole space/tab changes do not trigger diffs. + */ var $skip_whitespace_changes = true; function diff(&$from_lines, &$to_lines, $preserve_cr = true) *************** *** 87,93 **** // Skip leading common lines. for ($skip = 0; $skip < $n_from && $skip < $n_to; $skip++) { ! if ($from_lines[$skip] !== $to_lines[$skip]) { break; } --- 90,96 ---- // Skip leading common lines. for ($skip = 0; $skip < $n_from && $skip < $n_to; $skip++) { ! if (trim($from_lines[$skip]) !== trim($to_lines[$skip])) { break; } *************** *** 100,106 **** for ($endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++) { ! if ($from_lines[$xi] !== $to_lines[$yi]) { break; } --- 103,109 ---- for ($endskip = 0; --$xi > $skip && --$yi > $skip; $endskip++) { ! if (trim($from_lines[$xi]) !== trim($to_lines[$yi])) { break; } *************** *** 110,121 **** // Ignore lines which do not exist in both files. for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { ! $xhash[$from_lines[$xi]] = 1; } for ($yi = $skip; $yi < $n_to - $endskip; $yi++) { ! $line = $to_lines[$yi]; if (($this->ychanged[$yi] = empty($xhash[$line]))) { --- 113,124 ---- // Ignore lines which do not exist in both files. for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { ! if ($this->skip_whitespace_changes) $xhash[trim($from_lines[$xi])] = 1; else $xhash[$from_lines[$xi]] = 1; } for ($yi = $skip; $yi < $n_to - $endskip; $yi++) { ! $line = ($this->skip_whitespace_changes) ? trim($to_lines[$yi]) : $to_lines[$yi]; if (($this->ychanged[$yi] = empty($xhash[$line]))) { *************** *** 128,134 **** for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { ! $line = $from_lines[$xi]; if (($this->xchanged[$xi] = empty($yhash[$line]))) { --- 131,137 ---- for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { ! $line = ($this->skip_whitespace_changes) ? trim($from_lines[$xi]) : $from_lines[$xi]; if (($this->xchanged[$xi] = empty($yhash[$line]))) { *************** *** 178,197 **** $add[] = $to_lines[$yi++]; } - // Here we are a bit naughty. Naughty Boy... Naughty Boy... - // We check if delete and add is filled and only consist of one item - if ($this->skip_whitespace_changes && sizeof($delete) == 1 && sizeof($add) == 1) - { - // Now we simply trim the string and see if the lines are identical - // If they are identical we do not need to take them into account for the merge (less conflicts in phpBB) - if (trim($delete[0]) === trim($add[0])) - { - // This line ensures the line found here is correctly copied later (remember: we naughty boys like loops) - $xi--; $yi--; $this->xchanged[$xi] = $this->ychanged[$yi] = false; - $delete = $add = array(); - } - } - if ($delete && $add) { $edits[] = new diff_op_change($delete, $add); --- 181,186 ---- |
From: Meik S. <acy...@ph...> - 2009-09-17 08:13:46
|
Author: acydburn Date: Thu Sep 17 09:13:28 2009 New Revision: 10156 Log: correctly display diff for conflicts Modified: branches/phpBB-3_0_0/phpBB/adm/style/install_update_diff.html Modified: branches/phpBB-3_0_0/phpBB/adm/style/install_update_diff.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/adm/style/install_update_diff.html (original) --- branches/phpBB-3_0_0/phpBB/adm/style/install_update_diff.html Thu Sep 17 09:13:28 2009 *************** *** 15,23 **** // <![CDATA[ function resize_panel() { ! var block = document.getElementById('codepanel'); var height; ! if (window.innerHeight) { height = window.innerHeight - 150; --- 15,23 ---- // <![CDATA[ function resize_panel() { ! var block = document.getElementById('codepanel'); var height; ! if (window.innerHeight) { height = window.innerHeight - 150; *************** *** 26,32 **** else { //whatever IE needs to do this ! } } window.onresize = resize_panel; --- 26,32 ---- else { //whatever IE needs to do this ! } } window.onresize = resize_panel; *************** *** 54,60 **** width: 100%; } <!-- ELSE --> ! div#codepanel { background-color: #eee; } <!-- ENDIF --> --- 54,60 ---- width: 100%; } <!-- ELSE --> ! div#codepanel { background-color: #eee; } <!-- ENDIF --> *************** *** 149,158 **** table.hrdiff tbody td.old { border-left: 1px solid #999; ! border-right: 1px solid #999; } table.hrdiff tbody td.new { ! border-right: 1px solid #999; } table.hrdiff td pre { --- 149,158 ---- table.hrdiff tbody td.old { border-left: 1px solid #999; ! border-right: 1px solid #999; } table.hrdiff tbody td.new { ! border-right: 1px solid #999; } table.hrdiff td pre { *************** *** 238,255 **** </fieldset> </form> <!-- ENDIF --> </div> ! <div id="page-body"> <div id="acp"> <div class="panel" id="codepanel"> <span class="corners-top"><span></span></span> <div id="diff_content"> <div id="main"> - - <!-- IF S_DIFF_CONFLICT_FILE --> - <div style="float: {S_CONTENT_FLOW_END};"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div> - <!-- ENDIF --> {DIFF_CONTENT} </div> </div> --- 238,255 ---- </fieldset> </form> <!-- ENDIF --> + <!-- IF S_DIFF_CONFLICT_FILE --> + <div style="float: {S_CONTENT_FLOW_BEGIN};"><strong>{L_NUM_CONFLICTS}: {NUM_CONFLICTS}</strong></div> + <br style="clear: both;" /> + <!-- ENDIF --> </div> ! <div id="page-body"> <div id="acp"> <div class="panel" id="codepanel"> <span class="corners-top"><span></span></span> <div id="diff_content"> <div id="main"> {DIFF_CONTENT} </div> </div> *************** *** 257,262 **** </div> </div> </div> ! <!-- INCLUDE simple_footer.html --> \ No newline at end of file --- 257,262 ---- </div> </div> </div> ! <!-- INCLUDE simple_footer.html --> \ No newline at end of file |
From: Meik S. <acy...@ph...> - 2009-09-17 07:53:21
|
Author: acydburn Date: Thu Sep 17 08:52:35 2009 New Revision: 10155 Log: Remove duplicate S_DISPLAY_GALLERY key from ucp_groups. Regression from r9757 Modified: branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_groups.php Modified: branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_groups.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_groups.php (original) --- branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_groups.php Thu Sep 17 08:52:35 2009 *************** *** 708,714 **** 'S_UPLOAD_AVATAR_FILE' => ($config['allow_avatar'] && $config['allow_avatar_upload'] && $can_upload) ? true : false, 'S_UPLOAD_AVATAR_URL' => ($config['allow_avatar'] && $config['allow_avatar_remote_upload'] && $can_upload) ? true : false, 'S_LINK_AVATAR' => ($config['allow_avatar'] && $config['allow_avatar_remote']) ? true : false, - 'S_DISPLAY_GALLERY' => ($config['allow_avatar'] && $config['allow_avatar_local']) ? true : false, 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', 'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '', --- 708,713 ---- |
From: Meik S. <acy...@ph...> - 2009-09-16 14:37:35
|
Author: acydburn Date: Wed Sep 16 15:37:17 2009 New Revision: 10154 Log: fix xhtml issue in updater - Bug #51335 Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_update.php Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_update.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/acp/acp_update.php (original) --- branches/phpBB-3_0_0/phpBB/includes/acp/acp_update.php Wed Sep 16 15:37:17 2009 *************** *** 43,48 **** --- 43,49 ---- $latest_version = trim($info[0]); $announcement_url = trim($info[1]); + $announcement_url = (strpos($announcement_url, '&') === false) ? str_replace('&', '&', $announcement_url) : $announcement_url; $update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=update'); // Determine automatic update... |
From: Meik S. <acy...@ph...> - 2009-09-16 14:31:22
|
Author: acydburn Date: Wed Sep 16 15:30:36 2009 New Revision: 10153 Log: fix some XHTML issues in admin style - Bug #51405 the acp_logs one is quite nasty, i know - but at least it does not require a new css class Modified: branches/phpBB-3_0_0/phpBB/adm/style/acp_database.html branches/phpBB-3_0_0/phpBB/adm/style/acp_inactive.html branches/phpBB-3_0_0/phpBB/adm/style/acp_logs.html branches/phpBB-3_0_0/phpBB/adm/style/acp_main.html branches/phpBB-3_0_0/phpBB/adm/style/acp_styles.html Modified: branches/phpBB-3_0_0/phpBB/adm/style/acp_database.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/adm/style/acp_database.html (original) --- branches/phpBB-3_0_0/phpBB/adm/style/acp_database.html Wed Sep 16 15:30:36 2009 *************** *** 71,78 **** <dl> <dt><label for="where">{L_ACTION}:</label></dt> <dd> ! <label><input type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label> ! <label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label></dd> </dl> <dl> <dt><label for="table">{L_TABLE_SELECT}:</label></dt> --- 71,79 ---- <dl> <dt><label for="where">{L_ACTION}:</label></dt> <dd> ! <label><input id="where" type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label> ! <label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label> ! </dd> </dl> <dl> <dt><label for="table">{L_TABLE_SELECT}:</label></dt> Modified: branches/phpBB-3_0_0/phpBB/adm/style/acp_inactive.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/adm/style/acp_inactive.html (original) --- branches/phpBB-3_0_0/phpBB/adm/style/acp_inactive.html Wed Sep 16 15:30:36 2009 *************** *** 41,46 **** --- 41,47 ---- <td style="vertical-align: top;"> {inactive.REASON} <!-- IF inactive.REMINDED --><br />{inactive.REMINDED_EXPLAIN}<!-- ENDIF --> + </td> <td> <input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" /> </td> </tr> <!-- BEGINELSE --> *************** *** 67,73 **** <fieldset class="quick"> <select name="action">{S_INACTIVE_OPTIONS}</select> <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" /> ! <p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p> {S_FORM_TOKEN} </fieldset> --- 68,74 ---- <fieldset class="quick"> <select name="action">{S_INACTIVE_OPTIONS}</select> <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" /> ! <p class="small"><a href="#" onclick="marklist('inactive', 'mark', true); return false;">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('inactive', 'mark', false); return false;">{L_UNMARK_ALL}</a></p> {S_FORM_TOKEN} </fieldset> Modified: branches/phpBB-3_0_0/phpBB/adm/style/acp_logs.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/adm/style/acp_logs.html (original) --- branches/phpBB-3_0_0/phpBB/adm/style/acp_logs.html Wed Sep 16 15:30:36 2009 *************** *** 14,24 **** <!-- IF PAGINATION --> <div class="pagination" style="float: right; margin: 15px 0 2px 0"> ! <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span> </div> <!-- ENDIF --> ! <div class="clearfix"> </div><br style="clear: both;" /> <!-- IF .log --> <table cellspacing="1"> --- 14,25 ---- <!-- IF PAGINATION --> <div class="pagination" style="float: right; margin: 15px 0 2px 0"> ! <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span> </div> <!-- ENDIF --> ! <div class="clearfix"> </div> ! <div><br style="clear: both;" /></div> <!-- IF .log --> <table cellspacing="1"> Modified: branches/phpBB-3_0_0/phpBB/adm/style/acp_main.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/adm/style/acp_main.html (original) --- branches/phpBB-3_0_0/phpBB/adm/style/acp_main.html Wed Sep 16 15:30:36 2009 *************** *** 232,237 **** --- 232,238 ---- <td style="vertical-align: top;"> {inactive.REASON} <!-- IF inactive.REMINDED --><br />{inactive.REMINDED_EXPLAIN}<!-- ENDIF --> + </td> </tr> <!-- BEGINELSE --> <tr> Modified: branches/phpBB-3_0_0/phpBB/adm/style/acp_styles.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/adm/style/acp_styles.html (original) --- branches/phpBB-3_0_0/phpBB/adm/style/acp_styles.html Wed Sep 16 15:30:36 2009 *************** *** 20,26 **** </dl> <dl> <dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt> ! <dd><select name="new_id">{S_REPLACE_OPTIONS}</select></dd> </dl> <p class="quick"> --- 20,26 ---- </dl> <dl> <dt><label for="new_id">{L_REPLACE}:</label><br /><span>{L_REPLACE_EXPLAIN}</span></dt> ! <dd><select id="new_id" name="new_id">{S_REPLACE_OPTIONS}</select></dd> </dl> <p class="quick"> *************** *** 135,145 **** <div id="img_dimensions"> <dl> <dt><label for="imgwidth">{L_IMAGE_WIDTH}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt> ! <dd><input type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd> </dl> <dl> <dt><label for="imgheight">{L_IMAGE_HEIGHT}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt> ! <dd><input type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd> </dl> </div> </fieldset> --- 135,145 ---- <div id="img_dimensions"> <dl> <dt><label for="imgwidth">{L_IMAGE_WIDTH}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt> ! <dd><input id="imgwidth" type="text" name="imgwidth" value="{IMAGE_SIZE}" /></dd> </dl> <dl> <dt><label for="imgheight">{L_IMAGE_HEIGHT}:</label><br /><span>{L_AUTOMATIC_EXPLAIN}</span></dt> ! <dd><input id="imgheight" type="text" name="imgheight" value="{IMAGE_HEIGHT}" /></dd> </dl> </div> </fieldset> *************** *** 266,272 **** <p>{L_TEMPLATE_CACHE_EXPLAIN}</p> ! <form name="acp_styles" method="post" action="{U_ACTION}"> <fieldset class="tabulated"> <legend>{L_TEMPLATE_CACHE}</legend> --- 266,272 ---- <p>{L_TEMPLATE_CACHE_EXPLAIN}</p> ! <form id="acp_styles" method="post" action="{U_ACTION}"> <fieldset class="tabulated"> <legend>{L_TEMPLATE_CACHE}</legend> |
From: Meik S. <acy...@ph...> - 2009-09-16 13:02:27
|
Author: acydburn Date: Wed Sep 16 14:02:13 2009 New Revision: 10152 Log: Bug #51385 - regression from r9252 - only spelling fix Modified: branches/phpBB-3_0_0/phpBB/language/en/install.php Modified: branches/phpBB-3_0_0/phpBB/language/en/install.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/language/en/install.php (original) --- branches/phpBB-3_0_0/phpBB/language/en/install.php Wed Sep 16 14:02:13 2009 *************** *** 451,458 **** 'MERGE_NO_MERGE_NEW_OPTION' => 'Do not merge - use new file', 'MERGE_NO_MERGE_MOD_OPTION' => 'Do not merge - use currently installed file', ! 'MERGE_MOD_FILE_OPTION' => 'Merge modifications (Loose new phpBB code within conflicting block)', ! 'MERGE_NEW_FILE_OPTION' => 'Merge modifications (Loose modified code within conflicting block)', 'MERGE_SELECT_ERROR' => 'Conflicting file merge modes are not correctly selected.', 'MERGING_FILES' => 'Merging differences', 'MERGING_FILES_EXPLAIN' => 'Currently collecting final file changes.<br /><br />Please wait until phpBB has completed all operations on changed files.', --- 451,458 ---- 'MERGE_NO_MERGE_NEW_OPTION' => 'Do not merge - use new file', 'MERGE_NO_MERGE_MOD_OPTION' => 'Do not merge - use currently installed file', ! 'MERGE_MOD_FILE_OPTION' => 'Merge modifications (removes new phpBB code within conflicting block)', ! 'MERGE_NEW_FILE_OPTION' => 'Merge modifications (removes modified code within conflicting block)', 'MERGE_SELECT_ERROR' => 'Conflicting file merge modes are not correctly selected.', 'MERGING_FILES' => 'Merging differences', 'MERGING_FILES_EXPLAIN' => 'Currently collecting final file changes.<br /><br />Please wait until phpBB has completed all operations on changed files.', |
From: Meik S. <acy...@ph...> - 2009-09-16 13:02:12
|
Author: acydburn Date: Wed Sep 16 14:01:20 2009 New Revision: 10151 Log: add send_statistics feature to changelog Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original) --- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Wed Sep 16 14:01:20 2009 *************** *** 300,305 **** --- 300,306 ---- <li>[Feature] Added function to generate Email hash. (Bug #49195)</li> <li>[Feature] Style authors are now able to define the default submit button used for form submission on ENTER keypress on forms using more than one. Prosilver uses this for the posting page(s) and registration screen.</li> <li>[Feature] Ability to specify amount of time user is able to delete his last post in topic.</li> + <li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li> </ul> <a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3> |
From: Joas S. <nic...@ph...> - 2009-09-16 08:12:38
|
Author: nickvergessen Date: Wed Sep 16 09:11:52 2009 New Revision: 10150 Log: Fix #51285 and more issues with template inherence on set_custom_template Conflict introduced with r9839 and r9823 Authorised by: AcydBurn Modified: branches/phpBB-3_0_0/phpBB/includes/bbcode.php branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php branches/phpBB-3_0_0/phpBB/includes/template.php Modified: branches/phpBB-3_0_0/phpBB/includes/bbcode.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/bbcode.php (original) --- branches/phpBB-3_0_0/phpBB/includes/bbcode.php Wed Sep 16 09:11:52 2009 *************** *** 128,134 **** */ function bbcode_cache_init() { ! global $user, $phpbb_root_path; if (empty($this->template_filename)) { --- 128,134 ---- */ function bbcode_cache_init() { ! global $phpbb_root_path, $template, $user; if (empty($this->template_filename)) { *************** *** 137,143 **** if (!@file_exists($this->template_filename)) { ! if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) { $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html'; if (!@file_exists($this->template_filename)) --- 137,143 ---- if (!@file_exists($this->template_filename)) { ! if (isset($template->orig_tpl_inherits_id) && $template->orig_tpl_inherits_id) { $this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html'; if (!@file_exists($this->template_filename)) Modified: branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions_messenger.php Wed Sep 16 09:11:52 2009 *************** *** 199,205 **** $template_path .= $template_lang . '/email'; } ! $tpl->set_custom_template($template_path, $template_lang . '_email'); $tpl->set_filenames(array( 'body' => $template_file . '.txt', --- 199,205 ---- $template_path .= $template_lang . '/email'; } ! $tpl->set_custom_template($template_path, $template_lang . '_email', 'email'); $tpl->set_filenames(array( 'body' => $template_file . '.txt', Modified: branches/phpBB-3_0_0/phpBB/includes/template.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/template.php (original) --- branches/phpBB-3_0_0/phpBB/includes/template.php Wed Sep 16 09:11:52 2009 *************** *** 90,96 **** * Set custom template location (able to use directory outside of phpBB) * @access public */ ! function set_custom_template($template_path, $template_name) { global $phpbb_root_path, $user; --- 90,96 ---- * Set custom template location (able to use directory outside of phpBB) * @access public */ ! function set_custom_template($template_path, $template_name, $template_mode = 'template') { global $phpbb_root_path, $user; *************** *** 102,109 **** $this->root = $template_path; $this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_'; ! $user->theme['template_storedb'] = false; ! $user->theme['template_inherits_id'] = false; $this->_rootref = &$this->_tpldata['.'][0]; --- 102,114 ---- $this->root = $template_path; $this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_'; ! ! // As the template-engine is used for more than the template (emails, etc.), we should not set $user->theme in all cases, but only on the real template. ! if ($template_mode == 'template') ! { ! $user->theme['template_storedb'] = false; ! $user->theme['template_inherits_id'] = false; ! } $this->_rootref = &$this->_tpldata['.'][0]; |
From: Meik S. <acy...@ph...> - 2009-09-16 07:51:42
|
Author: acydburn Date: Wed Sep 16 08:51:26 2009 New Revision: 10149 Log: move up the feed code because MODs often use this location which results in more unneccessary conflicts. Modified: branches/phpBB-3_0_0/phpBB/includes/functions.php Modified: branches/phpBB-3_0_0/phpBB/includes/functions.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions.php Wed Sep 16 08:51:26 2009 *************** *** 4035,4050 **** } } - // Which timezone? - $tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone'])); - - // Send a proper content-language to the output - $user_lang = $user->lang['USER_LANG']; - if (strpos($user_lang, '-x-') !== false) - { - $user_lang = substr($user_lang, 0, strpos($user_lang, '-x-')); - } - $forum_id = request_var('f', 0); $topic_id = request_var('t', 0); --- 4035,4040 ---- *************** *** 4065,4070 **** --- 4055,4070 ---- $board_url = generate_board_url() . '/'; $web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $phpbb_root_path; + // Which timezone? + $tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone'])); + + // Send a proper content-language to the output + $user_lang = $user->lang['USER_LANG']; + if (strpos($user_lang, '-x-') !== false) + { + $user_lang = substr($user_lang, 0, strpos($user_lang, '-x-')); + } + // The following assigns all _common_ variables that may be used at any point in a template. $template->assign_vars(array( 'SITENAME' => $config['sitename'], |
From: Meik S. <acy...@ph...> - 2009-09-15 19:02:30
|
Author: acydburn Date: Tue Sep 15 20:01:42 2009 New Revision: 10148 Log: fix coppa setting in convertor (Bug #50735) - at the same time increase target phpBB version number for the phpBB2 convertor and convertor version number. ;) Modified: branches/phpBB-3_0_0/phpBB/install/convertors/convert_phpbb20.php Modified: branches/phpBB-3_0_0/phpBB/install/convertors/convert_phpbb20.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/install/convertors/convert_phpbb20.php (original) --- branches/phpBB-3_0_0/phpBB/install/convertors/convert_phpbb20.php Tue Sep 15 20:01:42 2009 *************** *** 31,38 **** */ $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', ! 'version' => '1.0.2', ! 'phpbb_version' => '3.0.4', 'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>', 'dbms' => $dbms, 'dbhost' => $dbhost, --- 31,38 ---- */ $convertor_data = array( 'forum_name' => 'phpBB 2.0.x', ! 'version' => '1.0.3', ! 'phpbb_version' => '3.0.6', 'author' => '<a href="http://www.phpbb.com/">phpBB Group</a>', 'dbms' => $dbms, 'dbhost' => $dbhost, *************** *** 129,135 **** 'board_timezone' => 'board_timezone', 'allow_privmsg' => 'not(privmsg_disable)', 'gzip_compress' => 'gzip_compress', ! 'coppa_enable' => 'is_empty(coppa_mail)', 'coppa_fax' => 'coppa_fax', 'coppa_mail' => 'coppa_mail', 'record_online_users' => 'record_online_users', --- 129,135 ---- 'board_timezone' => 'board_timezone', 'allow_privmsg' => 'not(privmsg_disable)', 'gzip_compress' => 'gzip_compress', ! 'coppa_enable' => '!is_empty(coppa_mail)', 'coppa_fax' => 'coppa_fax', 'coppa_mail' => 'coppa_mail', 'record_online_users' => 'record_online_users', |