Merge pull request #2192 from drshawnkwang/drupal_fix-accountfinish-linknewwindow

Drupal: Changed moderation link to open in a new window (tab).
This commit is contained in:
tristanolive 2017-11-02 11:02:05 -04:00 committed by GitHub
commit 46e16206af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -1481,10 +1481,15 @@ function boincuser_account_finish() {
}
}
// open links in new window
$options = array(
'attributes' => array( 'target' => '_blank' ),
);
// Check moderation page exists
$moderationpath = drupal_lookup_path('source', variable_get('boinc_weboptions_moderationpage', '') );
if ( menu_valid_path(array('link_path' => $moderationpath)) ) {
$modsentence = bts('Please note: user profiles are subject to !moderation.', array('!moderation' => l(bts('moderation', array(), NULL, 'boinc:account-finish'), $moderationpath)), NULL, 'boinc:account-finish');
$modsentence = bts('Please note: user profiles are subject to !moderation.', array('!moderation' => l(bts('moderation', array(), NULL, 'boinc:account-finish'), $moderationpath, $options)), NULL, 'boinc:account-finish');
} else {
$modsentence = bts('Please note: user profiles are subject to moderation.', array(), NULL, 'boinc:account-finish');
}
@ -1498,9 +1503,6 @@ function boincuser_account_finish() {
'@site_name' => $site_name,
), NULL, 'boinc:account-finish') . "</p>";
$options = array(
'attributes' => array( 'target' => '_blank' ),
);
$links = array(
array(
'data' => bts('Change your username at !community_preferences.', array(