From 205a504430cb97a1f39211ff81c63af543fff0b1 Mon Sep 17 00:00:00 2001 From: florenttorregrosa Date: Thu, 1 Dec 2016 15:04:10 +0100 Subject: [PATCH] Issue #2832110 by Grimreaper: Refactoring of _hosting_sync_site_has_module --- package/hosting_package.instance.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package/hosting_package.instance.inc b/package/hosting_package.instance.inc index 977528a..90a6d12 100644 --- a/package/hosting_package.instance.inc +++ b/package/hosting_package.instance.inc @@ -410,3 +410,13 @@ function _hosting_package_temporary_table($ref) { return $names[$ref]; } +/** + * Helper to determine if a particular site has a module installed. + */ +function _hosting_package_site_has_module($node, $module) { + $package = hosting_package_instance_load(array('rid' => $node->nid, 'p.short_name' => $module)); + if (!is_object($package)) { + return FALSE; + } + return $package->status; +} -- 1.9.1