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 #11672 from omarabuhussein/CRM-21769-improve-unsupported-locale...
[civicrm-core.git]
/
CRM
/
Utils
/
Type.php
diff --git
a/CRM/Utils/Type.php
b/CRM/Utils/Type.php
index 29b05579aec49e98fe344da20a966fad9a636fcb..3cd8085a2d216dc67f0d3c1ebaa617fe731aa98f 100644
(file)
--- a/
CRM/Utils/Type.php
+++ b/
CRM/Utils/Type.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version
4.7
|
+ | CiviCRM version
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
7
|
+ | Copyright CiviCRM LLC (c) 2004-201
8
|
+--------------------------------------------------------------------+
| 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
7
+ * @copyright CiviCRM LLC (c) 2004-201
8
*/
class CRM_Utils_Type {
const
*/
class CRM_Utils_Type {
const
@@
-422,6
+422,7
@@
class CRM_Utils_Type {
'MysqlOrderByDirection',
'MysqlOrderBy',
'ExtensionKey',
'MysqlOrderByDirection',
'MysqlOrderBy',
'ExtensionKey',
+ 'Json',
);
if (!in_array($type, $possibleTypes)) {
if ($isThrowException) {
);
if (!in_array($type, $possibleTypes)) {
if ($isThrowException) {
@@
-526,7
+527,13
@@
class CRM_Utils_Type {
break;
case 'ExtensionKey':
break;
case 'ExtensionKey':
- if (CRM_Utils_Rule::checkExtesnionKeyIsValid($data)) {
+ if (CRM_Utils_Rule::checkExtensionKeyIsValid($data)) {
+ return $data;
+ }
+ break;
+
+ case 'Json':
+ if (CRM_Utils_Rule::json($data)) {
return $data;
}
break;
return $data;
}
break;