diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html
index 6616b95a73..4b1d30d77d 100644
--- a/phpBB/styles/prosilver/template/search_body.html
+++ b/phpBB/styles/prosilver/template/search_body.html
@@ -98,7 +98,7 @@
-
+
diff --git a/phpBB/styles/prosilver/template/template.cfg b/phpBB/styles/prosilver/template/template.cfg
index 8d976247bc..22ca73b487 100644
--- a/phpBB/styles/prosilver/template/template.cfg
+++ b/phpBB/styles/prosilver/template/template.cfg
@@ -23,3 +23,8 @@ version = 3.1.0-dev
# Defining a different template bitfield
template_bitfield = lNg=
+
+# Template inheritance
+# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
+# Set value to empty to ignore template inheritance
+inherit_from = prosilver
diff --git a/phpBB/styles/prosilver/template/ucp_main_front.html b/phpBB/styles/prosilver/template/ucp_main_front.html
index 68f89edf12..20afd119cc 100644
--- a/phpBB/styles/prosilver/template/ucp_main_front.html
+++ b/phpBB/styles/prosilver/template/ucp_main_front.html
@@ -34,8 +34,8 @@
{L_JOINED}: {JOINED}
{L_VISITED}: {LAST_VISIT_YOU}
{L_TOTAL_POSTS}: {POSTS} | {L_SEARCH_YOUR_POSTS}
({POSTS_DAY} / {POSTS_PCT}){POSTS}
- {L_ACTIVE_IN_FORUM}: {ACTIVE_FORUM}
({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})
- {L_ACTIVE_IN_TOPIC}: {ACTIVE_TOPIC}
({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})
+ {L_ACTIVE_IN_FORUM}: {ACTIVE_FORUM}
({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})
+ {L_ACTIVE_IN_TOPIC}: {ACTIVE_TOPIC}
({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})
{L_YOUR_WARNINGS}: {WARNING_IMG} [{WARNINGS}]
diff --git a/phpBB/styles/prosilver/template/ucp_pm_message_header.html b/phpBB/styles/prosilver/template/ucp_pm_message_header.html
index fcebab0868..ae66dd0a36 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_message_header.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_message_header.html
@@ -1,25 +1,22 @@
{L_TITLE}: {CUR_FOLDER_NAME}
-
diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html
index 67ef1443ab..0b44446abd 100644
--- a/phpBB/styles/subsilver2/template/posting_body.html
+++ b/phpBB/styles/subsilver2/template/posting_body.html
@@ -333,6 +333,7 @@
+
diff --git a/phpBB/styles/subsilver2/template/template.cfg b/phpBB/styles/subsilver2/template/template.cfg
index 82d3d2681b..cf5562a8a4 100644
--- a/phpBB/styles/subsilver2/template/template.cfg
+++ b/phpBB/styles/subsilver2/template/template.cfg
@@ -21,3 +21,7 @@ name = subsilver2
copyright = © phpBB Group, 2003
version = 3.1.0-dev
+# Template inheritance
+# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
+# Set value to empty to ignore template inheritance
+inherit_from = subsilver2
diff --git a/phpBB/styles/subsilver2/template/ucp_main_front.html b/phpBB/styles/subsilver2/template/ucp_main_front.html
index 2290a392e1..1445a71a1b 100644
--- a/phpBB/styles/subsilver2/template/ucp_main_front.html
+++ b/phpBB/styles/subsilver2/template/ucp_main_front.html
@@ -48,11 +48,11 @@
{L_ACTIVE_IN_FORUM}: |
- {ACTIVE_FORUM} [ {ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT} ]- |
+ {ACTIVE_FORUM} [ {ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT} ]- |
{L_ACTIVE_IN_TOPIC}: |
- {ACTIVE_TOPIC} [ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]- |
+ {ACTIVE_TOPIC} [ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]- |
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html b/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html
index 1b1c28fa3b..96e2e26683 100644
--- a/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html
+++ b/phpBB/styles/subsilver2/template/ucp_profile_reg_details.html
@@ -22,12 +22,6 @@
{L_EMAIL_ADDRESS}: |
{EMAIL} |
-
-
- {L_CONFIRM_EMAIL}: {L_CONFIRM_EMAIL_EXPLAIN} |
- |
-
-
{L_NEW_PASSWORD}: {L_CHANGE_PASSWORD_EXPLAIN} |
diff --git a/phpBB/styles/subsilver2/template/ucp_register.html b/phpBB/styles/subsilver2/template/ucp_register.html
index ad6fb8d056..0c3533292d 100644
--- a/phpBB/styles/subsilver2/template/ucp_register.html
+++ b/phpBB/styles/subsilver2/template/ucp_register.html
@@ -41,10 +41,6 @@
{L_EMAIL_ADDRESS}: |
|
-
- {L_CONFIRM_EMAIL}: |
- |
-
{L_PASSWORD}: {L_PASSWORD_EXPLAIN} |
|
diff --git a/phpBB/styles/subsilver2/theme/stylesheet.css b/phpBB/styles/subsilver2/theme/stylesheet.css
index ee1a8f44dc..18d15a8d41 100644
--- a/phpBB/styles/subsilver2/theme/stylesheet.css
+++ b/phpBB/styles/subsilver2/theme/stylesheet.css
@@ -1094,3 +1094,41 @@ a.imageset {
padding-left: 97px;
padding-top: 27px;
}
+
+/* RTL imageset entries */
+.rtl .imageset.site_logo {
+ padding-right: 170px;
+ padding-left: 0;
+}
+.rtl .imageset.upload_bar {
+ padding-right: 280px;
+ padding-left: 0;
+}
+.rtl .imageset.poll_left, .rtl .imageset.poll_right {
+ padding-right: 4px;
+ padding-left: 0;
+}
+.rtl .imageset.poll_center {
+ padding-right: 1px;
+ padding-left: 0;
+}
+.rtl .imageset.forum_link, .rtl .imageset.forum_read, .rtl .imageset.forum_read_locked, .rtl .imageset.forum_read_subforum, .rtl .imageset.forum_unread, .rtl .imageset.forum_unread_locked, .rtl .imageset.forum_unread_subforum {
+ padding-right: 46px;
+ padding-left: 0;
+}
+.rtl .imageset.topic_moved, .rtl .imageset.topic_read, .rtl .imageset.topic_read_mine, .rtl .imageset.topic_read_hot, .rtl .imageset.topic_read_hot_mine, .rtl .imageset.topic_read_locked, .rtl .imageset.topic_read_locked_mine, .rtl .imageset.topic_unread, .rtl .imageset.topic_unread_mine, .rtl .imageset.topic_unread_hot, .rtl .imageset.topic_unread_hot_mine, .rtl .imageset.topic_unread_locked, .rtl .imageset.topic_unread_locked_mine, .rtl .imageset.sticky_read, .rtl .imageset.sticky_read_mine, .rtl .imageset.sticky_read_locked, .rtl .imageset.sticky_read_locked_mine, .rtl .imageset.sticky_unread, .rtl .imageset.sticky_unread_mine, .rtl .imageset.sticky_unread_locked, .rtl .imageset.sticky_unread_locked_mine, .rtl .imageset.announce_read, .rtl .imageset.announce_read_mine, .rtl .imageset.announce_read_locked, .rtl .imageset.announce_read_locked_mine, .rtl .imageset.announce_unread, .rtl .imageset.announce_unread_mine, .rtl .imageset.announce_unread_locked, .rtl .imageset.announce_unread_locked_mine, .rtl .imageset.global_read, .rtl .imageset.global_read_mine, .rtl .imageset.global_read_locked, .rtl .imageset.global_read_locked_mine, .rtl .imageset.global_unread, .rtl .imageset.global_unread_mine, .rtl .imageset.global_unread_locked, .rtl .imageset.global_unread_locked_mine, .rtl .imageset.pm_read, .rtl .imageset.pm_unread, .rtl .imageset.icon_topic_reported, .rtl .imageset.icon_topic_unapproved {
+ padding-right: 19px;
+ padding-left: 0;
+}
+.rtl .imageset.icon_post_target, .rtl .imageset.icon_post_target_unread {
+ padding-right: 12px;
+ padding-left: 0;
+}
+.rtl .imageset.icon_topic_attach {
+ padding-right: 14px;
+ padding-left: 0;
+}
+.rtl .imageset.icon_topic_latest, .rtl .imageset.icon_topic_newest {
+ padding-right: 18px;
+ padding-left: 0;
+}
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 76dcfe22a3..2d91581cf4 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -282,7 +282,7 @@ if (!empty($_EXTRA_URL))
foreach ($_EXTRA_URL as $url_param)
{
$url_param = explode('=', $url_param, 2);
- $s_hidden_fields[$url_param[0]] = $url_param[1];
+ $s_search_hidden_fields[$url_param[0]] = $url_param[1];
}
}
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index cb6edf8423..7cb6df3660 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -567,7 +567,7 @@ if (!empty($_EXTRA_URL))
foreach ($_EXTRA_URL as $url_param)
{
$url_param = explode('=', $url_param, 2);
- $s_hidden_fields[$url_param[0]] = $url_param[1];
+ $s_search_hidden_fields[$url_param[0]] = $url_param[1];
}
}
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 63e6f4b280..3544c66c3d 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -10,27 +10,11 @@
define('IN_PHPBB', true);
$phpbb_root_path = 'phpBB/';
$phpEx = 'php';
-$table_prefix = 'phpbb_';
-
-if (!defined('E_DEPRECATED'))
-{
- define('E_DEPRECATED', 8192);
-}
-error_reporting(E_ALL & ~E_DEPRECATED);
-
-// If we are on PHP >= 6.0.0 we do not need some code
-if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
-{
- define('STRIP', false);
-}
-else
-{
- @set_magic_quotes_runtime(0);
- define('STRIP', (get_magic_quotes_gpc()) ? true : false);
-}
+require_once $phpbb_root_path . 'includes/startup.php';
require_once $phpbb_root_path . 'vendor/.composer/autoload.php';
+$table_prefix = 'phpbb_';
require_once $phpbb_root_path . 'includes/constants.php';
require_once $phpbb_root_path . 'includes/class_loader.' . $phpEx;
diff --git a/tests/dbal/select_test.php b/tests/dbal/select_test.php
index 05b0e68e29..21b12777dc 100644
--- a/tests/dbal/select_test.php
+++ b/tests/dbal/select_test.php
@@ -357,4 +357,29 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
$this->assertSame(false, $row);
}
+
+ public function test_get_row_count()
+ {
+ $this->assertSame(
+ 3,
+ (int) $this->new_dbal()->get_row_count('phpbb_users'),
+ "Failed asserting that user table has exactly 3 rows."
+ );
+ }
+
+ public function test_get_estimated_row_count()
+ {
+ $actual = $this->new_dbal()->get_estimated_row_count('phpbb_users');
+
+ if (is_string($actual) && isset($actual[0]) && $actual[0] === '~')
+ {
+ $actual = substr($actual, 1);
+ }
+
+ $this->assertGreaterThan(
+ 1,
+ $actual,
+ "Failed asserting that estimated row count of user table is greater than 1."
+ );
+ }
}
diff --git a/tests/extension/ext/foo/type/dummy/empty.txt b/tests/extension/ext/foo/type/dummy/empty.txt
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/extension/fixtures/extensions.xml b/tests/extension/fixtures/extensions.xml
index 65cb71c7a4..6eb6fd11a5 100644
--- a/tests/extension/fixtures/extensions.xml
+++ b/tests/extension/fixtures/extensions.xml
@@ -3,13 +3,16 @@
ext_name
ext_active
+ ext_state
foo
1
+
vendor/moo
0
+
diff --git a/tests/group_positions/fixtures/group_positions.xml b/tests/group_positions/fixtures/group_positions.xml
index 55b1c2e08d..00ea18fe4f 100644
--- a/tests/group_positions/fixtures/group_positions.xml
+++ b/tests/group_positions/fixtures/group_positions.xml
@@ -4,20 +4,24 @@
group_id
group_teampage
group_legend
+ group_desc
1
0
0
+
2
1
0
+
3
2
1
+
diff --git a/tests/template/template_inheritance_test.php b/tests/template/template_inheritance_test.php
index 3a03de6427..6987ae6c73 100644
--- a/tests/template/template_inheritance_test.php
+++ b/tests/template/template_inheritance_test.php
@@ -62,15 +62,18 @@ class phpbb_template_template_inheritance_test extends phpbb_template_template_t
$this->run_template($file, $vars, $block_vars, $destroy, $expected, $cache_file);
}
- protected function setup_engine()
+ protected function setup_engine(array $new_config = array())
{
- global $phpbb_root_path, $phpEx, $config, $user;
+ global $phpbb_root_path, $phpEx, $user;
+
+ $defaults = $this->config_defaults();
+ $config = new phpbb_config(array_merge($defaults, $new_config));
$this->template_path = dirname(__FILE__) . '/templates';
$this->parent_template_path = dirname(__FILE__) . '/parent_templates';
$this->template_locator = new phpbb_template_locator();
$this->template_provider = new phpbb_template_path_provider();
$this->template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $this->template_locator, $this->template_provider);
- $this->template->set_custom_template($this->template_path, 'tests', $this->parent_template_path);
+ $this->template->set_custom_template($this->template_path, 'tests', $this->parent_template_path, 'parent');
}
}
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 419c90bd2a..76b1af68d8 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -347,6 +347,42 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
$this->assertEquals($expected, $this->display('container'), "Testing assign_display($file)");
}
+ public function test_append_var_without_assign_var()
+ {
+ $this->template->set_filenames(array(
+ 'append_var' => 'variable.html'
+ ));
+
+ $items = array('This ', 'is ', 'a ', 'test');
+ $expecting = implode('', $items);
+
+ foreach ($items as $word)
+ {
+ $this->template->append_var('VARIABLE', $word);
+ }
+
+ $this->assertEquals($expecting, $this->display('append_var'));
+ }
+
+ public function test_append_var_with_assign_var()
+ {
+ $this->template->set_filenames(array(
+ 'append_var' => 'variable.html'
+ ));
+
+ $start = 'This ';
+ $items = array('is ', 'a ', 'test');
+ $expecting = $start . implode('', $items);
+
+ $this->template->assign_var('VARIABLE', $start);
+ foreach ($items as $word)
+ {
+ $this->template->append_var('VARIABLE', $word);
+ }
+
+ $this->assertEquals($expecting, $this->display('append_var'));
+ }
+
public function test_php()
{
$this->setup_engine(array('tpl_allow_php' => true));
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index a78837516b..5b60785fee 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -46,15 +46,20 @@ class phpbb_template_template_test_case extends phpbb_test_case
return str_replace("\n\n", "\n", implode("\n", array_map('trim', explode("\n", trim($result)))));
}
- protected function setup_engine(array $new_config = array())
+ protected function config_defaults()
{
- global $phpbb_root_path, $phpEx, $user;
-
$defaults = array(
'load_tplcompile' => true,
'tpl_allow_php' => false,
);
+ return $defaults;
+ }
+ protected function setup_engine(array $new_config = array())
+ {
+ global $phpbb_root_path, $phpEx, $user;
+
+ $defaults = $this->config_defaults();
$config = new phpbb_config(array_merge($defaults, $new_config));
$this->template_path = dirname(__FILE__) . '/templates';
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index ca52d24b7e..b5e6f7e377 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -102,8 +102,7 @@ class phpbb_functional_test_case extends phpbb_test_case
'admin_name' => 'admin',
'admin_pass1' => 'admin',
'admin_pass2' => 'admin',
- 'board_email1' => 'nobody@example.com',
- 'board_email2' => 'nobody@example.com',
+ 'board_email' => 'nobody@example.com',
));
$parseURL = parse_url(self::$config['phpbb_functional_url']);