Merge branch 'drshawnkwang-drupal_anonuserfixes'

This commit is contained in:
Tristan Olive 2016-08-19 12:43:57 -04:00
commit 0109d0941d
4 changed files with 26 additions and 12 deletions

View File

@ -796,8 +796,13 @@ function boincteam_create_team_link_panel() {
$output .= ' <li class="first last tab">';
if (isset($account->roles[$unrestricted_role])) {
$output .= l(bts('Create new team'), 'community/teams/add');
}
else {
} elseif ($account->uid <= 0) {
$output .= l(
bts('Login to create a new team'),
'user/login',
array('query' => drupal_get_destination())
);
} else {
$min_credit_needed = variable_get('boinc_comment_min_credit', 0);
$credit_needed = $min_credit_needed - $account->boincuser_total_credit;
$output .= '[';

View File

@ -109,9 +109,12 @@
$ignore_link['ignore_user']['href'],
array('query' => $ignore_link['ignore_user']['query'])); ?>
</div>
<div class="pm-link"><?php print l(bts('Send message'),
privatemsg_get_link(array($account)),
array('query' => drupal_get_destination())); ?>
<div class="pm-link"><?php
if ($user->uid AND ($user->uid != $account->uid)) {
print l(bts('Send message'),
privatemsg_get_link(array($account)),
array('query' => drupal_get_destination()));
} ?>
</div>
</div>
<?php endif; ?>
@ -177,4 +180,4 @@
<?php if ($status == 'comment-preview'): ?>
<h2 class="title"><?php print bts('Revise or post comment'); ?></h2>
<?php endif; ?>
<?php endif; ?>

View File

@ -154,9 +154,12 @@
$ignore_link['ignore_user']['href'],
array('query' => $ignore_link['ignore_user']['query'])); ?>
</div>
<div class="pm-link"><?php print l(bts('Send message'),
privatemsg_get_link(array($account)),
array('query' => drupal_get_destination())); ?>
<div class="pm-link"><?php
if ($user->uid AND ($user->uid != $account->uid)) {
print l(bts('Send message'),
privatemsg_get_link(array($account)),
array('query' => drupal_get_destination()));
} ?>
</div>
</div>
<?php endif; ?>

View File

@ -150,9 +150,12 @@
$ignore_link['ignore_user']['href'],
array('query' => $ignore_link['ignore_user']['query'])); ?>
</div>
<div class="pm-link"><?php print l(bts('Send message'),
privatemsg_get_link(array($account)),
array('query' => drupal_get_destination())); ?>
<div class="pm-link"><?php
if ($user->uid AND ($user->uid != $account->uid)) {
print l(bts('Send message'),
privatemsg_get_link(array($account)),
array('query' => drupal_get_destination()));
} ?>
</div>
</div>
<?php endif; ?>