Skip to content
Snippets Groups Projects
Commit 1360e253 authored by fago's avatar fago
Browse files

fixed altering arguments passed to rules - all tests pass again.

parent 0e30b01a
No related branches found
Tags 8.x-3.0-beta5
No related merge requests found
......@@ -7,8 +7,12 @@
/**
* Gets the right data object for the given argument information
* @param $info
* Info about the data type.
* @param $data
* Optional data to set. Warning: Only use this, when loosing a reference is ok.
*/
function rules_get_data_object($info, $data = NULL) {
function rules_get_data_object($info, &$data = NULL) {
$class = 'rules_data_type';
if (($data_type = rules_get_data_types($info['type'])) && class_exists($data_type['class'])) {
$class = $data_type['class'];
......
......@@ -290,7 +290,6 @@ function rules_theme() {
* Returns info about all defined actions
*/
function rules_get_actions($key = 'all') {
//TODO: integrate d6 actions
return rules_gather_data('rules_action_info', $key);
}
......@@ -485,7 +484,7 @@ function rules_clear_cache($immediate = TRUE) {
}
/**
* Implementation of hook_flush_caches
* Implementation of hook_flush_caches().
*/
function rules_flush_caches() {
variable_del('rules_inactive_sets');
......
......@@ -279,7 +279,9 @@ class rules_variable {
function _set_data(&$data) {
if (isset($data)) {
$this->data = rules_get_data_object($this->info, $data);
$this->data = rules_get_data_object($this->info);
// Set the data in the data object and make sure to keep a reference intact
$this->data->init($data);
}
}
......
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