+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2016 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2016
+ * @copyright CiviCRM LLC (c) 2004-2017
*/
class CRM_Core_OptionGroup {
static $_values = array();
* ignore cache entries and go back to DB.
* @param string $keyColumnName
* the column to use for 'key'.
+ * @param string $orderBy
*
* @return array
- * the values as specified by the above params
- * @void
+ * The values as specified by the params
*/
public static function &values(
$name, $flip = FALSE, $grouping = FALSE,
if ($onlyActive) {
$query .= " AND v.is_active = 1 ";
+ $enabledComponents = '"' . implode('","', CRM_Core_Config::singleton()->enableComponents) . '"';
+ $query .= " AND (v.component_id IS NULL OR v.component_id IN (SELECT id FROM civicrm_component WHERE name IN ($enabledComponents))) ";
}
if (in_array($name, self::$_domainIDGroups)) {
$query .= " AND v.domain_id = " . CRM_Core_Config::domainID();