aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_attachments.html22
-rw-r--r--phpBB/adm/style/acp_logs.html10
-rw-r--r--phpBB/adm/style/acp_users.html10
-rw-r--r--phpBB/adm/style/admin.css5
-rw-r--r--phpBB/config/services.yml15
-rw-r--r--phpBB/includes/acp/acp_attachments.php2
-rw-r--r--phpBB/includes/functions_url_matcher.php22
-rw-r--r--phpBB/language/en/common.php9
-rw-r--r--phpBB/phpbb/controller/helper.php6
-rw-r--r--phpBB/phpbb/controller/provider.php26
-rw-r--r--phpBB/phpbb/event/kernel_request_subscriber.php15
-rw-r--r--phpBB/phpbb/feed/news.php7
-rw-r--r--phpBB/phpbb/feed/post_base.php3
-rw-r--r--phpBB/phpbb/feed/topic_base.php21
-rw-r--r--phpBB/phpbb/feed/topics.php7
-rw-r--r--phpBB/phpbb/feed/topics_active.php7
-rw-r--r--phpBB/styles/prosilver/template/posting_attach_body.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_attachments.html2
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html4
-rw-r--r--phpBB/styles/prosilver/theme/content.css11
-rw-r--r--phpBB/styles/prosilver/theme/plupload.css5
-rw-r--r--phpBB/styles/prosilver/theme/tweaks.css5
-rw-r--r--tests/controller/controller_test.php3
-rw-r--r--tests/controller/helper_route_test.php28
-rw-r--r--tests/functional/feed_test.php31
-rw-r--r--tests/functional/visibility_softdelete_test.php2
-rw-r--r--tests/mock/controller_helper.php22
-rw-r--r--tests/pagination/pagination_test.php8
28 files changed, 183 insertions, 129 deletions
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index 5d35666fdd..0e3b5ff3b2 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -331,15 +331,15 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
- <table class="table1 zebra-table">
+ <table class="table1 zebra-table fixed-width-table">
<thead>
<tr>
<th>{L_FILENAME}</th>
- <th>{L_FILEDATE}</th>
- <th>{L_FILESIZE}</th>
- <th>{L_ATTACH_POST_ID}</th>
- <th>{L_ATTACH_TO_POST}</th>
- <th>{L_DELETE}</th>
+ <th style="width: 15%;">{L_FILEDATE}</th>
+ <th style="width: 15%;">{L_FILESIZE}</th>
+ <th style="width: 15%;">{L_ATTACH_POST_ID}</th>
+ <th style="width: 15%;">{L_ATTACH_TO_POST}</th>
+ <th style="width: 15%;">{L_DELETE}</th>
</tr>
</thead>
<tbody>
@@ -348,7 +348,7 @@
<td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td>
<td>{orphan.FILETIME}</td>
<td>{orphan.FILESIZE}</td>
- <td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" name="post_id[{orphan.ATTACH_ID}]" size="7" maxlength="10" value="{orphan.POST_ID}" /></td>
+ <td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" name="post_id[{orphan.ATTACH_ID}]" maxlength="10" value="{orphan.POST_ID}" style="width: 75%;" /></td>
<td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td>
<td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td>
</tr>
@@ -390,13 +390,13 @@
</div>
<!-- IF .attachments -->
- <table class="table1 zebra-table">
+ <table class="table1 zebra-table fixed-width-table">
<thead>
<tr>
<th>{L_FILENAME}</th>
- <th>{L_POSTED}</th>
- <th class="centered-text">{L_FILESIZE}</th>
- <th class="centered-text">{L_MARK}</th>
+ <th style="width: 15%;">{L_POSTED}</th>
+ <th style="width: 15%;" class="centered-text">{L_FILESIZE}</th>
+ <th style="width: 10%;" class="centered-text">{L_MARK}</th>
</tr>
</thead>
<tbody>
diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html
index 9343b9b509..ec2065f906 100644
--- a/phpBB/adm/style/acp_logs.html
+++ b/phpBB/adm/style/acp_logs.html
@@ -22,15 +22,15 @@
<div><br style="clear: both;" /></div>
<!-- IF .log -->
- <table class="table1 zebra-table">
+ <table class="table1 zebra-table fixed-width-table">
<thead>
<tr>
- <th>{L_USERNAME}</th>
- <th>{L_IP}</th>
- <th>{L_TIME}</th>
+ <th style="width: 15%;">{L_USERNAME}</th>
+ <th style="width: 15%;">{L_IP}</th>
+ <th style="width: 20%;">{L_TIME}</th>
<th>{L_ACTION}</th>
<!-- IF S_CLEARLOGS -->
- <th>{L_MARK}</th>
+ <th style="width: 50px;">{L_MARK}</th>
<!-- ENDIF -->
</tr>
</thead>
diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html
index b84e32013f..25064c6f3a 100644
--- a/phpBB/adm/style/acp_users.html
+++ b/phpBB/adm/style/acp_users.html
@@ -164,14 +164,14 @@
</div>
<!-- IF .attach -->
- <table class="table1 zebra-table">
+ <table class="table1 zebra-table fixed-width-table">
<thead>
<tr>
<th>{L_FILENAME}</th>
- <th>{L_POST_TIME}</th>
- <th>{L_FILESIZE}</th>
- <th>{L_DOWNLOADS}</th>
- <th>{L_MARK}</th>
+ <th style="width: 20%;">{L_POST_TIME}</th>
+ <th style="width: 20%;">{L_FILESIZE}</th>
+ <th style="width: 20%;">{L_DOWNLOADS}</th>
+ <th style="width: 50px;">{L_MARK}</th>
</tr>
</thead>
<tbody>
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index 6f2d65afc0..60a5cd9472 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -911,6 +911,11 @@ table.styles td.users, table td.mark {
text-align: center;
}
+table.fixed-width-table {
+ table-layout: fixed;
+ word-break: break-word;
+}
+
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
{
table.responsive, table.responsive tbody, table.responsive tr, table.responsive td {
diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml
index 90a2f3b187..fdd8a33135 100644
--- a/phpBB/config/services.yml
+++ b/phpBB/config/services.yml
@@ -95,6 +95,7 @@ services:
- @user
- @config
- @controller.provider
+ - @ext.manager
- %core.root_path%
- %core.php_ext%
@@ -107,8 +108,6 @@ services:
controller.provider:
class: phpbb\controller\provider
- arguments:
- - @ext.finder
calls:
- [find, [%core.root_path%]]
@@ -175,16 +174,6 @@ services:
- %core.php_ext%
- @cache.driver
- ext.finder:
- class: phpbb\extension\finder
- arguments:
- - @ext.manager
- - @filesystem
- - %core.root_path%
- - @cache.driver
- - %core.php_ext%
- - _ext_finder
-
filesystem:
class: phpbb\filesystem
@@ -217,7 +206,7 @@ services:
kernel_request_subscriber:
class: phpbb\event\kernel_request_subscriber
arguments:
- - @ext.finder
+ - @ext.manager
- %core.root_path%
- %core.php_ext%
tags:
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 1aaf1f9c09..03d3e0f85f 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -1222,7 +1222,7 @@ class acp_attachments
'ATTACHMENT_POSTER' => get_username_string('full', (int) $row['poster_id'], (string) $row['username'], (string) $row['user_colour'], (string) $row['username']),
'FILESIZE' => get_formatted_filesize((int) $row['filesize']),
'FILETIME' => $user->format_date((int) $row['filetime']),
- 'REAL_FILENAME' => (!$row['in_message']) ? utf8_wordwrap(utf8_basename((string) $row['real_filename']), 40, '<br />', true) : '',
+ 'REAL_FILENAME' => (!$row['in_message']) ? utf8_basename((string) $row['real_filename']) : '',
'PHYSICAL_FILENAME' => utf8_basename((string) $row['physical_filename']),
'EXT_GROUP_NAME' => (!empty($extensions[$row['extension']]['group_name'])) ? $user->lang['EXT_GROUP_' . $extensions[$row['extension']]['group_name']] : '',
'COMMENT' => $comment,
diff --git a/phpBB/includes/functions_url_matcher.php b/phpBB/includes/functions_url_matcher.php
index 8e5ae20f93..cdbe60595c 100644
--- a/phpBB/includes/functions_url_matcher.php
+++ b/phpBB/includes/functions_url_matcher.php
@@ -22,22 +22,22 @@ if (!defined('IN_PHPBB'))
/**
* Create a new UrlMatcher class and dump it into the cache file
*
-* @param \phpbb\extension\finder $finder Extension finder
+* @param \phpbb\extension\manager $manager Extension manager
* @param RequestContext $context Symfony RequestContext object
* @param string $root_path Root path
* @param string $php_ext PHP extension
* @return null
*/
-function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $context, $root_path, $php_ext)
+function phpbb_get_url_matcher(\phpbb\extension\manager $manager, RequestContext $context, $root_path, $php_ext)
{
if (defined('DEBUG'))
{
- return phpbb_create_url_matcher($finder, $context, $root_path);
+ return phpbb_create_url_matcher($manager, $context, $root_path);
}
if (!phpbb_url_matcher_dumped($root_path, $php_ext))
{
- phpbb_create_dumped_url_matcher($finder, $root_path, $php_ext);
+ phpbb_create_dumped_url_matcher($manager, $root_path, $php_ext);
}
return phpbb_load_url_matcher($context, $root_path, $php_ext);
@@ -46,14 +46,15 @@ function phpbb_get_url_matcher(\phpbb\extension\finder $finder, RequestContext $
/**
* Create a new UrlMatcher class and dump it into the cache file
*
-* @param \phpbb\extension\finder $finder Extension finder
+* @param \phpbb\extension\manager $manager Extension manager
* @param string $root_path Root path
* @param string $php_ext PHP extension
* @return null
*/
-function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_path, $php_ext)
+function phpbb_create_dumped_url_matcher(\phpbb\extension\manager $manager, $root_path, $php_ext)
{
- $provider = new \phpbb\controller\provider($finder);
+ $provider = new \phpbb\controller\provider();
+ $provider->find_routing_files($manager->get_finder());
$routes = $provider->find($root_path)->get_routes();
$dumper = new PhpMatcherDumper($routes);
$cached_url_matcher_dump = $dumper->dump(array(
@@ -66,13 +67,14 @@ function phpbb_create_dumped_url_matcher(\phpbb\extension\finder $finder, $root_
/**
* Create a non-cached UrlMatcher
*
-* @param \phpbb\extension\finder $finder Extension finder
+* @param \phpbb\extension\manager $manager Extension manager
* @param RequestContext $context Symfony RequestContext object
* @return UrlMatcher
*/
-function phpbb_create_url_matcher(\phpbb\extension\finder $finder, RequestContext $context, $root_path)
+function phpbb_create_url_matcher(\phpbb\extension\manager $manager, RequestContext $context, $root_path)
{
- $provider = new \phpbb\controller\provider($finder);
+ $provider = new \phpbb\controller\provider();
+ $provider->find_routing_files($manager->get_finder());
$routes = $provider->find($root_path)->get_routes();
return new UrlMatcher($routes, $context);
}
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index aac4f2516e..7faa46daf3 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -555,7 +555,8 @@ $lang = array_merge($lang, array(
'POST_BY_FOE' => '<strong>%1$s</strong>, who is currently on your ignore list, made this post.',
'POST_DISPLAY' => '%1$sDisplay this post%2$s.',
'POST_DAY' => '%.2f posts per day',
- 'POST_DELETED' => 'Deleted post:',
+ 'POST_DELETED_ACTION' => 'Deleted post:',
+ 'POST_DELETED' => 'This post has been deleted.',
'POST_DELETED_BY' => '<strong>%2$s</strong> deleted the post by <strong>%1$s</strong> on %3$s.',
'POST_DELETED_BY_REASON'=> '<strong>%2$s</strong> deleted the post by <strong>%1$s</strong> on %3$s for the following reason: %4$s',
'POST_DETAILS' => 'Post details',
@@ -568,7 +569,8 @@ $lang = array_merge($lang, array(
'POST_SUBJECT' => 'Post subject',
'POST_TIME' => 'Post time',
'POST_TOPIC' => 'Post a new topic',
- 'POST_UNAPPROVED' => 'Post awaiting approval:',
+ 'POST_UNAPPROVED_ACTION' => 'Post awaiting approval:',
+ 'POST_UNAPPROVED' => 'This post has not been approved.',
'POWERED_BY' => 'Powered by %s',
'PREVIEW' => 'Preview',
'PREVIOUS' => 'Previous', // Used in pagination
@@ -738,7 +740,8 @@ $lang = array_merge($lang, array(
'TOPIC_MOVED' => 'Moved topic',
'TOPIC_REVIEW' => 'Topic review',
'TOPIC_TITLE' => 'Topic title',
- 'TOPIC_UNAPPROVED' => 'This topic has not been approved',
+ 'TOPIC_UNAPPROVED' => 'This topic has not been approved.',
+ 'TOPIC_DELETED' => 'This topic has been deleted.',
'TOTAL_ATTACHMENTS' => 'Attachment(s)',
'TOTAL_LOGS' => array(
1 => '%d log',
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php
index 54c30c93fc..959a24f277 100644
--- a/phpBB/phpbb/controller/helper.php
+++ b/phpBB/phpbb/controller/helper.php
@@ -56,17 +56,19 @@ class helper
* @param \phpbb\user $user User object
* @param \phpbb\config\config $config Config object
* @param \phpbb\controller\provider $provider Path provider
+ * @param \phpbb\extension\manager $manager Extension manager object
* @param string $phpbb_root_path phpBB root path
* @param string $php_ext PHP extension
*/
- public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, $phpbb_root_path, $php_ext)
+ public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, $phpbb_root_path, $php_ext)
{
$this->template = $template;
$this->user = $user;
$this->config = $config;
$this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext;
- $this->route_collection = $provider->get_routes();
+ $provider->find_routing_files($manager->get_finder());
+ $this->route_collection = $provider->find($phpbb_root_path)->get_routes();
}
/**
diff --git a/phpBB/phpbb/controller/provider.php b/phpBB/phpbb/controller/provider.php
index 2c7493f64c..a32ce1473b 100644
--- a/phpBB/phpbb/controller/provider.php
+++ b/phpBB/phpbb/controller/provider.php
@@ -37,20 +37,24 @@ class provider
* @param array() $routing_files Array of strings containing paths
* to YAML files holding route information
*/
- public function __construct(\phpbb\extension\finder $finder = null, $routing_files = array())
+ public function __construct($routing_files = array())
{
$this->routing_files = $routing_files;
+ }
- if ($finder)
- {
- // We hardcode the path to the core config directory
- // because the finder cannot find it
- $this->routing_files = array_merge($this->routing_files, array('config/routing.yml'), array_keys($finder
- ->directory('/config')
- ->suffix('routing.yml')
- ->find()
- ));
- }
+ /**
+ * @param \phpbb\extension\finder $finder
+ * @return null
+ */
+ public function find_routing_files(\phpbb\extension\finder $finder)
+ {
+ // We hardcode the path to the core config directory
+ // because the finder cannot find it
+ $this->routing_files = array_merge($this->routing_files, array('config/routing.yml'), array_keys($finder
+ ->directory('/config')
+ ->suffix('routing.yml')
+ ->find()
+ ));
}
/**
diff --git a/phpBB/phpbb/event/kernel_request_subscriber.php b/phpBB/phpbb/event/kernel_request_subscriber.php
index 7d5418498b..a39d622273 100644
--- a/phpBB/phpbb/event/kernel_request_subscriber.php
+++ b/phpBB/phpbb/event/kernel_request_subscriber.php
@@ -18,10 +18,10 @@ use Symfony\Component\Routing\RequestContext;
class kernel_request_subscriber implements EventSubscriberInterface
{
/**
- * Extension finder object
- * @var \phpbb\extension\finder
+ * Extension manager object
+ * @var \phpbb\extension\manager
*/
- protected $finder;
+ protected $manager;
/**
* PHP extension
@@ -38,15 +38,15 @@ class kernel_request_subscriber implements EventSubscriberInterface
/**
* Construct method
*
- * @param \phpbb\extension\finder $finder Extension finder object
+ * @param \phpbb\extension\manager $manager Extension manager object
* @param string $root_path Root path
* @param string $php_ext PHP extension
*/
- public function __construct(\phpbb\extension\finder $finder, $root_path, $php_ext)
+ public function __construct(\phpbb\extension\manager $manager, $root_path, $php_ext)
{
- $this->finder = $finder;
$this->root_path = $root_path;
$this->php_ext = $php_ext;
+ $this->manager = $manager;
}
/**
@@ -55,6 +55,7 @@ class kernel_request_subscriber implements EventSubscriberInterface
* This is responsible for setting up the routing information
*
* @param GetResponseEvent $event
+ * @throws \BadMethodCallException
* @return null
*/
public function on_kernel_request(GetResponseEvent $event)
@@ -63,7 +64,7 @@ class kernel_request_subscriber implements EventSubscriberInterface
$context = new RequestContext();
$context->fromRequest($request);
- $matcher = phpbb_get_url_matcher($this->finder, $context, $this->root_path, $this->php_ext);
+ $matcher = phpbb_get_url_matcher($this->manager, $context, $this->root_path, $this->php_ext);
$router_listener = new RouterListener($matcher, $context);
$router_listener->onKernelRequest($event);
}
diff --git a/phpBB/phpbb/feed/news.php b/phpBB/phpbb/feed/news.php
index 1b7c452a92..2242525db6 100644
--- a/phpBB/phpbb/feed/news.php
+++ b/phpBB/phpbb/feed/news.php
@@ -64,9 +64,8 @@ class news extends \phpbb\feed\topic_base
// We really have to get the post ids first!
$sql = 'SELECT topic_first_post_id, topic_time
FROM ' . TOPICS_TABLE . '
- WHERE ' . $this->db->sql_in_set('forum_id', $in_fid_ary) . '
- AND topic_moved_id = 0
- AND topic_visibility = ' . ITEM_APPROVED . '
+ WHERE topic_moved_id = 0
+ AND ' . $this->content_visibility->get_forums_visibility_sql('topic', $in_fid_ary) . '
ORDER BY topic_time DESC';
$result = $this->db->sql_query_limit($sql, $this->num_items);
@@ -85,7 +84,7 @@ class news extends \phpbb\feed\topic_base
$this->sql = array(
'SELECT' => 'f.forum_id, f.forum_name,
t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_views, t.topic_time, t.topic_last_post_time,
- p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment',
+ p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, t.topic_visibility',
'FROM' => array(
TOPICS_TABLE => 't',
POSTS_TABLE => 'p',
diff --git a/phpBB/phpbb/feed/post_base.php b/phpBB/phpbb/feed/post_base.php
index de98f446f3..cfcd8671a3 100644
--- a/phpBB/phpbb/feed/post_base.php
+++ b/phpBB/phpbb/feed/post_base.php
@@ -46,7 +46,8 @@ abstract class post_base extends \phpbb\feed\attachments_base
{
$item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
. ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
- . (($this->is_moderator_approve_forum($row['forum_id']) && $row['post_visibility'] !== ITEM_APPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : '');
+ . (($this->is_moderator_approve_forum($row['forum_id']) && (int)$row['post_visibility'] === ITEM_UNAPPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : '')
+ . (($this->is_moderator_approve_forum($row['forum_id']) && (int)$row['post_visibility'] === ITEM_DELETED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_DELETED'] : '');
}
}
}
diff --git a/phpBB/phpbb/feed/topic_base.php b/phpBB/phpbb/feed/topic_base.php
index e8639a6fa6..d25bd0b50f 100644
--- a/phpBB/phpbb/feed/topic_base.php
+++ b/phpBB/phpbb/feed/topic_base.php
@@ -45,9 +45,24 @@ abstract class topic_base extends \phpbb\feed\attachments_base
{
$item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
. ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
- . ' ' . $this->separator_stats . ' ' . $this->user->lang['REPLIES'] . ' ' . $this->content_visibility->get_count('topic_posts', $row, $row['forum_id']) - 1
- . ' ' . $this->separator_stats . ' ' . $this->user->lang['VIEWS'] . ' ' . $row['topic_views']
- . (($this->is_moderator_approve_forum($row['forum_id']) && $row['topic_posts_unapproved']) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POSTS_UNAPPROVED'] : '');
+ . ' ' . $this->separator_stats . ' ' . $this->user->lang['REPLIES'] . ' ' . ($this->content_visibility->get_count('topic_posts', $row, $row['forum_id']) - 1)
+ . ' ' . $this->separator_stats . ' ' . $this->user->lang['VIEWS'] . ' ' . $row['topic_views'];
+
+ if ($this->is_moderator_approve_forum($row['forum_id']))
+ {
+ if ( (int)$row['topic_visibility'] === ITEM_DELETED)
+ {
+ $item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_DELETED'];
+ }
+ else if ((int)$row['topic_visibility'] === ITEM_UNAPPROVED)
+ {
+ $item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_UNAPPROVED'];
+ }
+ else if ($row['topic_posts_unapproved'])
+ {
+ $item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['POSTS_UNAPPROVED'];
+ }
+ }
}
}
}
diff --git a/phpBB/phpbb/feed/topics.php b/phpBB/phpbb/feed/topics.php
index e8b9f6de6c..b6d9ec7cc6 100644
--- a/phpBB/phpbb/feed/topics.php
+++ b/phpBB/phpbb/feed/topics.php
@@ -36,9 +36,8 @@ class topics extends \phpbb\feed\topic_base
// We really have to get the post ids first!
$sql = 'SELECT topic_first_post_id, topic_time
FROM ' . TOPICS_TABLE . '
- WHERE ' . $this->db->sql_in_set('forum_id', $in_fid_ary) . '
- AND topic_moved_id = 0
- AND topic_visibility = ' . ITEM_APPROVED . '
+ WHERE topic_moved_id = 0
+ AND ' . $this->content_visibility->get_forums_visibility_sql('topic', $in_fid_ary) . '
ORDER BY topic_time DESC';
$result = $this->db->sql_query_limit($sql, $this->num_items);
@@ -57,7 +56,7 @@ class topics extends \phpbb\feed\topic_base
$this->sql = array(
'SELECT' => 'f.forum_id, f.forum_name,
t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_views, t.topic_time, t.topic_last_post_time,
- p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment',
+ p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, t.topic_visibility',
'FROM' => array(
TOPICS_TABLE => 't',
POSTS_TABLE => 'p',
diff --git a/phpBB/phpbb/feed/topics_active.php b/phpBB/phpbb/feed/topics_active.php
index 809a536c2a..c7234510fb 100644
--- a/phpBB/phpbb/feed/topics_active.php
+++ b/phpBB/phpbb/feed/topics_active.php
@@ -51,9 +51,8 @@ class topics_active extends \phpbb\feed\topic_base
// We really have to get the post ids first!
$sql = 'SELECT topic_last_post_id, topic_last_post_time
FROM ' . TOPICS_TABLE . '
- WHERE ' . $this->db->sql_in_set('forum_id', $in_fid_ary) . '
- AND topic_moved_id = 0
- AND topic_visibility = ' . ITEM_APPROVED . '
+ WHERE topic_moved_id = 0
+ AND ' . $this->content_visibility->get_forums_visibility_sql('topic', $in_fid_ary) . '
' . $last_post_time_sql . '
ORDER BY topic_last_post_time DESC';
$result = $this->db->sql_query_limit($sql, $this->num_items);
@@ -74,7 +73,7 @@ class topics_active extends \phpbb\feed\topic_base
'SELECT' => 'f.forum_id, f.forum_name,
t.topic_id, t.topic_title, t.topic_posts_approved, t.topic_posts_unapproved, t.topic_posts_softdeleted, t.topic_views,
t.topic_last_poster_id, t.topic_last_poster_name, t.topic_last_post_time,
- p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment',
+ p.post_id, p.post_time, p.post_edit_time, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, p.post_attachment, t.topic_visibility',
'FROM' => array(
TOPICS_TABLE => 't',
POSTS_TABLE => 'p',
diff --git a/phpBB/styles/prosilver/template/posting_attach_body.html b/phpBB/styles/prosilver/template/posting_attach_body.html
index b6f4d13804..4ad66656b2 100644
--- a/phpBB/styles/prosilver/template/posting_attach_body.html
+++ b/phpBB/styles/prosilver/template/posting_attach_body.html
@@ -35,7 +35,7 @@
<tbody class="responsive-skip-empty" id="file-list">
<tr class="attach-row" id="attach-row-tpl">
<td class="attach-name">
- <span class="file-name"></span>
+ <span class="file-name ellipsis-text"></span>
<span class="attach-controls">
<input type="button" value="{L_PLACE_INLINE}" class="button2 hidden file-inline-bbcode" />&nbsp;
<input type="button" value="{L_DELETE_FILE}" class="button2 file-delete" />
@@ -58,7 +58,7 @@
<!-- BEGIN attach_row -->
<tr class="attach-row" data-attach-id="{attach_row.ATTACH_ID}">
<td class="attach-name">
- <span class="file-name"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span>
+ <span class="file-name ellipsis-text"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span>
<span class="attach-controls">
<!-- IF S_INLINE_ATTACHMENT_OPTIONS --><input type="button" value="{L_PLACE_INLINE}" class="button2 file-inline-bbcode" />&nbsp; <!-- ENDIF -->
<input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button2 file-delete" />
diff --git a/phpBB/styles/prosilver/template/ucp_attachments.html b/phpBB/styles/prosilver/template/ucp_attachments.html
index ed39e80c12..4731683a80 100644
--- a/phpBB/styles/prosilver/template/ucp_attachments.html
+++ b/phpBB/styles/prosilver/template/ucp_attachments.html
@@ -38,7 +38,7 @@
<dl>
<dt>
<div class="list-inner">
- <a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br />
+ <a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle attachment-filename ellipsis-text" title="{attachrow.FILENAME}">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br />
<!-- IF attachrow.S_IN_MESSAGE -->{L_PM}{L_COLON} <!-- ELSE -->{L_TOPIC}{L_COLON} <!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a>
</div>
</dt>
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index ed45835da6..6adb690391 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -214,7 +214,7 @@
<!-- IF postrow.S_POST_UNAPPROVED -->
<form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}">
<p class="post-notice unapproved">
- <strong>{L_POST_UNAPPROVED}</strong>
+ <strong>{L_POST_UNAPPROVED_ACTION}</strong>
<input class="button2" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" />
<input class="button1" type="submit" value="{L_APPROVE}" name="action[approve]" />
<input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
@@ -224,7 +224,7 @@
<!-- ELSEIF postrow.S_POST_DELETED -->
<form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}">
<p class="post-notice deleted">
- <strong>{L_POST_DELETED}</strong>
+ <strong>{L_POST_DELETED_ACTION}</strong>
<input class="button2" type="submit" value="{L_DELETE}" name="action[disapprove]" />
<input class="button1" type="submit" value="{L_RESTORE}" name="action[restore]" />
<input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index dc6ab9aef3..db752d7068 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -793,6 +793,17 @@ div.dl_links {
display: inline-block;
}
+.attachment-filename {
+ width: 100%;
+}
+
+.ellipsis-text {
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
/* Show scrollbars for items with overflow on iOS devices
----------------------------------------*/
.postbody .content::-webkit-scrollbar, #topicreview::-webkit-scrollbar, #post_details::-webkit-scrollbar, .codebox code::-webkit-scrollbar, .attachbox dd::-webkit-scrollbar, .attach-image::-webkit-scrollbar, .dropdown-extended ul::-webkit-scrollbar {
diff --git a/phpBB/styles/prosilver/theme/plupload.css b/phpBB/styles/prosilver/theme/plupload.css
index 8569eca662..f81064dbe6 100644
--- a/phpBB/styles/prosilver/theme/plupload.css
+++ b/phpBB/styles/prosilver/theme/plupload.css
@@ -74,3 +74,8 @@
height: 16px;
width: 16px;
}
+
+.file-name {
+ max-width: 65%;
+ vertical-align: bottom;
+}
diff --git a/phpBB/styles/prosilver/theme/tweaks.css b/phpBB/styles/prosilver/theme/tweaks.css
index 456bbf3479..9a8ed5d399 100644
--- a/phpBB/styles/prosilver/theme/tweaks.css
+++ b/phpBB/styles/prosilver/theme/tweaks.css
@@ -66,3 +66,8 @@ dd.option {
.icon-notification {
*z-index: 2;
}
+
+/* Fixes header-avatar aspect-ratio in IE8 */
+.header-avatar img {
+ height: 25px;
+}
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index 7d9fe652eb..7b8b78dd22 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -29,7 +29,8 @@ class phpbb_controller_controller_test extends phpbb_test_case
public function test_provider()
{
- $provider = new \phpbb\controller\provider($this->extension_manager->get_finder());
+ $provider = new \phpbb\controller\provider();
+ $provider->find_routing_files($this->extension_manager->get_finder());
$routes = $provider->find(__DIR__)->get_routes();
// This will need to be updated if any new routes are defined
diff --git a/tests/controller/helper_route_test.php b/tests/controller/helper_route_test.php
index 5264c788c7..ae6f924a62 100644
--- a/tests/controller/helper_route_test.php
+++ b/tests/controller/helper_route_test.php
@@ -27,23 +27,25 @@ class phpbb_controller_helper_route_test extends phpbb_test_case
);
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
$this->template = new phpbb\template\twig\twig($phpbb_path_helper, $this->config, $this->user, new \phpbb\template\context());
+ $this->extension_manager = new phpbb_mock_extension_manager(
+ dirname(__FILE__) . '/',
+ array(
+ 'vendor2/foo' => array(
+ 'ext_name' => 'vendor2/foo',
+ 'ext_active' => '1',
+ 'ext_path' => 'ext/vendor2/foo/',
+ ),
+ )
+ );
$finder = new \phpbb\extension\finder(
- new phpbb_mock_extension_manager(
- dirname(__FILE__) . '/',
- array(
- 'vendor2/foo' => array(
- 'ext_name' => 'vendor2/foo',
- 'ext_active' => '1',
- 'ext_path' => 'ext/vendor2/foo/',
- ),
- )
- ),
+ $this->extension_manager,
new \phpbb\filesystem(),
dirname(__FILE__) . '/',
new phpbb_mock_cache()
);
- $this->provider = new \phpbb\controller\provider($finder);
+ $this->provider = new \phpbb\controller\provider();
+ $this->provider->find_routing_files($finder);
$this->provider->find(dirname(__FILE__) . '/');
}
@@ -82,7 +84,7 @@ class phpbb_controller_helper_route_test extends phpbb_test_case
*/
public function test_helper_url_no_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
{
- $this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $this->provider, '', 'php');
+ $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, '', 'php', dirname(__FILE__) . '/');
$this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id));
}
@@ -122,7 +124,7 @@ class phpbb_controller_helper_route_test extends phpbb_test_case
public function test_helper_url_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
{
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1'));
- $this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $this->provider, '', 'php');
+ $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, '', 'php', dirname(__FILE__) . '/');
$this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id));
}
}
diff --git a/tests/functional/feed_test.php b/tests/functional/feed_test.php
index fbcbfa3943..b6287bf10f 100644
--- a/tests/functional/feed_test.php
+++ b/tests/functional/feed_test.php
@@ -480,7 +480,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_create_softdelete_post()
{
- $this->markTestIncomplete('Softdeleted posts/topics are not marked in feeds yet, see PHPBB3-12460');
$this->login();
$this->load_ids(array(
'forums' => array(
@@ -504,7 +503,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_softdelete_post()
{
- $this->markTestIncomplete('Softdeleted posts/topics are not marked in feeds yet, see PHPBB3-12460');
$this->login();
$this->load_ids(array(
'forums' => array(
@@ -532,7 +530,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_feeds_softdeleted_post_admin()
{
- $this->markTestIncomplete('Softdeleted posts/topics are not marked in feeds yet, see PHPBB3-12460');
$this->load_ids(array(
'forums' => array(
'Feeds #1',
@@ -575,7 +572,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_feeds_softdeleted_post_guest()
{
- $this->markTestIncomplete('Softdeleted posts/topics are not marked in feeds yet, see PHPBB3-12460');
$this->load_ids(array(
'forums' => array(
'Feeds #1',
@@ -609,7 +605,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_softdelete_topic()
{
- $this->markTestIncomplete('Softdeleted posts/topics are not marked in feeds yet, see PHPBB3-12460');
$this->login();
$this->load_ids(array(
'forums' => array(
@@ -639,7 +634,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_feeds_softdeleted_topic_admin()
{
- $this->markTestIncomplete('Softdeleted posts/topics are not marked in feeds yet, see PHPBB3-12460');
$this->load_ids(array(
'forums' => array(
'Feeds #1',
@@ -709,7 +703,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_feeds_softdeleted_topic_guest()
{
- $this->markTestIncomplete('Softdeleted posts/topics are not marked in feeds yet, see PHPBB3-12460');
$this->load_ids(array(
'forums' => array(
'Feeds #1',
@@ -758,7 +751,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_create_unapproved_post()
{
- $this->markTestIncomplete('Unapproved posts/topics are not marked in feeds yet, see PHPBB3-12459');
$this->load_ids(array(
'forums' => array(
'Feeds #1.1',
@@ -780,7 +772,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_feeds_unapproved_post_admin()
{
- $this->markTestIncomplete('Unapproved posts/topics are not marked in feeds yet, see PHPBB3-12459');
$this->load_ids(array(
'forums' => array(
'Feeds #1.1',
@@ -823,7 +814,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_feeds_unapproved_post_disapprove_user()
{
- $this->markTestIncomplete('Unapproved posts/topics are not marked in feeds yet, see PHPBB3-12459');
$this->load_ids(array(
'forums' => array(
'Feeds #1.1',
@@ -857,7 +847,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_create_unapproved_topic()
{
- $this->markTestIncomplete('Unapproved posts/topics are not marked in feeds yet, see PHPBB3-12459');
$this->load_ids(array(
'forums' => array(
'Feeds #1.1',
@@ -877,7 +866,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_feeds_unapproved_topic_admin()
{
- $this->markTestIncomplete('Unapproved posts/topics are not marked in feeds yet, see PHPBB3-12459');
$this->load_ids(array(
'forums' => array(
'Feeds #1.1',
@@ -944,7 +932,6 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
public function test_feeds_unapproved_topic_disapprove_user()
{
- $this->markTestIncomplete('Unapproved posts/topics are not marked in feeds yet, see PHPBB3-12459');
$this->load_ids(array(
'forums' => array(
'Feeds #1.1',
@@ -1026,7 +1013,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
$this->assert_feeds(array(
'f' => array(
array(
- 'nb_entries' => 2,
+ 'nb_entries' => 4,
'id' => $this->data['forums']['Feeds #1'],
'attachments' => array(
1 => array( // First entry
@@ -1054,7 +1041,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
),
'overall' => array(
array(
- 'nb_entries' => 6,
+ 'nb_entries' => 11,
'attachments' => array(
1 => array( // First entry
array( // First attachment to fetch
@@ -1067,7 +1054,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
),
'topics' => array(
array(
- 'nb_entries' => 5,
+ 'nb_entries' => 8,
'attachments' => array(
1 => array( // First entry
array( // First attachment to fetch
@@ -1080,7 +1067,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
),
'topics_new' => array(
array(
- 'nb_entries' => 5,
+ 'nb_entries' => 8,
'attachments' => array(
1 => array( // First entry
array( // First attachment to fetch
@@ -1093,7 +1080,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
),
'topics_active' => array(
array(
- 'nb_entries' => 5,
+ 'nb_entries' => 8,
'attachments' => array(
1 => array( // First entry
array( // First attachment to fetch
@@ -1153,7 +1140,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
),
'overall' => array(
array(
- 'nb_entries' => 6,
+ 'nb_entries' => 7,
'attachments' => array(
1 => array( // First entry
array( // First attachment to fetch
@@ -1166,7 +1153,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
),
'topics' => array(
array(
- 'nb_entries' => 5,
+ 'nb_entries' => 6,
'attachments' => array(
1 => array( // First entry
array( // First attachment to fetch
@@ -1179,7 +1166,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
),
'topics_new' => array(
array(
- 'nb_entries' => 5,
+ 'nb_entries' => 6,
'attachments' => array(
1 => array( // First entry
array( // First attachment to fetch
@@ -1192,7 +1179,7 @@ class phpbb_functional_feed_test extends phpbb_functional_test_case
),
'topics_active' => array(
array(
- 'nb_entries' => 5,
+ 'nb_entries' => 6,
'attachments' => array(
1 => array( // First entry
array( // First attachment to fetch
diff --git a/tests/functional/visibility_softdelete_test.php b/tests/functional/visibility_softdelete_test.php
index f8ada9687c..3d44476ff0 100644
--- a/tests/functional/visibility_softdelete_test.php
+++ b/tests/functional/visibility_softdelete_test.php
@@ -608,7 +608,7 @@ class phpbb_functional_visibility_softdelete_test extends phpbb_functional_test_
$crawler = self::request('GET', "viewtopic.php?t={$this->data['topics']['Soft Delete Topic #1']}&sid={$this->sid}");
$this->assertContains('Soft Delete Topic #1', $crawler->filter('h2')->text());
- $this->assertContainsLang('POST_DELETED', $crawler->filter('body')->text());
+ $this->assertContainsLang('POST_DELETED_ACTION', $crawler->filter('body')->text());
$this->assert_forum_details($this->data['forums']['Soft Delete #1'], array(
'forum_posts_approved' => 1,
diff --git a/tests/mock/controller_helper.php b/tests/mock/controller_helper.php
new file mode 100644
index 0000000000..01ac6494d0
--- /dev/null
+++ b/tests/mock/controller_helper.php
@@ -0,0 +1,22 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2014 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+class phpbb_mock_controller_helper extends \phpbb\controller\helper
+{
+ public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, $phpbb_root_path, $php_ext, $phpbb_root_path_ext)
+ {
+ $this->template = $template;
+ $this->user = $user;
+ $this->config = $config;
+ $this->phpbb_root_path = $phpbb_root_path;
+ $this->php_ext = $php_ext;
+ $provider->find_routing_files($manager->get_finder());
+ $this->route_collection = $provider->find($phpbb_root_path_ext)->get_routes();
+ }
+}
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php
index 71206dff58..f7a02dc419 100644
--- a/tests/pagination/pagination_test.php
+++ b/tests/pagination/pagination_test.php
@@ -30,17 +30,19 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
->method('lang')
->will($this->returnCallback(array($this, 'return_callback_implode')));
+ $manager = new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array());
$this->finder = new \phpbb\extension\finder(
- new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array()),
+ $manager,
new \phpbb\filesystem(),
dirname(__FILE__) . '/',
new phpbb_mock_cache()
);
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1'));
- $provider = new \phpbb\controller\provider($this->finder);
+ $provider = new \phpbb\controller\provider();
+ $provider->find_routing_files($this->finder);
$provider->find(dirname(__FILE__) . '/');
- $this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $provider, '', 'php');
+ $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $provider, $manager, '', 'php', dirname(__FILE__) . '/');
$this->pagination = new \phpbb\pagination($this->template, $this->user, $this->helper);
}