aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/styles/prosilver/template/memberlist_im.html2
-rw-r--r--phpBB/styles/prosilver/template/memberlist_view.html2
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html4
-rw-r--r--phpBB/styles/prosilver/template/simple_header.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage.html2
-rw-r--r--phpBB/styles/prosilver/template/viewonline_whois.html8
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html6
-rw-r--r--phpBB/styles/prosilver/theme/common.css4
-rw-r--r--tests/console/config/config_test.php251
9 files changed, 262 insertions, 19 deletions
diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html
index 4fb383a0ba..bc71aa0969 100644
--- a/phpBB/styles/prosilver/template/memberlist_im.html
+++ b/phpBB/styles/prosilver/template/memberlist_im.html
@@ -1,6 +1,6 @@
<!-- INCLUDE simple_header.html -->
-<h2 class="solo">{L_SEND_IM}</h2>
+<h2>{L_SEND_IM}</h2>
<form method="post" action="{S_IM_ACTION}">
diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html
index 55fcbe23ba..eb151af8df 100644
--- a/phpBB/styles/prosilver/template/memberlist_view.html
+++ b/phpBB/styles/prosilver/template/memberlist_view.html
@@ -65,7 +65,7 @@
<dl class="details">
<!-- IF U_EMAIL --><dt>{L_EMAIL_ADDRESS}{L_COLON}</dt> <dd><a href="{U_EMAIL}">{L_SEND_EMAIL_USER}</a></dd><!-- ENDIF -->
<!-- IF U_PM --><dt>{L_PM}{L_COLON}</dt> <dd><a href="{U_PM}">{L_SEND_PRIVATE_MESSAGE}</a></dd><!-- ENDIF -->
- <!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}{L_COLON}</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 550, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}{L_COLON}</dt> <dd>{USER_JABBER}</dd><!-- ENDIF -->
+ <!-- IF U_JABBER and S_JABBER_ENABLED --><dt>{L_JABBER}{L_COLON}</dt> <dd><a href="{U_JABBER}" onclick="popup(this.href, 750, 320); return false;">{L_SEND_JABBER_MESSAGE}</a></dd><!-- ELSEIF USER_JABBER --><dt>{L_JABBER}{L_COLON}</dt> <dd>{USER_JABBER}</dd><!-- ENDIF -->
<!-- BEGIN custom_fields -->
<!-- IF custom_fields.S_PROFILE_CONTACT -->
<dt>{custom_fields.PROFILE_FIELD_NAME}{L_COLON}</dt>
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index 25e3be3bcb..333e61008e 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -43,7 +43,7 @@
<!-- END smiley -->
<!-- ENDIF -->
<!-- IF S_SHOW_SMILEY_LINK and S_SMILIES_ALLOWED-->
- <br /><a href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>
+ <br /><a href="{U_MORE_SMILIES}" onclick="popup(this.href, 750, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>
<!-- ENDIF -->
<!-- IF BBCODE_STATUS -->
@@ -107,7 +107,7 @@
<a href="#tabs" data-subpanel="attach-panel" role="tab" aria-controls="attach-panel">
{L_ATTACHMENTS} <strong id="file-total-progress"><strong id="file-total-progress-bar"></strong></strong>
</a>
- </li>
+ </li>
<!-- ENDIF -->
<!-- IF S_SHOW_POLL_BOX || S_POLL_DELETE -->
<li id="poll-panel-tab" class="tab">
diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html
index 0831d5f9dc..610e5d5582 100644
--- a/phpBB/styles/prosilver/template/simple_header.html
+++ b/phpBB/styles/prosilver/template/simple_header.html
@@ -36,6 +36,6 @@
<!-- EVENT simple_header_body_before -->
-<div id="simple-wrap">
+<div id="wrap">
<a id="top" class="anchor" accesskey="t"></a>
<div id="page-body">
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
index 941541c582..1d0b7916d9 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
@@ -55,7 +55,7 @@
<!-- IF REMAINDER eq 0 -->
<div>
<!-- ENDIF -->
- <a href="<!-- IF contact.U_CONTACT -->{contact.U_CONTACT}<!-- ELSE -->{contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF contact.ID eq 'jabber' --> onclick="popup(this.href, 550, 320); return false;"<!-- ENDIF -->>
+ <a href="<!-- IF contact.U_CONTACT -->{contact.U_CONTACT}<!-- ELSE -->{contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF contact.ID eq 'jabber' --> onclick="popup(this.href, 750, 320); return false;"<!-- ENDIF -->>
<span class="contact-icon {contact.ID}-icon">{contact.NAME}</span>
</a>
<!-- IF REMAINDER eq 3 or contact.S_LAST_ROW -->
diff --git a/phpBB/styles/prosilver/template/viewonline_whois.html b/phpBB/styles/prosilver/template/viewonline_whois.html
index 031f18afdc..5d780490da 100644
--- a/phpBB/styles/prosilver/template/viewonline_whois.html
+++ b/phpBB/styles/prosilver/template/viewonline_whois.html
@@ -1,14 +1,10 @@
<!-- INCLUDE simple_header.html -->
-<h2 class="whois-title">{L_WHOIS}</h2>
+<h2>{L_WHOIS}</h2>
<div class="panel">
<div class="inner">
-
- <div class="postbody"><div class="content">
- <pre>{WHOIS}</pre>
- </div></div>
-
+ <pre>{WHOIS}</pre>
</div>
</div>
<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index ac9c9a362a..04529096c9 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -51,7 +51,7 @@
<!-- IF .pagination or TOTAL_POSTS -->
<div class="pagination">
- <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}" class="mark">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
+ <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}" class="mark">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
@@ -169,7 +169,7 @@
<!-- IF REMAINDER eq 0 -->
<div>
<!-- ENDIF -->
- <a href="<!-- IF postrow.contact.U_CONTACT -->{postrow.contact.U_CONTACT}<!-- ELSE -->{postrow.contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{postrow.contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF postrow.contact.ID eq 'jabber' --> onclick="popup(this.href, 550, 320); return false;"<!-- ENDIF -->>
+ <a href="<!-- IF postrow.contact.U_CONTACT -->{postrow.contact.U_CONTACT}<!-- ELSE -->{postrow.contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{postrow.contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF postrow.contact.ID eq 'jabber' --> onclick="popup(this.href, 750, 320); return false;"<!-- ENDIF -->>
<span class="contact-icon {postrow.contact.ID}-icon">{postrow.contact.NAME}</span>
</a>
<!-- IF REMAINDER eq 3 or postrow.contact.S_LAST_ROW -->
@@ -361,7 +361,7 @@
<!-- IF .pagination or TOTAL_POSTS -->
<div class="pagination">
- {TOTAL_POSTS}
+ {TOTAL_POSTS}
<!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
<!-- ELSE -->
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index a9d9b5b01f..84701cc061 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -189,10 +189,6 @@ ol ol ul, ol ul ul, ul ol ul, ul ul ul {
}
}
-#simple-wrap {
- padding: 6px 0;
-}
-
#page-body {
margin: 4px 0;
clear: both;
diff --git a/tests/console/config/config_test.php b/tests/console/config/config_test.php
new file mode 100644
index 0000000000..7c098af004
--- /dev/null
+++ b/tests/console/config/config_test.php
@@ -0,0 +1,251 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Tester\CommandTester;
+
+class phpbb_console_command_config_test extends phpbb_test_case
+{
+ protected $config;
+ protected $command_name;
+ protected $user;
+
+ public function setUp()
+ {
+ $this->config = new \phpbb\config\config(array());
+
+ $this->user = $this->getMock('\phpbb\user', array(), array('\phpbb\datetime'));
+ $this->user->method('lang')->will($this->returnArgument(0));
+ }
+
+ public function test_set_dynamic()
+ {
+ $this->assertEmpty($this->config);
+
+ $command_tester = $this->get_command_tester('set');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ 'value' => 'test_value',
+ '--dynamic' => true,
+ ));
+
+ $this->assertSame($this->config['test_key'], 'test_value');
+ }
+
+ public function test_set_no_dynamic()
+ {
+ $this->assertEmpty($this->config);
+
+ $command_tester = $this->get_command_tester('set');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ 'value' => 'test_value',
+ '--dynamic' => false,
+ ));
+
+ $this->assertSame($this->config['test_key'], 'test_value');
+ }
+
+ public function test_set_atomic_dynamic()
+ {
+ $this->assertEmpty($this->config);
+
+ $this->config->set('test_key', 'old_value', true);
+ $this->assertSame($this->config['test_key'], 'old_value');
+
+ $command_tester = $this->get_command_tester('set_atomic');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ 'old' => 'old_value',
+ 'new' => 'new_value',
+ '--dynamic' => true,
+ ));
+
+ $this->assertSame($this->config['test_key'], 'new_value');
+ }
+
+ public function test_set_atomic_no_dynamic()
+ {
+ $this->assertEmpty($this->config);
+
+ $this->config->set('test_key', 'old_value', false);
+ $this->assertSame($this->config['test_key'], 'old_value');
+
+ $command_tester = $this->get_command_tester('set_atomic');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ 'old' => 'old_value',
+ 'new' => 'new_value',
+ '--dynamic' => false,
+ ));
+
+ $this->assertSame($this->config['test_key'], 'new_value');
+ }
+
+ public function test_set_atomic_error_dynamic()
+ {
+ $this->assertEmpty($this->config);
+
+ $this->config->set('test_key', 'wrong_value', true);
+ $this->assertSame($this->config['test_key'], 'wrong_value');
+
+ $command_tester = $this->get_command_tester('set_atomic');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ 'old' => 'old_value',
+ 'new' => 'new_value',
+ '--dynamic' => true,
+ ));
+
+ $this->assertSame($this->config['test_key'], 'wrong_value');
+ }
+
+ public function test_get_no_new_line()
+ {
+ $this->config->set('test_key', 'test_value', false);
+ $this->assertSame($this->config['test_key'], 'test_value');
+
+ $command_tester = $this->get_command_tester('get');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ '--no-newline' => true,
+ ));
+
+ $this->assertSame($this->config['test_key'], $command_tester->getDisplay());
+ }
+
+ public function test_get_new_line()
+ {
+ $this->config->set('test_key', 'test_value', false);
+ $this->assertSame($this->config['test_key'], 'test_value');
+
+ $command_tester = $this->get_command_tester('get');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ '--no-newline' => false,
+ ));
+
+ $this->assertSame($this->config['test_key'] . PHP_EOL, $command_tester->getDisplay());
+ }
+
+ public function test_get_error()
+ {
+ $this->config->set('test_key', 'test_value', false);
+ $this->assertSame($this->config['test_key'], 'test_value');
+
+ $command_tester = $this->get_command_tester('get');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'wrong_key',
+ '--no-newline' => false,
+ ));
+
+ $this->assertContains('CLI_CONFIG_NOT_EXISTS', $command_tester->getDisplay());
+ }
+
+ public function test_increment_dynamic()
+ {
+ $this->config->set('test_key', 0, false);
+ $this->assertSame($this->config['test_key'], 0);
+
+ $command_tester = $this->get_command_tester('increment');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ 'increment' => 2,
+ '--dynamic' => true,
+ ));
+
+ $this->assertContains('CLI_CONFIG_INCREMENT_SUCCESS', $command_tester->getDisplay());
+ $this->assertSame(2, $this->config['test_key']);
+ }
+
+ public function test_increment_no_dynamic()
+ {
+ $this->config->set('test_key', 0, false);
+ $this->assertSame($this->config['test_key'], 0);
+
+ $command_tester = $this->get_command_tester('increment');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ 'increment' => 2,
+ '--dynamic' => false,
+ ));
+
+ $this->assertContains('CLI_CONFIG_INCREMENT_SUCCESS', $command_tester->getDisplay());
+ $this->assertSame(2, $this->config['test_key']);
+ }
+
+ public function test_increment_no_set()
+ {
+ $this->assertEmpty($this->config);
+
+ $command_tester = $this->get_command_tester('increment');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ 'increment' => 2,
+ '--dynamic' => true,
+ ));
+
+ $this->assertContains('CLI_CONFIG_INCREMENT_SUCCESS', $command_tester->getDisplay());
+ $this->assertSame(2, $this->config['test_key']);
+ }
+
+ public function test_delete_ok()
+ {
+ $this->config->set('test_key', 'test_value', false);
+ $this->assertSame($this->config['test_key'], 'test_value');
+
+ $command_tester = $this->get_command_tester('delete');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'test_key',
+ ));
+
+ $this->assertContains('CLI_CONFIG_DELETE_SUCCESS', $command_tester->getDisplay());
+ $this->assertEmpty($this->config);
+ }
+
+ public function test_delete_error()
+ {
+ $this->assertEmpty($this->config);
+
+ $command_tester = $this->get_command_tester('delete');
+ $command_tester->execute(array(
+ 'command' => $this->command_name,
+ 'key' => 'wrong_key',
+ ));
+
+ $this->assertContains('CLI_CONFIG_NOT_EXISTS', $command_tester->getDisplay());
+ $this->assertEmpty($this->config);
+ }
+
+ public function get_command_tester($class_name)
+ {
+ $command_complete_name = '\phpbb\console\command\config' . '\\' . $class_name;
+ $application = new Application();
+ $application->add(new $command_complete_name($this->user, $this->config));
+ $command = $application->find('config:' . $this->command_name);
+ $this->command_name = $command->getName();
+ return new CommandTester($command);
+ }
+}