Project

General

Profile

Revision 62e0cc08

Added by Assos Assos over 3 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/calendar/includes/calendar_plugin_style.inc
309 309
        $item_end = date_format($item->calendar_end_date, DATE_FORMAT_DATE);
310 310
        $time_start = date_format($item->calendar_start_date, 'H:i:s');
311 311
        $item->rendered_fields = $this->rendered_fields[$row_index];
312
        //set custom class to item
313
        $item->classCustom = $this->view->style_plugin->get_row_class($row_index);
312 314
        $items[$item_start][$time_start][] = $item;
313 315
      }
314 316
    }
......
670 672
    $multiday_theme = !empty($this->date_info->style_multiday_theme) && $this->date_info->style_multiday_theme == '1';
671 673
    $first_day = variable_get('date_first_day', 0);
672 674
    $cur_cnt = 0;
675
    $extra_events = FALSE;
673 676
    $total_cnt = 0;
674 677
    $ids = array();
675 678

  
......
724 727
                  // If the last day of this event exceeds the end of the current month or week,
725 728
                  // truncate the remaining days
726 729
                  $diff =  $this->curday->difference($this->date_info->max_date, 'days');
727
                  $remaining_days = ($this->date_info->granularity == 'month') ? min(6 - $wday, $diff) : $diff - 1;
730
                  $remaining_days = ($this->date_info->granularity == 'month') ? min(6 - $wday, $diff) : $diff;
728 731
                  // The bucket_cnt defines the colspan.  colspan = bucket_cnt + 1
729 732
                  $days = $this->curday->difference($item->date_end, 'days');
730 733
                  $bucket_cnt = max(0, min($days, $remaining_days));
......
796 799
                  'wday' => $wday,
797 800
                );
798 801
              }
802
              elseif (!$extra_events) {
803
                // The event we're currently on will never be displaed.
804
                // So let's set a flag the make sure more link is set.
805
                $extra_events = TRUE;
806
              }
799 807

  
800 808
            }
801 809
          }
......
804 812
    }
805 813

  
806 814
    // Add a more link if necessary
807
    if ($max_events != CALENDAR_SHOW_ALL && $total_cnt > 0 && $cur_cnt < $total_cnt) {
815
    if ($max_events != CALENDAR_SHOW_ALL && $total_cnt > 0 && ($cur_cnt < $total_cnt || $extra_events)) {
808 816
      $entry = theme('calendar_' . $this->date_info->calendar_type . '_multiple_entity', array(
809 817
          'curday' => $curday_date,
810 818
          'count' => $total_cnt,

Also available in: Unified diff