diff --git a/search_api.module b/search_api.module index e421332..f3f66d3 100644 --- a/search_api.module +++ b/search_api.module @@ -1877,19 +1877,20 @@ function search_api_server_load($id, $reset = FALSE) { * * @see entity_load() * - * @param $ids + * @param array|false $ids * An array of server IDs or machine names, or FALSE to load all servers. - * @param $conditions + * @param array $conditions * An array of conditions on the {search_api_server} table in the form * 'field' => $value. - * @param $reset + * @param bool $reset * Whether to reset the internal entity_load cache. * * @return array * An array of server objects keyed by machine name. */ function search_api_server_load_multiple($ids = array(), $conditions = array(), $reset = FALSE) { - return entity_load_multiple_by_name('search_api_server', $ids, $conditions, $reset); + $servers = entity_load('search_api_server', $ids, $conditions, $reset); + return entity_key_array_by_property($servers, 'machine_name'); } /** @@ -2033,12 +2034,12 @@ function search_api_index_load($id, $reset = FALSE) { * * @see entity_load() * - * @param $ids + * @param array|false $ids * An array of index IDs or machine names, or FALSE to load all indexes. - * @param $conditions + * @param array $conditions * An array of conditions on the {search_api_index} table in the form * 'field' => $value. - * @param $reset + * @param bool $reset * Whether to reset the internal entity_load cache. * * @return array @@ -2048,7 +2049,8 @@ function search_api_index_load_multiple($ids = array(), $conditions = array(), $ // This line is a workaround for a weird PDO bug in PHP 5.2. // See http://drupal.org/node/889286. new SearchApiIndex(); - return entity_load_multiple_by_name('search_api_index', $ids, $conditions, $reset); + $indexes = entity_load('search_api_index', $ids, $conditions, $reset); + return entity_key_array_by_property($indexes, 'machine_name'); } /**