From 49d5550e3cbf6a2d444864e484320062bca92805 Mon Sep 17 00:00:00 2001 From: Shawn Kwang Date: Thu, 26 Oct 2017 10:58:40 -0500 Subject: [PATCH] Drupal: Changed moderation link to open in a new window (tab). https://dev.gridrepublic.org/browse/DBOINCP-395 --- .../default/boinc/modules/boincuser/boincuser.module | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drupal/sites/default/boinc/modules/boincuser/boincuser.module b/drupal/sites/default/boinc/modules/boincuser/boincuser.module index d2f9540312..1c815e14a1 100644 --- a/drupal/sites/default/boinc/modules/boincuser/boincuser.module +++ b/drupal/sites/default/boinc/modules/boincuser/boincuser.module @@ -1482,10 +1482,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'); } @@ -1499,9 +1504,6 @@ function boincuser_account_finish() { '@site_name' => $site_name, ), NULL, 'boinc:account-finish') . "

"; - $options = array( - 'attributes' => array( 'target' => '_blank' ), - ); $links = array( array( 'data' => bts('Change your username at !community_preferences.', array(