bug fixe on édit page for precedent patch
Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
parent
256475e716
commit
2030a6f810
@ -370,7 +370,7 @@ function search_api_page_admin_edit(array $form, array &$form_state, Entity $pag
|
|||||||
$form['result_page_search_form'] = array(
|
$form['result_page_search_form'] = array(
|
||||||
'#type' => 'radios',
|
'#type' => 'radios',
|
||||||
'#title' => t('Search form on result page'),
|
'#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')),
|
'#options' => array('1' => t('Enabled'), '0' => t('Disabled')),
|
||||||
'#description' => t('Enable or disable the search form on the result page'),
|
'#description' => t('Enable or disable the search form on the result page'),
|
||||||
);
|
);
|
||||||
|
@ -364,7 +364,7 @@ function search_api_page_insert(array $values) {
|
|||||||
*/
|
*/
|
||||||
function search_api_page_edit($id, array $fields) {
|
function search_api_page_edit($id, array $fields) {
|
||||||
$page = search_api_page_load($id, TRUE);
|
$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) {
|
foreach ($fields as $field => $value) {
|
||||||
if (isset($changeable[$field]) || $value === $page->$field) {
|
if (isset($changeable[$field]) || $value === $page->$field) {
|
||||||
$page->$field = $value;
|
$page->$field = $value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user