function search_api_server_edit in Search API 7
Changes a server's settings.
Parameters
string|int $id: The ID or machine name of the server whose values should be changed.
array $fields: The new field values to set. The enabled field can't be set this way, use search_api_server_enable() and search_api_server_disable() instead.
Return value
int|false 1 if fields were changed, 0 if the fields already had the desired values. FALSE on failure.
File
- ./
search_api.module, line 2727 - Provides a flexible framework for implementing search services.
Code
function search_api_server_edit($id, array $fields) {
$server = search_api_server_load($id, TRUE);
$ret = $server
->update($fields);
return $ret ? 1 : $ret;
}