Commit bdb122ef authored by Lily Yan's avatar Lily Yan
Browse files

RT#482449 fixed event sort by arhive year and month

parent 8d624465
......@@ -41,7 +41,7 @@ function uw_ct_event_form_alter(&$form, &$form_state, $form_id) {
// When using "audience" or "type" exposed filter: display the selected option ("tid" from path), then change action to events
if ($form['#id'] == 'views-exposed-form-events-page' || $form['#id'] == 'views-exposed-form-events-responsive-page') {
if (isset($path[1]) && isset($path[2])) {dpm('hi');
if (isset($path[1]) && isset($path[2])) {
switch ($path[1]) {
case "audience":
// cause the audience term id ("tid") to be selected in the dropdown
......@@ -59,7 +59,7 @@ function uw_ct_event_form_alter(&$form, &$form_state, $form_id) {
// When on "events by date" pages (from archive links), add the chosen date to the "dates" exposed filter and select it from the dropdown
// Dates filter: Click date link, add option composite_views_filter = 0 (date=0), then change action to events
if ($form['#id'] == 'views-exposed-form-events-events-archive-page') {
if ($form['#id'] == 'views-exposed-form-events-events-archive-page' || $form['#id'] == 'views-exposed-form-events-responsive-events-archive-page') {
// if (!(isset($form_state['input']['date']))) {
// add the selected date to the dropdown
$timestamp = strtotime($path[2]);
......@@ -155,7 +155,7 @@ function uw_ct_event_views_query_alter(&$view, &$query) {
}
}
if ($view->name == 'events' && isset($view->exposed_raw_input['date'])) {
if (($view->name == 'events' || $view->name == 'events_responsive') && isset($view->exposed_raw_input['date'])) {
// Unset query conditions for events/archive view
if (isset($path[0]) && $path[0] == 'events' && isset($path[1]) && $path[1] == 'archive' && isset($path[2])) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment