function commons_profile_views_pre_render in Drupal Commons 6.2
Implementation of hook_views_pre_render()
File
- modules/
features/ commons_profile/ commons_profile.module, line 101
Code
function commons_profile_views_pre_render(&$view) {
global $user;
// When viewing the "About" profile tab
if ($view->name == 'profile_about_page') {
// Determine if the user is viewing their own profile so the
// correct context can be set
if ($user->uid == arg(1)) {
context_set('context', 'profile-about-me', context_load('profile-about-me'));
}
else {
context_set('context', 'profile-about-other', context_load('profile-about-other'));
}
}
}