Commit ce22f5d9 authored by Nathan Vexler's avatar Nathan Vexler
Browse files

Merge branch 'FDSU-861_fix-web-hooks-workbench_moderation' into 'master'

FDSU-861: fix web hooks workbench moderation

See merge request !1
parents ce8c78b0 b56455ec
......@@ -1432,8 +1432,11 @@ function uw_ct_event_get_combine_month_array($month_date_value, $month_date_valu
function uw_ct_event_workbench_moderation_transition($node, $previous_state, $new_state) {
global $base_root;
$path = trim(base_path(), '/');
if ($node->type == 'uw_event' && $base_root == 'https://uwaterloo.ca') {
if ($node->workbench_moderation['current']->current == TRUE && $node->workbench_moderation['current']->published == TRUE) {
$current = (property_exists($node->workbench_moderation['current'], 'current') && $node->workbench_moderation['current']->current == TRUE);
$is_current = (property_exists($node->workbench_moderation['current'], 'is_current') && $node->workbench_moderation['current']->is_current == TRUE);
$is_published = (property_exists($node->workbench_moderation['current'], 'published') && $node->workbench_moderation['current']->published == TRUE);
if ($node->type === 'uw_event' && $base_root === 'https://uwaterloo.ca') {
if (($current || $is_current) && $is_published) {
uw_value_lists_uw_api_query('v2/ping/events.json', array('type' => 'events', 'site' => $path, 'nid' => $node->nid), FALSE);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment