function execute_display($display_id = NULL, $args = array()) {
if (empty($this->current_display) || $this->current_display != $this->choose_display($display_id)) {
if (!$this->set_display($display_id)) {
return FALSE;
}
}
...
$this->choose_display returns current value if passed non-array, so second part of equation is $this->current_display != null, so current display is set but doesn't equal null it goes into set_display passing the null $display_id
function set_display($display_id = NULL) {
// If we have not already initialized the display, do so. But be careful.
if (empty($this->current_display)) {
$this->init_display();
// If handlers were not initialized, and no argument was sent, set up
// to the default display.
if (empty($display_id)) {
$display_id = 'default';
}
}
$display_id = $this->choose_display($display_id);
// If no display id sent in and one wasn't chosen above, we're finished.
if (empty($display_id)) {
return FALSE;
}
Which repeats the same choose_display logic that returns null, then returns false, which then returns false from execute_display. (Note: since current display is set, it skips the top part cause display is already set).
Patch changes the logic to ($this->current_display != $this->choose_display($display_id))
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | views-execute_display-1748320-2.patch | 652 bytes | andrew answer |
Comments
Comment #1
chris matthews commentedThe 6 year old patch does not apply to the latest views 7.x-3.x-dev and if still applicable needs a reroll.
Comment #2
andrew answer commentedPatch rerolled.