mirror of https://github.com/BOINC/boinc.git
Merge branch 'drshawnkwang-drupal_anonuserfixes'
This commit is contained in:
commit
0109d0941d
|
@ -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 .= '[';
|
||||
|
|
|
@ -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'),
|
||||
<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())); ?>
|
||||
array('query' => drupal_get_destination()));
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -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'),
|
||||
<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())); ?>
|
||||
array('query' => drupal_get_destination()));
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -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'),
|
||||
<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())); ?>
|
||||
array('query' => drupal_get_destination()));
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Reference in New Issue