summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Seidl2011-06-16 12:18:58 (GMT)
committer Thomas Seidl2011-06-16 12:18:58 (GMT)
commit90e74b79150dd1877fa4cf500e20d57c11db2a2a (patch)
tree209b0edae7d577ba1501e659ff9ffed564c34e6d
parentd3a2cef15743f75ce85da138a047e1c4a7f0f501 (diff)
Issue #1190324 by drunken monkey: Adapted to API change in Entity API.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--contrib/search_api_facets/search_api_facets.module4
-rw-r--r--search_api.install7
-rw-r--r--search_api.module8
4 files changed, 14 insertions, 6 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 15fa685..143193f 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -4,6 +4,7 @@ API changes:
- #1068342 by drunken monkey: Added a 'fields to run on' option for processors.
Others:
+- #1190324 by drunken monkey: Adapted to API change in Entity API.
- #1168684 by drunken monkey: Added improved tokenizer defaults for English.
- #1163096 by drunken monkey: Fixed cached types for DB servers aren't correctly
updated.
diff --git a/contrib/search_api_facets/search_api_facets.module b/contrib/search_api_facets/search_api_facets.module
index 42866e8..2fe056f 100644
--- a/contrib/search_api_facets/search_api_facets.module
+++ b/contrib/search_api_facets/search_api_facets.module
@@ -78,7 +78,7 @@ function search_api_facets_theme() {
function search_api_facets_entity_info() {
$info['search_api_facet'] = array(
'label' => t('Search facet'),
- 'controller class' => 'EntityAPIController',
+ 'controller class' => 'EntityAPIControllerExportable',
'entity class' => 'SearchApiFacet',
'base table' => 'search_api_facet',
'uri callback' => 'search_api_facet_url',
@@ -839,7 +839,7 @@ function search_api_facet_load($id, $reset = FALSE) {
* An array of SearchApiFacet objects keyed by machine name.
*/
function search_api_facet_load_multiple($ids = array(), $conditions = array(), $reset = FALSE) {
- return entity_load('search_api_facet', $ids, $conditions, $reset);
+ return entity_load_multiple_by_name('search_api_facet', $ids, $conditions, $reset);
}
/**
diff --git a/search_api.install b/search_api.install
index 99cebff..e4ad0f2 100644
--- a/search_api.install
+++ b/search_api.install
@@ -809,3 +809,10 @@ function search_api_update_7108() {
db_add_field('search_api_index', 'read_only', $db_field);
return t('Added a "read only" property to index entities.');
}
+
+/**
+ * Clear entity info cache, as entity controller classes hae changed.
+ */
+function search_api_update_7109() {
+ cache_clear_all('entity_info:', 'cache', TRUE);
+}
diff --git a/search_api.module b/search_api.module
index 76222de..3492bd1 100644
--- a/search_api.module
+++ b/search_api.module
@@ -242,7 +242,7 @@ function search_api_cron() {
function search_api_entity_info() {
$info['search_api_server'] = array(
'label' => t('Search server'),
- 'controller class' => 'EntityAPIController',
+ 'controller class' => 'EntityAPIControllerExportable',
'metadata controller class' => FALSE,
'entity class' => 'SearchApiServer',
'base table' => 'search_api_server',
@@ -257,7 +257,7 @@ function search_api_entity_info() {
);
$info['search_api_index'] = array(
'label' => t('Search index'),
- 'controller class' => 'EntityAPIController',
+ 'controller class' => 'EntityAPIControllerExportable',
'metadata controller class' => FALSE,
'entity class' => 'SearchApiIndex',
'base table' => 'search_api_index',
@@ -1343,7 +1343,7 @@ function search_api_server_load($id, $reset = FALSE) {
* An array of server objects keyed by machine name.
*/
function search_api_server_load_multiple($ids = array(), $conditions = array(), $reset = FALSE) {
- return entity_load('search_api_server', $ids, $conditions, $reset);
+ return entity_load_multiple_by_name('search_api_server', $ids, $conditions, $reset);
}
/**
@@ -1550,7 +1550,7 @@ function search_api_index_load($id, $reset = FALSE) {
* An array of index objects keyed by machine name.
*/
function search_api_index_load_multiple($ids = array(), $conditions = array(), $reset = FALSE) {
- return entity_load('search_api_index', $ids, $conditions, $reset);
+ return entity_load_multiple_by_name('search_api_index', $ids, $conditions, $reset);
}
/**