From 2030a6f810b1a062226895916945730e496e59fa Mon Sep 17 00:00:00 2001 From: bachy Date: Sun, 22 Jul 2012 17:02:31 +0200 Subject: [PATCH] =?UTF-8?q?bug=20fixe=20on=20=C3=A9dit=20page=20for=20prec?= =?UTF-8?q?edent=20patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: bachy --- search_api_page.admin.inc | 2 +- search_api_page.module | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/search_api_page.admin.inc b/search_api_page.admin.inc index a08ee060..d0f541d1 100644 --- a/search_api_page.admin.inc +++ b/search_api_page.admin.inc @@ -370,7 +370,7 @@ function search_api_page_admin_edit(array $form, array &$form_state, Entity $pag $form['result_page_search_form'] = array( '#type' => 'radios', '#title' => t('Search form on result page'), - '#default_value' => $page->options['per_page'], + '#default_value' => isset($page->options['result_page_search_form']) ? $page->options['result_page_search_form'] : 1, '#options' => array('1' => t('Enabled'), '0' => t('Disabled')), '#description' => t('Enable or disable the search form on the result page'), ); diff --git a/search_api_page.module b/search_api_page.module index a9a00cb0..16179de6 100755 --- a/search_api_page.module +++ b/search_api_page.module @@ -364,7 +364,7 @@ function search_api_page_insert(array $values) { */ function search_api_page_edit($id, array $fields) { $page = search_api_page_load($id, TRUE); - $changeable = array('name' => 1, 'description' => 1, 'path' => 1, 'options' => 1, 'enabled' => 1); + $changeable = array('name' => 1, 'description' => 1, 'path' => 1, 'options' => 1, 'enabled' => 1, 'result_page_search_form'=>1); foreach ($fields as $field => $value) { if (isset($changeable[$field]) || $value === $page->$field) { $page->$field = $value;