projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c6195a0
)
Fixes Jenkins warnings
author
francescbassas
<francesc@babu.cat>
Wed, 27 Jul 2016 11:15:34 +0000
(13:15 +0200)
committer
GitHub
<noreply@github.com>
Wed, 27 Jul 2016 11:15:34 +0000
(13:15 +0200)
CRM/Contact/BAO/ContactType.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Contact/BAO/ContactType.php
b/CRM/Contact/BAO/ContactType.php
index 7b0dece4bab76ad272717fe952427505134ea6c2..d9193f9ba4697994bd5f8f3a4b0fc6a16335d016 100644
(file)
--- a/
CRM/Contact/BAO/ContactType.php
+++ b/
CRM/Contact/BAO/ContactType.php
@@
-893,7
+893,7
@@
WHERE extends = %1 AND " . implode(" OR ", $subTypeClause);
*
* @return bool
*/
*
* @return bool
*/
- public static function deleteCustomRowsOfSubtype($gID, $subtypes = array(), $subtypesToPreserve = array()
) {
+ public static function deleteCustomRowsOfSubtype($gID, $subtypes = array(), $subtypesToPreserve = array()) {
if (!$gID or empty($subtypes)) {
return FALSE;
}
if (!$gID or empty($subtypes)) {
return FALSE;
}
@@
-902,19
+902,18
@@
WHERE extends = %1 AND " . implode(" OR ", $subTypeClause);
// drop triggers CRM-13587
CRM_Core_DAO::dropTriggers($tableName);
// drop triggers CRM-13587
CRM_Core_DAO::dropTriggers($tableName);
-
+
foreach ($subtypesToPreserve as $subtypeToPreserve) {
foreach ($subtypesToPreserve as $subtypeToPreserve) {
-
$subtypeToPreserve = CRM_Utils_Type::escape($subtypeToPreserve, 'String');
-
$subtypesToPreserveClause[] = "(
civicrm_contact.contact_sub_type NOT LIKE '%" . CRM_Core_DAO::VALUE_SEPARATOR . $subtypeToPreserve . CRM_Core_DAO::VALUE_SEPARATOR . "%')";
+ $subtypeToPreserve = CRM_Utils_Type::escape($subtypeToPreserve, 'String');
+
$subtypesToPreserveClause[] = "(
civicrm_contact.contact_sub_type NOT LIKE '%" . CRM_Core_DAO::VALUE_SEPARATOR . $subtypeToPreserve . CRM_Core_DAO::VALUE_SEPARATOR . "%')";
}
$subtypesToPreserveClause = implode(' AND ', $subtypesToPreserveClause);
}
$subtypesToPreserveClause = implode(' AND ', $subtypesToPreserveClause);
-
$subtypeClause = array();
foreach ($subtypes as $subtype) {
$subtype = CRM_Utils_Type::escape($subtype, 'String');
$subtypeClause[] = "( civicrm_contact.contact_sub_type LIKE '%" . CRM_Core_DAO::VALUE_SEPARATOR . $subtype . CRM_Core_DAO::VALUE_SEPARATOR . "%'"
$subtypeClause = array();
foreach ($subtypes as $subtype) {
$subtype = CRM_Utils_Type::escape($subtype, 'String');
$subtypeClause[] = "( civicrm_contact.contact_sub_type LIKE '%" . CRM_Core_DAO::VALUE_SEPARATOR . $subtype . CRM_Core_DAO::VALUE_SEPARATOR . "%'"
-
. " AND " . $subtypesToPreserveClause . ")";
+ . " AND " . $subtypesToPreserveClause . ")";
}
$subtypeClause = implode(' OR ', $subtypeClause);
}
$subtypeClause = implode(' OR ', $subtypeClause);