patch_commit_2030a6f810b1.patch 1.5 KB

1234567891011121314151617181920212223242526
  1. diff --git search_api_page.admin.inc search_api_page.admin.inc
  2. index a08ee0609ac55a7456cc7496272fbfb96714d299..d0f541d12f39f7b93ce4b00723302364feea89aa 100644
  3. --- search_api_page.admin.inc
  4. +++ search_api_page.admin.inc
  5. @@ -370,7 +370,7 @@ function search_api_page_admin_edit(array $form, array &$form_state, Entity $pag
  6. $form['result_page_search_form'] = array(
  7. '#type' => 'radios',
  8. '#title' => t('Search form on result page'),
  9. - '#default_value' => $page->options['per_page'],
  10. + '#default_value' => isset($page->options['result_page_search_form']) ? $page->options['result_page_search_form'] : 1,
  11. '#options' => array('1' => t('Enabled'), '0' => t('Disabled')),
  12. '#description' => t('Enable or disable the search form on the result page'),
  13. );
  14. diff --git search_api_page.module search_api_page.module
  15. index a9a00cb0de7cdcbc084a304682180a5f1448b847..16179de63cdd7ad9babdc872814ad7efa1d121af 100755
  16. --- search_api_page.module
  17. +++ search_api_page.module
  18. @@ -364,7 +364,7 @@ function search_api_page_insert(array $values) {
  19. */
  20. function search_api_page_edit($id, array $fields) {
  21. $page = search_api_page_load($id, TRUE);
  22. - $changeable = array('name' => 1, 'description' => 1, 'path' => 1, 'options' => 1, 'enabled' => 1);
  23. + $changeable = array('name' => 1, 'description' => 1, 'path' => 1, 'options' => 1, 'enabled' => 1, 'result_page_search_form'=>1);
  24. foreach ($fields as $field => $value) {
  25. if (isset($changeable[$field]) || $value === $page->$field) {
  26. $page->$field = $value;