I enabled the 'archive' view and did not make any modifications to override it. However, when the following code is executed, 1 is unexpectedly printed.
drupal_set_message(views_get_view('archive')->disabled);
However, nothing is printed as expected if I make this slight modification.
views_get_all_views();
drupal_set_message(views_get_view('archive')->disabled);
Which would explain why it is not repro'ing in another places, namely the Views UI.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | views-670308-DRUPAL-6--2.patch | 718 bytes | Mike Wacker |
Comments
Comment #1
merlinofchaos commentedIt appears that views_get_view() does not actually check the status of the single view it's loading against the variable that contains all the enabled/disabled statuses, while views_get_all_views() does.
I think it's always been this way. Apparently in 4 years no one has ever cared.
Comment #2
Mike Wacker commentedWell I care :)
Here's a patch which should fix it.
Comment #3
dawehnerPatch works fine.
Comment #4
merlinofchaos commentedCommitted to all branches.