Commit 29c7fa9b authored by dawehner's avatar dawehner Committed by tim.plunkett
Browse files

Issue 1589742 by dawehner, tim.plunkett: Fix broken tests, because the view...

Issue 1589742 by dawehner, tim.plunkett: Fix broken tests, because the view object removes some variables unintended.
parent 2e20022b
...@@ -1984,12 +1984,22 @@ function destroy() { ...@@ -1984,12 +1984,22 @@ function destroy() {
unset($this->query); unset($this->query);
} }
$keys = array('current_display', 'display_handler', 'build_info', 'built', 'executed', 'attachment_before', 'attachment_after', 'field', 'argument', 'filter', 'sort', 'relationship', 'header', 'footer', 'empty', 'query', 'result', 'inited', 'style_plugin', 'plugin_name', 'exposed_data', 'exposed_input', 'many_to_one_tables', 'items_per_page', 'offset', 'current_page'); $keys = array('current_display', 'display_handler', 'build_info', 'built', 'executed', 'attachment_before', 'attachment_after', 'field', 'argument', 'filter', 'sort', 'relationship', 'header', 'footer', 'empty', 'query', 'result', 'inited', 'style_plugin', 'plugin_name', 'exposed_data', 'exposed_input', 'many_to_one_tables');
foreach ($keys as $key) { foreach ($keys as $key) {
if (isset($this->$key)) { if (isset($this->$key)) {
unset($this->$key); unset($this->$key);
} }
} }
// These keys are checked by the next init, so instead of unsetting them,
// just set the default values.
$keys = array('items_per_page', 'offset', 'current_page');
foreach ($keys as $key) {
if (isset($this->$key)) {
$this->$key = NULL;
}
}
$this->built = $this->executed = FALSE; $this->built = $this->executed = FALSE;
$this->build_info = array(); $this->build_info = array();
$this->attachment_before = ''; $this->attachment_before = '';
......
Markdown is supported
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