Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-11432

views_handler_argument_civicrm_year_month.inc not working with contextual filters

    Details

      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); }

        }

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              weseze Wesley Sandra
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: