mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge branch 'develop' into ticket/11215
* develop: [ticket/11675] Fix template loop [ticket/11690] Old module class names may get autoloaded by class_exists [ticket/9649] Display information on index for moderators on unapproved posts [ticket/11686] Not checking for phpBB Debug errors on functional tests [ticket/11553] Typo [ticket/11553] Replace bullet with unicode [ticket/11553] Move bulletin points to pseudo class [ticket/11600] Remove duplicate test case [ticket/11600] Use lowercase null and remove duplicate test cases [ticket/11600] Use local variable for $user in test_localize_errors [ŧicket/11600] Split get driver tests into tests for all and only enabled ones [ticket/11600] Increase code test coverage of avatar manager
This commit is contained in:
commit
e7b725369e
13 changed files with 229 additions and 60 deletions
|
@ -25,7 +25,7 @@
|
||||||
<a href="{role_mask.groups.U_PROFILE}">{role_mask.groups.GROUP_NAME}</a><!-- IF not role_mask.groups.S_LAST_ROW --> :: <!-- ENDIF -->
|
<a href="{role_mask.groups.U_PROFILE}">{role_mask.groups.GROUP_NAME}</a><!-- IF not role_mask.groups.S_LAST_ROW --> :: <!-- ENDIF -->
|
||||||
<!-- BEGINELSE -->
|
<!-- BEGINELSE -->
|
||||||
{L_GROUPS_NOT_ASSIGNED}
|
{L_GROUPS_NOT_ASSIGNED}
|
||||||
<!-- END users -->
|
<!-- END groups -->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -575,13 +575,20 @@ class acp_modules
|
||||||
// format. phpbb_acp_info_acp_foo needs to be turned into
|
// format. phpbb_acp_info_acp_foo needs to be turned into
|
||||||
// acp_foo_info and the respective file has to be included
|
// acp_foo_info and the respective file has to be included
|
||||||
// manually because it does not support auto loading
|
// manually because it does not support auto loading
|
||||||
if (!class_exists($info_class))
|
$old_info_class_file = str_replace("phpbb_{$module_class}_info_", '', $cur_module);
|
||||||
|
$old_info_class = $old_info_class_file . '_info';
|
||||||
|
|
||||||
|
if (class_exists($old_info_class))
|
||||||
{
|
{
|
||||||
$info_class_file = str_replace("phpbb_{$module_class}_info_", '', $cur_module);
|
$info_class = $old_info_class;
|
||||||
$info_class = $info_class_file . '_info';
|
}
|
||||||
if (!class_exists($info_class) && file_exists($directory . $info_class_file . '.' . $phpEx))
|
else if (!class_exists($info_class))
|
||||||
{
|
{
|
||||||
include($directory . $info_class_file . '.' . $phpEx);
|
$info_class = $old_info_class;
|
||||||
|
// need to check class exists again because previous checks triggered autoloading
|
||||||
|
if (!class_exists($info_class) && file_exists($directory . $old_info_class_file . '.' . $phpEx))
|
||||||
|
{
|
||||||
|
include($directory . $old_info_class_file . '.' . $phpEx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -215,8 +215,9 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
$forum_tracking_info[$forum_id] = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
|
$forum_tracking_info[$forum_id] = (isset($tracking_topics['f'][$forum_id])) ? (int) (base_convert($tracking_topics['f'][$forum_id], 36, 10) + $config['board_startdate']) : $user->data['user_lastmark'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Count the difference of real to public topics, so we can display an information to moderators
|
// Lets check whether there are unapproved topics/posts, so we can display an information to moderators
|
||||||
$row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_topics_unapproved']) ? $forum_id : 0;
|
$row['forum_id_unapproved_topics'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_topics_unapproved']) ? $forum_id : 0;
|
||||||
|
$row['forum_id_unapproved_posts'] = ($auth->acl_get('m_approve', $forum_id) && $row['forum_posts_unapproved']) ? $forum_id : 0;
|
||||||
$row['forum_posts'] = $phpbb_content_visibility->get_count('forum_posts', $row, $forum_id);
|
$row['forum_posts'] = $phpbb_content_visibility->get_count('forum_posts', $row, $forum_id);
|
||||||
$row['forum_topics'] = $phpbb_content_visibility->get_count('forum_topics', $row, $forum_id);
|
$row['forum_topics'] = $phpbb_content_visibility->get_count('forum_topics', $row, $forum_id);
|
||||||
|
|
||||||
|
@ -281,6 +282,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
$forum_rows[$parent_id]['forum_id_unapproved_topics'] = $forum_id;
|
$forum_rows[$parent_id]['forum_id_unapproved_topics'] = $forum_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$forum_rows[$parent_id]['forum_id_unapproved_posts'] && $row['forum_id_unapproved_posts'])
|
||||||
|
{
|
||||||
|
$forum_rows[$parent_id]['forum_id_unapproved_posts'] = $forum_id;
|
||||||
|
}
|
||||||
|
|
||||||
$forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
|
$forum_rows[$parent_id]['forum_topics'] += $row['forum_topics'];
|
||||||
|
|
||||||
// Do not list redirects in LINK Forums as Posts.
|
// Do not list redirects in LINK Forums as Posts.
|
||||||
|
@ -548,6 +554,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
'L_MODERATOR_STR' => $l_moderator,
|
'L_MODERATOR_STR' => $l_moderator,
|
||||||
|
|
||||||
'U_UNAPPROVED_TOPICS' => ($row['forum_id_unapproved_topics']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_topics&f=' . $row['forum_id_unapproved_topics']) : '',
|
'U_UNAPPROVED_TOPICS' => ($row['forum_id_unapproved_topics']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_topics&f=' . $row['forum_id_unapproved_topics']) : '',
|
||||||
|
'U_UNAPPROVED_POSTS' => ($row['forum_id_unapproved_posts']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=unapproved_posts&f=' . $row['forum_id_unapproved_posts']) : '',
|
||||||
'U_VIEWFORUM' => $u_viewforum,
|
'U_VIEWFORUM' => $u_viewforum,
|
||||||
'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||||
'U_LAST_POST' => $last_post_url,
|
'U_LAST_POST' => $last_post_url,
|
||||||
|
@ -587,6 +594,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||||
'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'],
|
'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'],
|
||||||
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
|
||||||
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPICS_UNAPPROVED'),
|
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPICS_UNAPPROVED'),
|
||||||
|
'UNAPPROVED_POST_IMG' => $user->img('icon_topic_unapproved', 'POSTS_UNAPPROVED'),
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($return_moderators)
|
if ($return_moderators)
|
||||||
|
|
|
@ -404,3 +404,22 @@ function apply_onkeypress_event() {
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(document).ready(apply_onkeypress_event);
|
jQuery(document).ready(apply_onkeypress_event);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adjust HTML code for IE8 and older versions
|
||||||
|
*/
|
||||||
|
(function($) {
|
||||||
|
$(document).ready(function() {
|
||||||
|
var test = document.createElement('div'),
|
||||||
|
oldBrowser = (typeof test.style.borderRadius == 'undefined');
|
||||||
|
delete test;
|
||||||
|
|
||||||
|
if (!oldBrowser) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fix .linkslist.bulletin lists
|
||||||
|
$('ul.linklist.bulletin li:first-child, ul.linklist.bulletin li.rightside:last-child').addClass('no-bulletin');
|
||||||
|
});
|
||||||
|
})(jQuery);
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,11 @@
|
||||||
<dd class="topics">{forumrow.TOPICS} <dfn>{L_TOPICS}</dfn></dd>
|
<dd class="topics">{forumrow.TOPICS} <dfn>{L_TOPICS}</dfn></dd>
|
||||||
<dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>
|
<dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>
|
||||||
<dd class="lastpost"><span>
|
<dd class="lastpost"><span>
|
||||||
<!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a><!-- ENDIF -->
|
<!-- IF forumrow.U_UNAPPROVED_TOPICS -->
|
||||||
|
<a href="{forumrow.U_UNAPPROVED_TOPICS}">{UNAPPROVED_IMG}</a>
|
||||||
|
<!-- ELSEIF forumrow.U_UNAPPROVED_POSTS -->
|
||||||
|
<a href="{forumrow.U_UNAPPROVED_POSTS}">{UNAPPROVED_POST_IMG}</a>
|
||||||
|
<!-- ENDIF -->
|
||||||
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>
|
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn>
|
||||||
<!-- IF forumrow.S_DISPLAY_SUBJECT -->
|
<!-- IF forumrow.S_DISPLAY_SUBJECT -->
|
||||||
<!-- EVENT forumlist_body_last_post_title_prepend -->
|
<!-- EVENT forumlist_body_last_post_title_prepend -->
|
||||||
|
|
|
@ -4,9 +4,16 @@
|
||||||
<!-- IF U_MCP --><p>{CURRENT_TIME} <br />[ <a href="{U_MCP}">{L_MCP}</a> ]</p><!-- ELSEIF S_USER_LOGGED_IN --><p>{CURRENT_TIME}</p><!-- ENDIF -->
|
<!-- IF U_MCP --><p>{CURRENT_TIME} <br />[ <a href="{U_MCP}">{L_MCP}</a> ]</p><!-- ELSEIF S_USER_LOGGED_IN --><p>{CURRENT_TIME}</p><!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->
|
<!-- IF S_DISPLAY_SEARCH or (S_USER_LOGGED_IN and not S_IS_BOT) -->
|
||||||
<ul class="linklist">
|
<ul class="linklist bulletin">
|
||||||
<!-- IF S_DISPLAY_SEARCH -->
|
<!-- IF S_DISPLAY_SEARCH -->
|
||||||
<li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_LOAD_UNREADS --> • <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a><!-- ENDIF --><!-- IF S_USER_LOGGED_IN --> • <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> • <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
|
<li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a></li>
|
||||||
|
<!-- IF S_LOAD_UNREADS -->
|
||||||
|
<li><a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a></li>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<!-- IF S_USER_LOGGED_IN -->
|
||||||
|
<li><a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a></li>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
<li><a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m" data-ajax="mark_forums_read" data-overlay="false">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
|
<!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m" data-ajax="mark_forums_read" data-overlay="false">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -5,16 +5,21 @@
|
||||||
<div class="navbar">
|
<div class="navbar">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
|
||||||
<ul class="linklist">
|
<ul class="linklist leftside bulletin">
|
||||||
<li class="icon-home"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>‹</strong> <!-- ENDIF --><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a>
|
<li class="icon-home"><!-- IF U_SITE_HOME --><a href="{U_SITE_HOME}">{L_SITE_HOME}</a> <strong>‹</strong> <!-- ENDIF --><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a>
|
||||||
<!-- EVENT overall_footer_breadcrumb_append --></li>
|
<!-- EVENT overall_footer_breadcrumb_append -->
|
||||||
|
</li>
|
||||||
<!-- IF not S_IS_BOT -->
|
<!-- IF not S_IS_BOT -->
|
||||||
<!-- IF U_WATCH_FORUM_LINK --><li <!-- IF S_WATCHING_FORUM -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}" data-ajax="toggle_link" data-toggle-class="icon-<!-- IF not S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_FORUM_TOGGLE}" data-toggle-url="{U_WATCH_FORUM_TOGGLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
|
<!-- IF U_WATCH_FORUM_LINK --><li <!-- IF S_WATCHING_FORUM -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_FORUM_LINK}" title="{S_WATCH_FORUM_TITLE}" data-ajax="toggle_link" data-toggle-class="icon-<!-- IF not S_WATCHING_FORUM -->unsubscribe<!-- ELSE -->subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_FORUM_TOGGLE}" data-toggle-url="{U_WATCH_FORUM_TOGGLE}">{S_WATCH_FORUM_TITLE}</a></li><!-- ENDIF -->
|
||||||
<!-- IF U_WATCH_TOPIC --><li <!-- IF S_WATCHING_TOPIC -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_TOPIC}" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-class="<!-- IF not S_WATCHING_TOPIC -->icon-unsubscribe<!-- ELSE -->icon-subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}">{S_WATCH_TOPIC_TITLE}</a></li><!-- ENDIF -->
|
<!-- IF U_WATCH_TOPIC --><li <!-- IF S_WATCHING_TOPIC -->class="icon-unsubscribe"<!-- ELSE -->class="icon-subscribe"<!-- ENDIF -->><a href="{U_WATCH_TOPIC}" title="{S_WATCH_TOPIC_TITLE}" data-ajax="toggle_link" data-toggle-class="<!-- IF not S_WATCHING_TOPIC -->icon-unsubscribe<!-- ELSE -->icon-subscribe<!-- ENDIF -->" data-toggle-text="{S_WATCH_TOPIC_TOGGLE}" data-toggle-url="{U_WATCH_TOPIC_TOGGLE}">{S_WATCH_TOPIC_TITLE}</a></li><!-- ENDIF -->
|
||||||
<!-- IF U_BOOKMARK_TOPIC --><li class="icon-bookmark"><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}" data-ajax="alt_text" data-alt-text="{S_BOOKMARK_TOGGLE}">{S_BOOKMARK_TOPIC}</a></li><!-- ENDIF -->
|
<!-- IF U_BOOKMARK_TOPIC --><li class="icon-bookmark"><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}" data-ajax="alt_text" data-alt-text="{S_BOOKMARK_TOGGLE}">{S_BOOKMARK_TOPIC}</a></li><!-- ENDIF -->
|
||||||
<!-- IF U_BUMP_TOPIC --><li class="icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}" data-ajax="true">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
|
<!-- IF U_BUMP_TOPIC --><li class="icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}" data-ajax="true">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<li class="rightside"><!-- IF U_TEAM --><a href="{U_TEAM}">{L_THE_TEAM}</a> • <!-- ENDIF --><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}" data-ajax="true" data-refresh="true">{L_DELETE_COOKIES}</a> • <!-- ENDIF -->{S_TIMEZONE}</li>
|
</ul>
|
||||||
|
<ul class="linklist rightside bulletin">
|
||||||
|
<!-- IF U_TEAM --><li><a href="{U_TEAM}">{L_THE_TEAM}</a><!-- ENDIF -->
|
||||||
|
<!-- IF not S_IS_BOT --><li><a href="{U_DELETE_COOKIES}" data-ajax="true" data-refresh="true">{L_DELETE_COOKIES}</a></li><!-- ENDIF -->
|
||||||
|
<li>{S_TIMEZONE}</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
|
<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
|
||||||
<ul class="linklist leftside">
|
<ul class="linklist leftside bulletin">
|
||||||
<!-- IF S_NOTIFICATIONS_DISPLAY -->
|
<!-- IF S_NOTIFICATIONS_DISPLAY -->
|
||||||
<li class="icon-notification">
|
<li class="icon-notification">
|
||||||
<a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button">{NOTIFICATIONS_COUNT}</a>
|
<a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button">{NOTIFICATIONS_COUNT}</a>
|
||||||
|
@ -170,11 +170,12 @@
|
||||||
<li class="icon-ucp">
|
<li class="icon-ucp">
|
||||||
<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">{L_PROFILE}</a>
|
<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">{L_PROFILE}</a>
|
||||||
<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a>)<!-- ENDIF -->
|
<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD -->, {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF --></a>)<!-- ENDIF -->
|
||||||
<!-- IF S_DISPLAY_SEARCH --> •
|
</li>
|
||||||
<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
|
<!-- IF S_DISPLAY_SEARCH -->
|
||||||
|
<li class="icon-search-self"><a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></li>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF U_RESTORE_PERMISSIONS --> •
|
<!-- IF U_RESTORE_PERMISSIONS -->
|
||||||
<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
|
<li class="icon-restore-permissions"><a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a></li>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -97,17 +97,9 @@ a.sendemail {
|
||||||
padding: 1px 0 0 17px;
|
padding: 1px 0 0 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-notification:before, .icon-notification:after {
|
ul.linklist.bulletin li.icon-home:before, ul.linklist.bulletin li.icon-ucp:before,
|
||||||
display: inline;
|
ul.linklist.bulletin li.icon-bookmark:before, ul.linklist.bulletin li.icon-bump:before, ul.linklist.bulletin li.icon-subscribe:before, ul.linklist.bulletin li.icon-unsubscribe:before {
|
||||||
font: inherit;
|
display: none;
|
||||||
}
|
|
||||||
|
|
||||||
.icon-notification:before {
|
|
||||||
content: '[';
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-notification:after {
|
|
||||||
content: ']';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Poster profile icons
|
/* Poster profile icons
|
||||||
|
|
|
@ -356,6 +356,38 @@ ul.rightside {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Bulletin icons for list items
|
||||||
|
----------------------------------------*/
|
||||||
|
ul.linklist.bulletin li:before {
|
||||||
|
display: inline-block;
|
||||||
|
content: "\2022";
|
||||||
|
font-size: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.linklist.bulletin li:first-child:before, ul.linklist.bulletin li.rightside:last-child:before {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.linklist.bulletin li.no-bulletin:before {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-notification:before, ul.linklist.bulletin li.icon-notification:before, .icon-notification:after {
|
||||||
|
display: inline;
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-notification:before, ul.linklist.bulletin li.icon-notification:before {
|
||||||
|
content: '[';
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-notification:after {
|
||||||
|
content: ']';
|
||||||
|
}
|
||||||
|
|
||||||
/* Table styles
|
/* Table styles
|
||||||
----------------------------------------*/
|
----------------------------------------*/
|
||||||
table.table1 {
|
table.table1 {
|
||||||
|
|
|
@ -64,7 +64,14 @@
|
||||||
<!-- EVENT forumlist_body_last_post_title_prepend -->
|
<!-- EVENT forumlist_body_last_post_title_prepend -->
|
||||||
<p class="topicdetails"><a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a></p>
|
<p class="topicdetails"><a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a></p>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<p class="topicdetails"><!-- IF forumrow.U_UNAPPROVED_TOPICS --><a href="{forumrow.U_UNAPPROVED_TOPICS}" class="imageset">{UNAPPROVED_IMG}</a> <!-- ENDIF -->{forumrow.LAST_POST_TIME}</p>
|
<p class="topicdetails">
|
||||||
|
<!-- IF forumrow.U_UNAPPROVED_TOPICS -->
|
||||||
|
<a href="{forumrow.U_UNAPPROVED_TOPICS}" class="imageset">{UNAPPROVED_IMG}</a>
|
||||||
|
<!-- ELSEIF forumrow.U_UNAPPROVED_POSTS -->
|
||||||
|
<a href="{forumrow.U_UNAPPROVED_POSTS}" class="imageset">{UNAPPROVED_POST_IMG}</a>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
{forumrow.LAST_POST_TIME}
|
||||||
|
</p>
|
||||||
<p class="topicdetails">{forumrow.LAST_POSTER_FULL}
|
<p class="topicdetails">{forumrow.LAST_POSTER_FULL}
|
||||||
<!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a><!-- ENDIF -->
|
<!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}" class="imageset">{LAST_POST_IMG}</a><!-- ENDIF -->
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -19,24 +19,35 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
|
||||||
$this->phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
|
$this->phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
|
||||||
$this->phpbb_container->expects($this->any())
|
$this->phpbb_container->expects($this->any())
|
||||||
->method('get')
|
->method('get')
|
||||||
->with('avatar.driver.foobar')->will($this->returnValue('avatar.driver.foobar'));
|
->will($this->returnArgument(0));
|
||||||
|
|
||||||
// Prepare dependencies for avatar manager and driver
|
// Prepare dependencies for avatar manager and driver
|
||||||
$config = new phpbb_config(array());
|
$config = new phpbb_config(array());
|
||||||
$request = $this->getMock('phpbb_request');
|
$request = $this->getMock('phpbb_request');
|
||||||
$cache = $this->getMock('phpbb_cache_driver_interface');
|
$cache = $this->getMock('phpbb_cache_driver_interface');
|
||||||
|
|
||||||
|
// $this->avatar_foobar will be needed later on
|
||||||
$this->avatar_foobar = $this->getMock('phpbb_avatar_driver_foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache));
|
$this->avatar_foobar = $this->getMock('phpbb_avatar_driver_foobar', array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache));
|
||||||
$this->avatar_foobar->expects($this->any())
|
$this->avatar_foobar->expects($this->any())
|
||||||
->method('get_name')
|
->method('get_name')
|
||||||
->will($this->returnValue('avatar.driver.foobar'));
|
->will($this->returnValue('avatar.driver.foobar'));
|
||||||
|
// barfoo driver can't be mocked with constructor arguments
|
||||||
$this->avatar_barfoo = $this->getMock('phpbb_avatar_driver_barfoo', array('get_name'));
|
$this->avatar_barfoo = $this->getMock('phpbb_avatar_driver_barfoo', array('get_name'));
|
||||||
$this->avatar_barfoo->expects($this->any())
|
$this->avatar_barfoo->expects($this->any())
|
||||||
->method('get_name')
|
->method('get_name')
|
||||||
->will($this->returnValue('avatar.driver.barfoo'));
|
->will($this->returnValue('avatar.driver.barfoo'));
|
||||||
|
|
||||||
$avatar_drivers = array($this->avatar_foobar, $this->avatar_barfoo);
|
$avatar_drivers = array($this->avatar_foobar, $this->avatar_barfoo);
|
||||||
|
|
||||||
|
foreach ($this->avatar_drivers() as $driver)
|
||||||
|
{
|
||||||
|
$cur_avatar = $this->getMock('phpbb_avatar_driver_' . $driver, array('get_name'), array($config, $phpbb_root_path, $phpEx, $cache));
|
||||||
|
$cur_avatar->expects($this->any())
|
||||||
|
->method('get_name')
|
||||||
|
->will($this->returnValue('avatar.driver.' . $driver));
|
||||||
|
$config['allow_avatar_' . get_class($cur_avatar)] = false;
|
||||||
|
$avatar_drivers[] = $cur_avatar;
|
||||||
|
}
|
||||||
|
|
||||||
$config['allow_avatar_' . get_class($this->avatar_foobar)] = true;
|
$config['allow_avatar_' . get_class($this->avatar_foobar)] = true;
|
||||||
$config['allow_avatar_' . get_class($this->avatar_barfoo)] = false;
|
$config['allow_avatar_' . get_class($this->avatar_barfoo)] = false;
|
||||||
|
|
||||||
|
@ -44,28 +55,27 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
|
||||||
$this->manager = new phpbb_avatar_manager($config, $avatar_drivers, $this->phpbb_container);
|
$this->manager = new phpbb_avatar_manager($config, $avatar_drivers, $this->phpbb_container);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_get_driver()
|
protected function avatar_drivers()
|
||||||
{
|
{
|
||||||
$driver = $this->manager->get_driver('avatar.driver.foobar', false);
|
return array(
|
||||||
$this->assertEquals('avatar.driver.foobar', $driver);
|
'local',
|
||||||
|
'upload',
|
||||||
$driver = $this->manager->get_driver('avatar.driver.foo_wrong', false);
|
'remote',
|
||||||
$this->assertNull($driver);
|
'gravatar',
|
||||||
|
);
|
||||||
$driver = $this->manager->get_driver('avatar.driver.foobar');
|
|
||||||
$this->assertEquals('avatar.driver.foobar', $driver);
|
|
||||||
|
|
||||||
$driver = $this->manager->get_driver('avatar.driver.foo_wrong');
|
|
||||||
$this->assertNull($driver);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_get_all_drivers()
|
public function test_get_all_drivers()
|
||||||
{
|
{
|
||||||
$drivers = $this->manager->get_all_drivers();
|
$drivers = $this->manager->get_all_drivers();
|
||||||
$this->assertArrayHasKey('avatar.driver.foobar', $drivers);
|
$this->assertEquals(array(
|
||||||
$this->assertArrayHasKey('avatar.driver.barfoo', $drivers);
|
'avatar.driver.barfoo' => 'avatar.driver.barfoo',
|
||||||
$this->assertEquals('avatar.driver.foobar', $drivers['avatar.driver.foobar']);
|
'avatar.driver.foobar' => 'avatar.driver.foobar',
|
||||||
$this->assertEquals('avatar.driver.barfoo', $drivers['avatar.driver.barfoo']);
|
'avatar.driver.local' => 'avatar.driver.local',
|
||||||
|
'avatar.driver.remote' => 'avatar.driver.remote',
|
||||||
|
'avatar.driver.upload' => 'avatar.driver.upload',
|
||||||
|
'avatar.driver.gravatar' => 'avatar.driver.gravatar',
|
||||||
|
), $drivers);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_get_enabled_drivers()
|
public function test_get_enabled_drivers()
|
||||||
|
@ -76,6 +86,48 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
|
||||||
$this->assertEquals('avatar.driver.foobar', $drivers['avatar.driver.foobar']);
|
$this->assertEquals('avatar.driver.foobar', $drivers['avatar.driver.foobar']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_driver_data_enabled()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
array('avatar.driver.foobar', 'avatar.driver.foobar'),
|
||||||
|
array('avatar.driver.foo_wrong', null),
|
||||||
|
array('avatar.driver.local', null),
|
||||||
|
array(AVATAR_GALLERY, null),
|
||||||
|
array(AVATAR_UPLOAD, null),
|
||||||
|
array(AVATAR_REMOTE, null),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider get_driver_data_enabled
|
||||||
|
*/
|
||||||
|
public function test_get_driver_enabled($driver_name, $expected)
|
||||||
|
{
|
||||||
|
$driver = $this->manager->get_driver($driver_name);
|
||||||
|
$this->assertEquals($expected, $driver);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_driver_data_all()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
array('avatar.driver.foobar', 'avatar.driver.foobar'),
|
||||||
|
array('avatar.driver.foo_wrong', null),
|
||||||
|
array('avatar.driver.local', 'avatar.driver.local'),
|
||||||
|
array(AVATAR_GALLERY, 'avatar.driver.local'),
|
||||||
|
array(AVATAR_UPLOAD, 'avatar.driver.upload'),
|
||||||
|
array(AVATAR_REMOTE, 'avatar.driver.remote'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider get_driver_data_all
|
||||||
|
*/
|
||||||
|
public function test_get_driver_all($driver_name, $expected)
|
||||||
|
{
|
||||||
|
$driver = $this->manager->get_driver($driver_name, false);
|
||||||
|
$this->assertEquals($expected, $driver);
|
||||||
|
}
|
||||||
|
|
||||||
public function test_get_avatar_settings()
|
public function test_get_avatar_settings()
|
||||||
{
|
{
|
||||||
$avatar_settings = $this->manager->get_avatar_settings($this->avatar_foobar);
|
$avatar_settings = $this->manager->get_avatar_settings($this->avatar_foobar);
|
||||||
|
@ -157,4 +209,38 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase
|
||||||
$this->assertArrayHasKey($key, $cleaned_row);
|
$this->assertArrayHasKey($key, $cleaned_row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_clean_driver_name()
|
||||||
|
{
|
||||||
|
$this->assertEquals('avatar.driver.local', $this->manager->clean_driver_name('avatar_driver_local'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_prepare_driver_name()
|
||||||
|
{
|
||||||
|
$this->assertEquals('avatar_driver_local', $this->manager->prepare_driver_name('avatar.driver.local'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_localize_errors()
|
||||||
|
{
|
||||||
|
$user = $this->getMock('phpbb_user');
|
||||||
|
$lang_array = array(
|
||||||
|
array('FOOBAR_OFF', 'foobar_off'),
|
||||||
|
array('FOOBAR_EXPLAIN', 'FOOBAR_EXPLAIN %s'),
|
||||||
|
);
|
||||||
|
$user->expects($this->any())
|
||||||
|
->method('lang')
|
||||||
|
->will($this->returnValueMap($lang_array));
|
||||||
|
|
||||||
|
// Pass error as string
|
||||||
|
$this->assertEquals(array('foobar_off'), $this->manager->localize_errors($user, array('FOOBAR_OFF')));
|
||||||
|
|
||||||
|
// Pass error as array for vsprintf()
|
||||||
|
$this->assertEquals(array('FOOBAR_EXPLAIN foo'), $this->manager->localize_errors($user, array(array('FOOBAR_EXPLAIN', 'foo'))));
|
||||||
|
|
||||||
|
// Pass both types
|
||||||
|
$this->assertEquals(array('foobar_off', 'FOOBAR_EXPLAIN foo'), $this->manager->localize_errors($user, array(
|
||||||
|
'FOOBAR_OFF',
|
||||||
|
array('FOOBAR_EXPLAIN', 'foo'),
|
||||||
|
)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -743,6 +743,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||||
|
|
||||||
// Any output before the doc type means there was an error
|
// Any output before the doc type means there was an error
|
||||||
$content = self::$client->getResponse()->getContent();
|
$content = self::$client->getResponse()->getContent();
|
||||||
|
self::assertNotContains('[phpBB Debug]', $content);
|
||||||
self::assertStringStartsWith('<!DOCTYPE', trim($content), 'Output found before DOCTYPE specification.');
|
self::assertStringStartsWith('<!DOCTYPE', trim($content), 'Output found before DOCTYPE specification.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue