+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
protected $_fields;
/**
- * Class constructor
+ * Class constructor.
*
* @param $customSearchClass
* @param array $formValues
);
$config = CRM_Core_Config::singleton();
- if ($config->mapAPIKey && $config->mapProvider) {
+ //CRM-16552: mapAPIKey is not mandatory as google no longer requires an API Key
+ if ($config->mapProvider && ($config->mapAPIKey || $config->mapProvider == 'Google')) {
self::$_links[CRM_Core_Action::MAP] = array(
'name' => ts('Map'),
'url' => 'civicrm/contact/map',
}
/**
- * Returns all the rows in the given offset and rowCount
+ * Returns all the rows in the given offset and rowCount.
*
* @param string $action
* The action being performed.
if ($id == 'Primary') {
$locationTypeName = 1;
}
+ elseif ($fieldName == 'url') {
+ $locationTypeName = "website-{$id}";
+ }
else {
$locationTypeName = CRM_Utils_Array::value($id, $locationTypes);
if (!$locationTypeName) {
}
elseif (strpos($property, '-url') !== FALSE) {
$websiteUrl = '';
- $websiteKey = 'website-1';
+ $websiteKey = str_replace('-url', '', $property);
$propertyArray = explode('-', $property);
$websiteFld = $websiteKey . '-' . array_pop($propertyArray);
if (!empty($result->$websiteFld)) {
//for text field pagination selection save
$countRow = CRM_Core_BAO_PrevNextCache::getCount($cacheKey, NULL, "entity_table = 'civicrm_contact'");
-
// $sortByCharacter triggers a refresh in the prevNext cache
if ($sortByCharacter && $sortByCharacter != 'all') {
$cacheKey .= "_alphabet";
$this->fillupPrevNextCache($sort, $cacheKey);
}
elseif ($firstRecord >= $countRow) {
- $this->fillupPrevNextCache($sort, $cacheKey, $countRow, 500);
+ $this->fillupPrevNextCache($sort, $cacheKey, $countRow, 500 + $firstRecord - $countRow);
}
return $cacheKey;
}
}
/**
- * Get colunmn headers for search selector
+ * Get colunmn headers for search selector.
*
* @return array
*/