81c81,82 < + $count = _google_appliance_admin_keymatchs_count(); --- > + $query = empty($_SESSION['google_appliance']['keymatch_query']) ? NULL : $_SESSION['google_appliance']['keymatch_query']; > + $count = _google_appliance_admin_keymatchs_count($query); 83a85,98 > + $form['filter'] = array( > + '#type' => 'fieldset', > + '#title' => t('Search for keymatches containing'), > + '#attributes' => array('class' => array('container-inline')), > + ); > + $form['filter']['query'] = array( > + '#type' => 'textfield', > + '#default_value' => $query, > + ); > + $form['filter']['submit'] = array( > + '#type' => 'submit', > + '#value' => t('Filter'), > + ); > + 92c107 < + $options = _google_appliance_admin_keymatchs_retrieve($startLine, SGA_KEYMATCH_LIMIT); --- > + $options = _google_appliance_admin_keymatchs_retrieve($startLine, SGA_KEYMATCH_LIMIT, $query); 112a128,138 > + * Form submit handler - view keymatchs. > + * > + * Store search string in session. > + * > + * @see google_appliance_admin_keymatch_view(). > + */ > +function google_appliance_admin_keymatch_view_submit($form, &$form_state) { > + $_SESSION['google_appliance']['keymatch_query'] = empty($form_state['values']['query']) ? NULL : $form_state['values']['query']; > +} > + > +/** 137c163 < + $options = _google_appliance_admin_keymatchs_retrieve($startLine, SGA_KEYMATCH_LIMIT); --- > + $options = _google_appliance_admin_keymatchs_retrieve($startLine, SGA_KEYMATCH_LIMIT, $query); 484a511,512 > + * @param $query > + * Query string to perform a full-text search. Defaults to NULL (no search). 489c517 < +function _google_appliance_admin_keymatchs_retrieve($startLine, $maxLines) { --- > +function _google_appliance_admin_keymatchs_retrieve($startLine, $maxLines, $query = NULL) { 493a522 > + 'query' => $query, 526a556,558 > + * @param $query > + * Query string to perform a full-text search. Defaults to NULL (no search). > + * 530c562 < +function _google_appliance_admin_keymatchs_count() { --- > +function _google_appliance_admin_keymatchs_count($query = NULL) { 533a566 > + 'query' => $query,