[ticket/11248] Convert line endings to LF - develop edition.

PHPBB3-11248
This commit is contained in:
Oleg Pudeyev 2012-12-07 21:57:33 -05:00
parent b7b8fefdd0
commit 03d2c6413c
3 changed files with 1826 additions and 1796 deletions

View file

@ -10,21 +10,36 @@ source source_phpbb_{SPHINX_ID}_main
sql_query_pre = UPDATE phpbb_sphinx SET max_doc_id = MAX(post_id) WHERE counter_id = 1 sql_query_pre = UPDATE phpbb_sphinx SET max_doc_id = MAX(post_id) WHERE counter_id = 1
sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM phpbb_posts sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM phpbb_posts
sql_range_step = 5000 sql_range_step = 5000
sql_query = SELECT \ sql_query = SELECT
p.post_id AS id, \ \
p.forum_id, \ p.post_id AS id,
p.topic_id, \ \
p.poster_id, \ p.forum_id,
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post, \ \
p.post_time, \ p.topic_id,
p.post_subject, \ \
p.post_subject as title, \ p.poster_id,
p.post_text as data, \ \
t.topic_last_post_time, \ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
0 as deleted \ \
FROM phpbb_posts p, phpbb_topics t \ p.post_time,
WHERE \ \
p.topic_id = t.topic_id \ p.post_subject,
\
p.post_subject as title,
\
p.post_text as data,
\
t.topic_last_post_time,
\
0 as deleted
\
FROM phpbb_posts p, phpbb_topics t
\
WHERE
\
p.topic_id = t.topic_id
\
AND p.post_id >= $start AND p.post_id <= $end AND p.post_id >= $start AND p.post_id <= $end
sql_query_post = sql_query_post =
sql_query_post_index = UPDATE phpbb_sphinx SET max_doc_id = $maxid WHERE counter_id = 1 sql_query_post_index = UPDATE phpbb_sphinx SET max_doc_id = $maxid WHERE counter_id = 1
@ -42,21 +57,36 @@ source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
{ {
sql_query_range = sql_query_range =
sql_range_step = sql_range_step =
sql_query = SELECT \ sql_query = SELECT
p.post_id AS id, \ \
p.forum_id, \ p.post_id AS id,
p.topic_id, \ \
p.poster_id, \ p.forum_id,
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post, \ \
p.post_time, \ p.topic_id,
p.post_subject, \ \
p.post_subject as title, \ p.poster_id,
p.post_text as data, \ \
t.topic_last_post_time, \ CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post,
0 as deleted \ \
FROM phpbb_posts p, phpbb_topics t \ p.post_time,
WHERE \ \
p.topic_id = t.topic_id \ p.post_subject,
\
p.post_subject as title,
\
p.post_text as data,
\
t.topic_last_post_time,
\
0 as deleted
\
FROM phpbb_posts p, phpbb_topics t
\
WHERE
\
p.topic_id = t.topic_id
\
AND p.post_id >= ( SELECT max_doc_id FROM phpbb_sphinx WHERE counter_id=1 ) AND p.post_id >= ( SELECT max_doc_id FROM phpbb_sphinx WHERE counter_id=1 )
sql_query_pre = sql_query_pre =
} }

File diff suppressed because it is too large Load diff

View file

