Do not add a profile to the vetting queue if only the country field has been changed

(DBOINCP-102)
This commit is contained in:
Tristan Olive 2015-06-10 01:35:29 -04:00
parent ef45e86b61
commit 761d7fe715
1 changed files with 199 additions and 39 deletions

View File

@ -140,7 +140,16 @@ function user_profiles_rules_defaults() {
'#status' => 'default',
'#conditions' => array(
'0' => array(
'#weight' => 0,
'#type' => 'condition',
'#settings' => array(
'type' => array(
'profile' => 'profile',
),
'#argument map' => array(
'node' => 'node',
),
),
'#name' => 'rules_condition_content_is_type',
'#info' => array(
'label' => 'Created content is Profile',
'arguments' => array(
@ -151,31 +160,10 @@ function user_profiles_rules_defaults() {
),
'module' => 'Node',
),
'#name' => 'rules_condition_content_is_type',
'#settings' => array(
'type' => array(
'profile' => 'profile',
),
'#argument map' => array(
'node' => 'node',
),
),
'#type' => 'condition',
'#weight' => 0,
),
'1' => array(
'#type' => 'condition',
'#weight' => 0,
'#settings' => array(
'roles' => array(
'0' => 3519698132,
'1' => 1271379760,
),
'operation' => 'OR',
'#argument map' => array(
'user' => 'user',
),
),
'#name' => 'rules_condition_user_hasrole',
'#negate' => 1,
'#info' => array(
'label' => 'User has role(s)',
'arguments' => array(
@ -186,17 +174,22 @@ function user_profiles_rules_defaults() {
),
'module' => 'User',
),
'#negate' => 1,
),
'2' => array(
'#type' => 'condition',
'#name' => 'rules_condition_user_hasrole',
'#settings' => array(
'roles' => array(
'0' => 3519698132,
'1' => 1271379760,
),
'operation' => 'OR',
'#argument map' => array(
'user1' => 'user',
'user2' => 'author',
'user' => 'user',
),
),
'#name' => 'rules_condition_user_comparison',
'#type' => 'condition',
'#weight' => 0,
),
'2' => array(
'#weight' => 0,
'#info' => array(
'label' => 'Compare two users',
'arguments' => array(
@ -211,18 +204,179 @@ function user_profiles_rules_defaults() {
),
'module' => 'User',
),
'#name' => 'rules_condition_user_comparison',
'#settings' => array(
'#argument map' => array(
'user1' => 'user',
'user2' => 'author',
),
),
'#type' => 'condition',
),
'3' => array(
'#type' => 'OR',
'0' => array(
'#info' => array(
'label' => 'Updated content\'s field \'field_background\' has been changed',
'arguments' => array(
'node' => array(
'type' => 'node',
'label' => 'Content containing changes',
),
'node_unchanged' => array(
'type' => 'node',
'label' => 'Content not containing changes',
),
),
'module' => 'CCK',
),
'#name' => 'content_rules_field_changed',
'#settings' => array(
'field_name' => 'field_background',
'#argument map' => array(
'node' => 'node',
'node_unchanged' => 'node_unchanged',
),
),
'#type' => 'condition',
'#weight' => 0,
),
'#weight' => 0,
'1' => array(
'#weight' => 0,
'#info' => array(
'label' => 'Updated content\'s field \'field_opinions\' has been changed',
'arguments' => array(
'node' => array(
'type' => 'node',
'label' => 'Content containing changes',
),
'node_unchanged' => array(
'type' => 'node',
'label' => 'Content not containing changes',
),
),
'module' => 'CCK',
),
'#name' => 'content_rules_field_changed',
'#settings' => array(
'field_name' => 'field_opinions',
'#argument map' => array(
'node' => 'node',
'node_unchanged' => 'node_unchanged',
),
),
'#type' => 'condition',
),
'2' => array(
'#type' => 'condition',
'#settings' => array(
'field_name' => 'field_image',
'#argument map' => array(
'node' => 'node',
'node_unchanged' => 'node_unchanged',
),
),
'#name' => 'content_rules_field_changed',
'#info' => array(
'label' => 'Updated content\'s field \'field_image\' has been changed',
'arguments' => array(
'node' => array(
'type' => 'node',
'label' => 'Content containing changes',
),
'node_unchanged' => array(
'type' => 'node',
'label' => 'Content not containing changes',
),
),
'module' => 'CCK',
),
'#weight' => 0,
),
'3' => array(
'#weight' => 0,
'#info' => array(
'label' => 'Updated content\'s field \'field_profile_image\' has been changed',
'arguments' => array(
'node' => array(
'type' => 'node',
'label' => 'Content containing changes',
),
'node_unchanged' => array(
'type' => 'node',
'label' => 'Content not containing changes',
),
),
'module' => 'CCK',
),
'#name' => 'content_rules_field_changed',
'#settings' => array(
'field_name' => 'field_profile_image',
'#argument map' => array(
'node' => 'node',
'node_unchanged' => 'node_unchanged',
),
),
'#type' => 'condition',
),
'4' => array(
'#type' => 'condition',
'#settings' => array(
'field_name' => 'field_url',
'#argument map' => array(
'node' => 'node',
'node_unchanged' => 'node_unchanged',
),
),
'#name' => 'content_rules_field_changed',
'#info' => array(
'label' => 'Updated content\'s field \'field_url\' has been changed',
'arguments' => array(
'node' => array(
'type' => 'node',
'label' => 'Content containing changes',
),
'node_unchanged' => array(
'type' => 'node',
'label' => 'Content not containing changes',
),
),
'module' => 'CCK',
),
'#weight' => 0,
),
'5' => array(
'#weight' => 0,
'#info' => array(
'label' => 'Updated content\'s field \'field_zip\' has been changed',
'arguments' => array(
'node' => array(
'type' => 'node',
'label' => 'Content containing changes',
),
'node_unchanged' => array(
'type' => 'node',
'label' => 'Content not containing changes',
),
),
'module' => 'CCK',
),
'#name' => 'content_rules_field_changed',
'#settings' => array(
'field_name' => 'field_zip',
'#argument map' => array(
'node' => 'node',
'node_unchanged' => 'node_unchanged',
),
),
'#type' => 'condition',
),
),
),
'#actions' => array(
'1' => array(
'#type' => 'action',
'#settings' => array(
'#argument map' => array(
'node' => 'node',
),
),
'#name' => 'boinccore_rules_action_mark_content_for_moderation',
'#weight' => 0,
'#info' => array(
'label' => 'Mark content for moderation',
'arguments' => array(
@ -233,7 +387,13 @@ function user_profiles_rules_defaults() {
),
'module' => 'BOINC core',
),
'#weight' => 0,
'#name' => 'boinccore_rules_action_mark_content_for_moderation',
'#settings' => array(
'#argument map' => array(
'node' => 'node',
),
),
'#type' => 'action',
),
),
'#version' => 6003,