mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-27 11:04:15 +02:00
- Do not show link to user/group profiles if user has no permission to view the linked page and gets a denied message anyway. (Bug #15088)
- Do not display last post link and sort display options for search engines. (Bug #15088) git-svn-id: file:///svn/phpbb/trunk@8988 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
73db74dfa1
commit
9c7d8dcd7d
@ -3539,7 +3539,7 @@ function page_header($page_title = '', $display_online_list = true)
|
||||
'U_SEARCH_UNANSWERED' => append_sid('search', 'search_id=unanswered'),
|
||||
'U_SEARCH_ACTIVE_TOPICS'=> append_sid('search', 'search_id=active_topics'),
|
||||
'U_DELETE_COOKIES' => append_sid('ucp', 'mode=delete_cookies'),
|
||||
'U_TEAM' => append_sid('memberlist', 'mode=leaders'),
|
||||
'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid('memberlist', 'mode=leaders'),
|
||||
'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid('ucp', 'mode=restore_perm') : '',
|
||||
|
||||
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS) ? true : false,
|
||||
|
@ -259,7 +259,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
meta_refresh(3, $redirect);
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Grab moderators ... if necessary
|
||||
@ -654,7 +654,7 @@ function topic_generate_pagination($replies, $url)
|
||||
*/
|
||||
function get_moderators(&$forum_moderators, $forum_id = false)
|
||||
{
|
||||
global $config, $template, $db;
|
||||
global $config, $template, $db, $user, $auth;
|
||||
|
||||
// Have we disabled the display of moderators? If so, then return
|
||||
// from whence we came ...
|
||||
@ -713,7 +713,16 @@ function get_moderators(&$forum_moderators, $forum_id = false)
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_moderators[$row['forum_id']][] = '<a' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . ' href="' . append_sid('memberlist', 'mode=group&g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
$group_name = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']);
|
||||
|
||||
if ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile'))
|
||||
{
|
||||
$forum_moderators[$row['forum_id']][] = '<span' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . '>' . $group_name . '</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_moderators[$row['forum_id']][] = '<a' . (($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . ';"' : '') . ' href="' . append_sid('memberlist', 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
@ -1034,7 +1043,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
|
||||
if (!is_null($notify_status) && $notify_status !== '')
|
||||
{
|
||||
|
||||
|
||||
if (isset($_GET['unwatch']))
|
||||
{
|
||||
$uid = request_var('uid', 0);
|
||||
@ -1081,7 +1090,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
{
|
||||
$token = request_var('hash', '');
|
||||
$redirect_url = append_sid("view$mode", "$u_url=$match_id&start=$start");
|
||||
|
||||
|
||||
if ($_GET['watch'] == $mode && check_link_hash($token, "{$mode}_$match_id"))
|
||||
{
|
||||
$is_watching = true;
|
||||
@ -1095,7 +1104,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
{
|
||||
$message = $user->lang['ERR_WATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
}
|
||||
|
||||
|
||||
meta_refresh(3, $redirect_url);
|
||||
|
||||
trigger_error($message);
|
||||
|
@ -60,22 +60,25 @@ else
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$legend = '';
|
||||
$legend = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
|
||||
$group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
|
||||
|
||||
if ($row['group_name'] == 'BOTS')
|
||||
if ($row['group_name'] == 'BOTS' || ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')))
|
||||
{
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<span' . $colour_text . '>' . $user->lang['G_BOTS'] . '</span>';
|
||||
$legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$legend .= (($legend != '') ? ', ' : '') . '<a' . $colour_text . ' href="' . append_sid('memberlist', 'mode=group&g=' . $row['group_id']) . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</a>';
|
||||
$legend[] = '<a' . $colour_text . ' href="' . append_sid('memberlist', 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$legend = implode(', ', $legend);
|
||||
|
||||
// Generate birthday list if required ...
|
||||
$birthday_list = '';
|
||||
if ($config['load_birthdays'] && $config['allow_birthdays'])
|
||||
|
@ -42,7 +42,7 @@
|
||||
<dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>
|
||||
<dd class="lastpost"><span>
|
||||
<!-- IF forumrow.LAST_POST_TIME --><dfn>{L_LAST_POST}</dfn> {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
|
||||
<a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{L_POSTED_ON_DATE} {forumrow.LAST_POST_TIME}<!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></span>
|
||||
<!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{L_POSTED_ON_DATE} {forumrow.LAST_POST_TIME}<!-- ELSE -->{L_NO_POSTS}<!-- ENDIF --></span>
|
||||
</dd>
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<!-- IF S_VIEWTOPIC and U_BOOKMARK_TOPIC --><li class="icon-bookmark"><a href="{U_BOOKMARK_TOPIC}" title="{L_BOOKMARK_TOPIC}">{L_BOOKMARK_TOPIC}</a></li><!-- ENDIF -->
|
||||
<!-- IF S_VIEWTOPIC and U_BUMP_TOPIC --><li class="icon-bump"><a href="{U_BUMP_TOPIC}" title="{L_BUMP_TOPIC}">{L_BUMP_TOPIC}</a></li><!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<li class="rightside"><a href="{U_TEAM}">{L_THE_TEAM}</a> • <!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a> • <!-- ENDIF -->{S_TIMEZONE}</li>
|
||||
<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}">{L_DELETE_COOKIES}</a> • <!-- ENDIF -->{S_TIMEZONE}</li>
|
||||
</ul>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
|
@ -66,7 +66,7 @@
|
||||
<dd class="views">{searchresults.TOPIC_VIEWS}</dd>
|
||||
<dd class="lastpost"><span>
|
||||
{L_POST_BY_AUTHOR} {searchresults.LAST_POST_AUTHOR_FULL}
|
||||
<a href="{searchresults.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{L_POSTED_ON_DATE} {searchresults.LAST_POST_TIME}<br /> </span>
|
||||
<!-- IF not S_IS_BOT --><a href="{searchresults.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{L_POSTED_ON_DATE} {searchresults.LAST_POST_TIME}<br /> </span>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
|
@ -145,7 +145,7 @@
|
||||
<dd class="posts">{topicrow.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
|
||||
<dd class="views">{topicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
|
||||
<dd class="lastpost"><span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
|
||||
<a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <br />{L_POSTED_ON_DATE} {topicrow.LAST_POST_TIME}</span>
|
||||
<!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a> <!-- ENDIF --><br />{L_POSTED_ON_DATE} {topicrow.LAST_POST_TIME}</span>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
@ -171,9 +171,11 @@
|
||||
<fieldset class="display-options">
|
||||
<!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
|
||||
<!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
|
||||
<label>{L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS}</label>
|
||||
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<label>{L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS}</label>
|
||||
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label>
|
||||
<label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
</form>
|
||||
<hr />
|
||||
@ -202,7 +204,7 @@
|
||||
<!-- INCLUDE jumpbox.html -->
|
||||
|
||||
<!-- IF S_DISPLAY_ONLINE_LIST -->
|
||||
<h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3>
|
||||
<h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
|
||||
<p>{LOGGED_IN_USER_LIST}</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@ -229,8 +229,10 @@
|
||||
<fieldset class="display-options" style="margin-top: 0; ">
|
||||
<!-- IF PREVIOUS_PAGE --><a href="{PREVIOUS_PAGE}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_PREVIOUS}</a><!-- ENDIF -->
|
||||
<!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<label>{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS}</label>
|
||||
<label>{L_SORT_BY} {S_SELECT_SORT_KEY}</label> <label>{S_SELECT_SORT_DIR} <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
@ -264,7 +266,7 @@
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_DISPLAY_ONLINE_LIST -->
|
||||
<h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3>
|
||||
<h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
|
||||
<p>{LOGGED_IN_USER_LIST}</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
||||
<!-- IF forumrow.LAST_POST_TIME -->
|
||||
<p class="topicdetails">{forumrow.LAST_POST_TIME}</p>
|
||||
<p class="topicdetails">{forumrow.LAST_POSTER_FULL}
|
||||
<a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a>
|
||||
<!-- IF not S_IS_BOT --><a href="{forumrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->
|
||||
</p>
|
||||
<!-- ELSE -->
|
||||
<p class="topicdetails">{L_NO_POSTS}</p>
|
||||
|
@ -10,7 +10,9 @@
|
||||
|
||||
<!-- INCLUDE forumlist_body.html -->
|
||||
|
||||
<span class="gensmall"><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a><!-- ENDIF --> | <a href="{U_TEAM}">{L_THE_TEAM}</a></span><br />
|
||||
<!-- IF not S_IS_BOT or U_TEAM -->
|
||||
<span class="gensmall"><!-- IF not S_IS_BOT --><a href="{U_DELETE_COOKIES}">{L_DELETE_COOKIES}</a><!-- ENDIF --><!-- IF not S_IS_BOT and U_TEAM --> | <!-- ENDIF --><!-- IF U_TEAM --><a href="{U_TEAM}">{L_THE_TEAM}</a><!-- ENDIF --></span><br />
|
||||
<!-- ENDIF -->
|
||||
|
||||
<br clear="all" />
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
<td class="row1" width="140" align="center">
|
||||
<p class="topicdetails" style="white-space: nowrap;">{topicrow.LAST_POST_TIME}</p>
|
||||
<p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
|
||||
<a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
|
||||
<!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -209,7 +209,7 @@
|
||||
<td class="row1" width="140" align="center">
|
||||
<p class="topicdetails" style="white-space: nowrap;">{topicrow.LAST_POST_TIME}</p>
|
||||
<p class="topicdetails">{topicrow.LAST_POST_AUTHOR_FULL}
|
||||
<a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a>
|
||||
<!-- IF not S_IS_BOT --><a href="{topicrow.U_LAST_POST}">{LAST_POST_IMG}</a><!-- ENDIF -->
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
@ -226,6 +226,7 @@
|
||||
<!-- ENDIF -->
|
||||
<!-- END topicrow -->
|
||||
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<tr align="center">
|
||||
<!-- IF S_TOPIC_ICONS -->
|
||||
<td class="cat" colspan="7">
|
||||
@ -235,6 +236,7 @@
|
||||
<form method="post" action="{S_FORUM_ACTION}"><span class="gensmall">{L_DISPLAY_TOPICS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" name="sort" value="{L_GO}" /></form>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
</table>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@ -290,11 +290,13 @@
|
||||
</table>
|
||||
<!-- END postrow -->
|
||||
|
||||
<!-- IF not S_IS_BOT -->
|
||||
<table width="100%" cellspacing="1" class="tablebg">
|
||||
<tr align="center">
|
||||
<td class="cat"><form name="viewtopic" method="post" action="{S_TOPIC_ACTION}"><span class="gensmall">{L_DISPLAY_POSTS}:</span> {S_SELECT_SORT_DAYS} <span class="gensmall">{L_SORT_BY}</span> {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="btnlite" type="submit" value="{L_GO}" name="sort" /></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<table width="100%" cellspacing="1">
|
||||
<tr>
|
||||
|
Loading…
x
Reference in New Issue
Block a user