From 6e557bb378404bc7b6fc579282545b04b5d18fae Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Thu, 6 Feb 2014 11:33:18 -0500 Subject: [PATCH] CRM-14179 fix word replacement existing rows count --- CRM/Admin/Form/WordReplacements.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CRM/Admin/Form/WordReplacements.php b/CRM/Admin/Form/WordReplacements.php index 884cc6526a..1b79909dd0 100644 --- a/CRM/Admin/Form/WordReplacements.php +++ b/CRM/Admin/Form/WordReplacements.php @@ -116,7 +116,15 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form { public function buildQuickForm() { $config = CRM_Core_Config::singleton(); $values = $config->localeCustomStrings[$config->lcMessages]; - $instances = (count($values, COUNT_RECURSIVE) - 6); + + //CRM-14179 + $instances = 0; + foreach ( $values as $valMatchType ) { + foreach ( $valMatchType as $valPairs ) { + $instances += count($valPairs); + } + } + if ($instances > 10) { $this->_numStrings = $instances; } -- 2.25.1