Skip to content
Snippets Groups Projects
Commit 277f3ba5 authored by Wolfgang Ziegler's avatar Wolfgang Ziegler
Browse files

#1027908 fixed compatibility with the latest entity API module. Requires >=...

 #1027908 fixed compatibility with the latest entity API module. Requires >= entity API beta9 to work.
parent 7d40c09a
No related branches found
Tags 4.0.10
No related merge requests found
......@@ -8,7 +8,7 @@
/**
* Make sure loaded rule configs are instantiated right.
*/
class RulesEntityController extends EntityAPIController {
class RulesEntityController extends EntityAPIControllerExportable {
/**
* Overriden.
......@@ -24,7 +24,7 @@ class RulesEntityController extends EntityAPIController {
$entity->$field = $record->$field;
}
unset($entity->data, $entity->plugin);
$entities[$entity->name] = $entity;
$entities[$entity->id] = $entity;
}
$queried_entities = $entities;
parent::attachLoad($queried_entities, $revision_id);
......
......@@ -601,7 +601,7 @@ function rules_hook_info() {
* An array of rule configurations indexed by their ids.
*/
function rules_config_load_multiple($names = array(), $conditions = array()) {
return entity_get_controller('rules_config')->load($names, $conditions);
return entity_load_multiple_by_name('rules_config', $names, $conditions);
}
/**
......@@ -612,8 +612,7 @@ function rules_config_load_multiple($names = array(), $conditions = array()) {
* @return RulesPlugin
*/
function rules_config_load($name) {
$result = entity_get_controller('rules_config')->load(array($name));
return reset($result);
return entity_load_single('rules_config', $name);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment