You are here

function search_api_server_enable in Search API 7

Enables a search server.

Will also check for remembered tasks for this server and execute them.

Parameters

string|int $id: The ID or machine name of the server to enable.

Return value

int|false 1 on success, 0 or FALSE on failure.

File

./search_api.module, line 2744
Provides a flexible framework for implementing search services.

Code

function search_api_server_enable($id) {
  $server = search_api_server_load($id, TRUE);
  $ret = $server
    ->update(array(
    'enabled' => 1,
  ));
  return $ret ? 1 : $ret;
}