projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3066 from relldoesphp/CRM-14466
[civicrm-core.git]
/
CRM
/
Case
/
PseudoConstant.php
diff --git
a/CRM/Case/PseudoConstant.php
b/CRM/Case/PseudoConstant.php
index 8d6960bd0e9067687e7ac99c0e0f74c2ce7b08d8..5f00dbd311cdb394985a6dc483b5082f736419fa 100644
(file)
--- a/
CRM/Case/PseudoConstant.php
+++ b/
CRM/Case/PseudoConstant.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
4
|
+ | CiviCRM version 4.
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
3
|
+ | Copyright CiviCRM LLC (c) 2004-201
4
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-28,7
+28,7
@@
/**
*
* @package CRM
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
3
+ * @copyright CiviCRM LLC (c) 2004-201
4
* $Id$
*
*/
* $Id$
*
*/
@@
-89,12
+89,16
@@
class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant {
* @return array - array reference of all case statues
* @static
*/
* @return array - array reference of all case statues
* @static
*/
- public static function caseStatus($column = 'label', $onlyActive = TRUE) {
+ public static function caseStatus($column = 'label', $onlyActive = TRUE
, $condition = NULL, $fresh = FALSE
) {
$cacheKey = "{$column}_" . (int)$onlyActive;
$cacheKey = "{$column}_" . (int)$onlyActive;
- if (!isset(self::$caseStatus[$cacheKey])) {
+ if (!$condition) {
+ $condition = 'AND filter = 0';
+ }
+
+ if (!isset(self::$caseStatus[$cacheKey]) || $fresh) {
self::$caseStatus[$cacheKey] = CRM_Core_OptionGroup::values('case_status',
self::$caseStatus[$cacheKey] = CRM_Core_OptionGroup::values('case_status',
- FALSE, FALSE, FALSE,
NULL
,
- $column, $onlyActive
+ FALSE, FALSE, FALSE,
$condition
,
+ $column, $onlyActive
, $fresh
);
}
);
}
@@
-137,11
+141,14
@@
class CRM_Case_PseudoConstant extends CRM_Core_PseudoConstant {
* @return array - array reference of all case type
* @static
*/
* @return array - array reference of all case type
* @static
*/
- public static function caseType($column = 'label', $onlyActive = TRUE) {
+ public static function caseType($column = 'label', $onlyActive = TRUE
, $condition = NULL
) {
$cacheKey = "{$column}_" . (int)$onlyActive;
$cacheKey = "{$column}_" . (int)$onlyActive;
+ if (!$condition) {
+ $condition = 'AND filter = 0';
+ }
if (!isset(self::$caseType[$cacheKey])) {
self::$caseType[$cacheKey] = CRM_Core_OptionGroup::values('case_type',
if (!isset(self::$caseType[$cacheKey])) {
self::$caseType[$cacheKey] = CRM_Core_OptionGroup::values('case_type',
- FALSE, FALSE, FALSE,
NULL
,
+ FALSE, FALSE, FALSE,
$condition
,
$column, $onlyActive
);
}
$column, $onlyActive
);
}