@ -1,54 +1,54 @@
<?php <?php
/** /**
* *
* @package testing * @package testing
* @copyright (c) 2011 phpBB Group * @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
* *
*/ */
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
class phpbb_session_append_sid_test extends phpbb_test_case class phpbb_session_append_sid_test extends phpbb_test_case
{ {
public function append_sid_data() public function append_sid_data()
{ {
return array( return array(
array('viewtopic.php?t=1&amp;f=2', false, true, false, 'viewtopic.php?t=1&amp;f=2', 'parameters in url-argument'), array('viewtopic.php?t=1&amp;f=2', false, true, false, 'viewtopic.php?t=1&amp;f=2', 'parameters in url-argument'),
array('viewtopic.php', 't=1&amp;f=2', true, false, 'viewtopic.php?t=1&amp;f=2', 'parameters in params-argument using amp'), array('viewtopic.php', 't=1&amp;f=2', true, false, 'viewtopic.php?t=1&amp;f=2', 'parameters in params-argument using amp'),
array('viewtopic.php', 't=1&f=2', false, false, 'viewtopic.php?t=1&f=2', 'parameters in params-argument using &'), array('viewtopic.php', 't=1&f=2', false, false, 'viewtopic.php?t=1&f=2', 'parameters in params-argument using &'),
array('viewtopic.php', array('t' => 1, 'f' => 2), true, false, 'viewtopic.php?t=1&amp;f=2', 'parameters in params-argument as array'), array('viewtopic.php', array('t' => 1, 'f' => 2), true, false, 'viewtopic.php?t=1&amp;f=2', 'parameters in params-argument as array'),
// Custom sid parameter // Custom sid parameter
array('viewtopic.php', 't=1&amp;f=2', true, 'custom-sid', 'viewtopic.php?t=1&amp;f=2&amp;sid=custom-sid', 'using session_id'), array('viewtopic.php', 't=1&amp;f=2', true, 'custom-sid', 'viewtopic.php?t=1&amp;f=2&amp;sid=custom-sid', 'using session_id'),
// Testing anchors // Testing anchors
array('viewtopic.php?t=1&amp;f=2#anchor', false, true, false, 'viewtopic.php?t=1&amp;f=2#anchor', 'anchor in url-argument'), array('viewtopic.php?t=1&amp;f=2#anchor', false, true, false, 'viewtopic.php?t=1&amp;f=2#anchor', 'anchor in url-argument'),
array('viewtopic.php', 't=1&amp;f=2#anchor', true, false, 'viewtopic.php?t=1&amp;f=2#anchor', 'anchor in params-argument'), array('viewtopic.php', 't=1&amp;f=2#anchor', true, false, 'viewtopic.php?t=1&amp;f=2#anchor', 'anchor in params-argument'),
array('viewtopic.php', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, false, 'viewtopic.php?t=1&amp;f=2#anchor', 'anchor in params-argument (array)'), array('viewtopic.php', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, false, 'viewtopic.php?t=1&amp;f=2#anchor', 'anchor in params-argument (array)'),
// Anchors and custom sid // Anchors and custom sid
array('viewtopic.php?t=1&amp;f=2#anchor', false, true, 'custom-sid', 'viewtopic.php?t=1&amp;f=2&amp;sid=custom-sid#anchor', 'anchor in url-argument using session_id'), array('viewtopic.php?t=1&amp;f=2#anchor', false, true, 'custom-sid', 'viewtopic.php?t=1&amp;f=2&amp;sid=custom-sid#anchor', 'anchor in url-argument using session_id'),
array('viewtopic.php', 't=1&amp;f=2#anchor', true, 'custom-sid', 'viewtopic.php?t=1&amp;f=2&amp;sid=custom-sid#anchor', 'anchor in params-argument using session_id'), array('viewtopic.php', 't=1&amp;f=2#anchor', true, 'custom-sid', 'viewtopic.php?t=1&amp;f=2&amp;sid=custom-sid#anchor', 'anchor in params-argument using session_id'),
array('viewtopic.php', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, 'custom-sid', 'viewtopic.php?t=1&amp;f=2&amp;sid=custom-sid#anchor', 'anchor in params-argument (array) using session_id'), array('viewtopic.php', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, 'custom-sid', 'viewtopic.php?t=1&amp;f=2&amp;sid=custom-sid#anchor', 'anchor in params-argument (array) using session_id'),
// Empty parameters should not append the ? // Empty parameters should not append the ?
array('viewtopic.php', false, true, false, 'viewtopic.php', 'no params using bool false'), array('viewtopic.php', false, true, false, 'viewtopic.php', 'no params using bool false'),
array('viewtopic.php', '', true, false, 'viewtopic.php', 'no params using empty string'), array('viewtopic.php', '', true, false, 'viewtopic.php', 'no params using empty string'),
array('viewtopic.php', array(), true, false, 'viewtopic.php', 'no params using empty array'), array('viewtopic.php', array(), true, false, 'viewtopic.php', 'no params using empty array'),
); );
} }
/** /**
* @dataProvider append_sid_data * @dataProvider append_sid_data
*/ */
public function test_append_sid($url, $params, $is_amp, $session_id, $expected, $description) public function test_append_sid($url, $params, $is_amp, $session_id, $expected, $description)
{ {
global $phpbb_dispatcher; global $phpbb_dispatcher;
$phpbb_dispatcher = new phpbb_mock_event_dispatcher; $phpbb_dispatcher = new phpbb_mock_event_dispatcher;
$this->assertEquals($expected, append_sid($url, $params, $is_amp, $session_id)); $this->assertEquals($expected, append_sid($url, $params, $is_amp, $session_id));
} }
} }