Skip to content

Commit

Permalink
Fixing coding standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnar Eivind Martinsen committed Dec 29, 2023
1 parent 66e48ff commit 63dbcbb
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions metsis/metsis_search/metsis_search.module
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,27 @@ function metsis_search_views_pre_view(ViewExecutable $view, $display_id, array &
// dpm($filters);
$replace_text = '/search?';
foreach ($filters as $k => $v) {
if( $k === 'op') { continue; }
if( $k === 'is_parent') { continue; }
if( $k === 'fulltext') {
if ($k === 'op') {
continue;
}
if ($k === 'is_parent') {
continue;
}
if ($k === 'fulltext') {
$v = '';
}
if(is_array($v)) { continue;}
$replace_text .= $k . '=' . $v . '&';
if (is_array($v)) {
continue;
}
$replace_text .= $k . '=' . $v . '&';
}
$rep_text_t = rtrim($replace_text, '&');
// dpm($rep_text_t);
$replaced_text = str_replace('/search',$rep_text_t, $orig_text);
$replaced_text = str_replace('/search', $rep_text_t, $orig_text);
// dpm($replaced_text);
$fields['nothing_1']['alter']['text'] = $replaced_text;
$view->display_handler->overrideOption('fields', $fields);
}

}

}

Expand Down Expand Up @@ -261,8 +266,8 @@ function metsis_search_theme($existing, $type, $theme, $path) {
function metsis_search_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
if ($view->id() == 'metsis_search' || $view->id() == 'metsis_search_date_test') {
// Do something withe the veiws query here.
// dpm($view, __FUNCTION__);
// dpm($query, __FUNCTION__);
// dpm($view, __FUNCTION__);
// dpm($query, __FUNCTION__);.
}
}

Expand Down

0 comments on commit 63dbcbb

Please sign in to comment.