Commit e774a44b authored by theo lem's avatar theo lem
Browse files

Merge branch 'fixup-patch-webform-submission' into 'master'

permanent fix for badly applied patch causing error on webform results access

See merge request framasoft/framaforms!38
parents 3882596b 7f61a32f
......@@ -831,8 +831,8 @@ function webform_get_submissions_query($filters = array(), $header = NULL, $page
$sort = drupal_get_query_parameters();
// Sort by submitted data column if order is set but not in
// $metadata_columns.
$pager_query->fields('wsd', array('data'));
if (isset($sort['order']) && !in_array($sort['order'], $metadata_columns, TRUE)) {
$pager_query->fields('wsd', array('data'));
// Default if sort is unset or invalid.
if (!isset($sort['sort']) || !in_array($sort['sort'], array('asc', 'desc'), TRUE)) {
$sort['sort'] = '';
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