From ce5c12b5048c53f80d3d6546bde16cd4708a969c Mon Sep 17 00:00:00 2001 From: Tristan Olive Date: Wed, 27 Nov 2013 17:38:34 -0500 Subject: [PATCH] Private message link on profile pages Made private message link conditional on the the private message feature being enabled --- .../boinc/templates/user-profile.tpl.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drupal/sites/default/boinc/themes/boinc/templates/user-profile.tpl.php b/drupal/sites/default/boinc/themes/boinc/templates/user-profile.tpl.php index 20734366fb..8ec32710c0 100644 --- a/drupal/sites/default/boinc/themes/boinc/templates/user-profile.tpl.php +++ b/drupal/sites/default/boinc/themes/boinc/templates/user-profile.tpl.php @@ -55,10 +55,13 @@ $opinions = $content_profile->field_opinions[0]['value']; $user_links = array(); if ($user->uid AND ($user->uid != $account->uid)) { - $user_links[] = array( - 'title' => t('Send message'), - 'href' => privatemsg_get_link(array($account)) - ); + if (module_exists('private_messages')) { + // if (function_exists('privatemsg_get_link')) { + $user_links[] = array( + 'title' => t('Send message'), + 'href' => privatemsg_get_link(array($account)) + ); + } $user_links[] = array( 'title' => t('Add as friend'), 'href' => "flag/confirm/flag/friend/{$account->uid}" @@ -114,8 +117,12 @@ $link_index = 0; - +