Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.6
-
Fix Version/s: 4.3.0
-
Component/s: Drupal Integration Modules
Description
The file views_handler_argument_civicrm_year_month.inc incorrectly uses the Drupal format_date function and does not check the parameters for this function as well.
I've replaced the logic in both the "summary_name()" and the "title()" function to handle the format_date properly:
/**
- Provide a link to the next level of the view
*/
function summary_name($data) {
$timestamp = strtotime($data->{$this->name_alias});
if ($timestamp !== FALSE) { return format_date(strtotime($this->argument), 'custom', $this->format); }
}
/**
* Provide a link to the next level of the view
*/
function title() {
$timestamp = strtotime($this->argument);
if ($timestamp !== FALSE) { return format_date(strtotime($this->argument), 'custom', $this->format); }}