At some point (port to d6?), setting the default schedule became only for "backwards compatibility". I personally liked the idea of setting a default schedule, one that could affect all of my schedule-based views.
Therefore, I came up with a views filter for checking if the schedule is the default one.

Comments

tim.plunkett’s picture

StatusFileSize
new2.13 KB

Forgot to add the patch!
How's this look?

drewish’s picture

Not quite sure what to make of this:

+    $this->query->add_where($this->options['group'], "($this->table_alias.nid = $id) " . (empty($this->value) ? '=' : '<>') . " 0");

Shouldn't $this->value determine the operator between $this->table_alias.nid and $id? Seems odd to be adding another comparison onto the end.

tim.plunkett’s picture

I simply copied that from station/schedule/views/station_schedule_handler_filter_schedule_item.inc. 0 is considered to be empty, so I guess it makes sense? Idk.

drewish’s picture

oh man, we should fix both then ;)

tim.plunkett’s picture

StatusFileSize
new2.12 KB

I think I fixed the one I wrote. See #844052: "Has programs" filter broken for more issues with the other one.

drewish’s picture

Status: Needs review » Fixed

Thanks, committed to HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.