Skip to content
Snippets Groups Projects

FDSU-861: fix web hooks due to changes in upstream contrib module workbench_moderation

Merged Nathan Vexler requested to merge FDSU-861_fix-web-hooks-workbench_moderation into master
+ 6
3
Compare changes
  • Side-by-side
  • Inline
+ 6
3
@@ -617,11 +617,14 @@ function uw_ct_service_preprocess_html(&$variables) {
function uw_ct_service_workbench_moderation_transition($node, $previous_state, $new_state) {
global $base_root;
$path = trim(base_path(), '/');
if($node->type == 'uw_service' && $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_service' && $base_root === 'https://uwaterloo.ca') {
if (($current || $is_current) && $is_published) {
uw_value_lists_uw_api_query('v2/ping/services.json', array('type' => 'services', 'site' => $path, 'nid' => $node->nid));
}
}
}
}
function uw_ct_service_audience_taxonomy_tree($tid) {
Loading