Skip to content
Browse files

Update views alter code to work with Views 7.3-rc3

  • Loading branch information...
1 parent af5de7d commit 0241d0cbdecee1618a7a69e7f1c52229e22fb52b @KyleAMathews committed Nov 20, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 fhd_person/fhd_person.module
View
8 fhd_person/fhd_person.module
@@ -383,18 +383,18 @@ function safestrtotime($strInput)
/**
- * Implementation of hook_views_pre_render().
+ * Implementation of hook_views_post_render().
**/
-function fhd_person_views_pre_render(&$view) {
+function fhd_person_views_post_render(&$view) {
// Override the person page's Title with the name of the person.
if ($view->name == "person_page_views") {
$birth_year = "";
$birth_date = $view->result[0]->fhd_person_birth_date;
if (!empty($birth_date)) {
- $birth_year = adodb_date("Y", $view->result[0]->fhd_person_birth_date);
+ $birth_year = " (" . adodb_date("Y", $view->result[0]->fhd_person_birth_date) . ")";
}
- drupal_set_title($view->result[0]->fhd_person_name . " (" . $birth_year . ")");
+ $view->build_info['title'] = $view->result[0]->fhd_person_name . $birth_year;
}
}

0 comments on commit 0241d0c

Please sign in to comment.
Something went wrong with that request. Please try again.