From 514813c01ff2eb53c58d55b672510f54ca3b46bb Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 26 Jul 2018 16:00:54 -0700 Subject: [PATCH] (dev/core#217) PrevNext - Cleanup parameter name in Sql::markSelection The new name is prettier and matches the names in `CRM_Core_PrevNextCache_{Interface,Redis}`. --- CRM/Core/PrevNextCache/Sql.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CRM/Core/PrevNextCache/Sql.php b/CRM/Core/PrevNextCache/Sql.php index fc73de4408..8771cb6c39 100644 --- a/CRM/Core/PrevNextCache/Sql.php +++ b/CRM/Core/PrevNextCache/Sql.php @@ -78,19 +78,19 @@ INSERT INTO civicrm_prevnext_cache (cacheKey, entity_id1, data) * @param string $cacheKey * @param string $action * Ex: 'select', 'unselect'. - * @param array|int|NULL $cIds + * @param array|int|NULL $ids * A list of contact IDs to (un)select. * To unselect all contact IDs, use NULL. */ - public function markSelection($cacheKey, $action, $cIds = NULL) { + public function markSelection($cacheKey, $action, $ids = NULL) { if (!$cacheKey) { return; } $params = array(); - if ($cIds && $cacheKey && $action) { - if (is_array($cIds)) { - $cIdFilter = "(" . implode(',', $cIds) . ")"; + if ($ids && $cacheKey && $action) { + if (is_array($ids)) { + $cIdFilter = "(" . implode(',', $ids) . ")"; $whereClause = " WHERE cacheKey = %1 AND (entity_id1 IN {$cIdFilter} OR entity_id2 IN {$cIdFilter}) @@ -101,7 +101,7 @@ AND (entity_id1 IN {$cIdFilter} OR entity_id2 IN {$cIdFilter}) WHERE cacheKey = %1 AND (entity_id1 = %2 OR entity_id2 = %2) "; - $params[2] = array("{$cIds}", 'Integer'); + $params[2] = array("{$ids}", 'Integer'); } if ($action == 'select') { $whereClause .= "AND is_selected = 0"; @@ -115,7 +115,7 @@ AND (entity_id1 = %2 OR entity_id2 = %2) } // default action is reseting } - elseif (!$cIds && $cacheKey && $action == 'unselect') { + elseif (!$ids && $cacheKey && $action == 'unselect') { $sql = " UPDATE civicrm_prevnext_cache SET is_selected = 0 -- 2.25.1