Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ static function importableFields($contactType = 'HRJobContractRevision',
$fields = CRM_Utils_Array::crmArraySortByField($fields, 'title');
$fields = CRM_Utils_Array::index(array('name'), $fields);

CRM_Core_BAO_Cache::setItem($fields, 'contact fields', $cacheKeyString);
}

self::$_importableFields[$cacheKeyString] = $fields;
Expand Down
1 change: 0 additions & 1 deletion hrjobcontract/CRM/Hrjobcontract/BAO/HRJobDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ static function importableFields($contactType = 'HRJobDetails',
//Sorting fields in alphabetical order(CRM-1507)
$fields = CRM_Utils_Array::crmArraySortByField($fields, 'title');
$fields = CRM_Utils_Array::index(array('name'), $fields);
CRM_Core_BAO_Cache::setItem($fields, 'contact fields', $cacheKeyString);
}

self::$_importableFields[$cacheKeyString] = $fields;
Expand Down
1 change: 0 additions & 1 deletion hrjobcontract/CRM/Hrjobcontract/BAO/HRJobHealth.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ static function importableFields($contactType = 'HRJobHealth',
$fields = CRM_Utils_Array::crmArraySortByField($fields, 'title');
$fields = CRM_Utils_Array::index(array('name'), $fields);

CRM_Core_BAO_Cache::setItem($fields, 'contact fields', $cacheKeyString);
}

self::$_importableFields[$cacheKeyString] = $fields;
Expand Down
1 change: 0 additions & 1 deletion hrjobcontract/CRM/Hrjobcontract/BAO/HRJobHour.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ static function importableFields($contactType = 'HRJobHour',
$fields = CRM_Utils_Array::crmArraySortByField($fields, 'title');
$fields = CRM_Utils_Array::index(array('name'), $fields);

CRM_Core_BAO_Cache::setItem($fields, 'contact fields', $cacheKeyString);
}

self::$_importableFields[$cacheKeyString] = $fields;
Expand Down
1 change: 0 additions & 1 deletion hrjobcontract/CRM/Hrjobcontract/BAO/HRJobLeave.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ static function importableFields($contactType = 'HRJobLeave',
//Sorting fields in alphabetical order
$fields = CRM_Utils_Array::crmArraySortByField($fields, 'title');
$fields = CRM_Utils_Array::index(array('name'), $fields);
CRM_Core_BAO_Cache::setItem($fields, 'contact fields', $cacheKeyString);
}
self::$_importableFields[$cacheKeyString] = $fields;
if (!$isProfile) {
Expand Down
1 change: 0 additions & 1 deletion hrjobcontract/CRM/Hrjobcontract/BAO/HRJobPay.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ static function importableFields($contactType = 'HRJobPay',
$fields = CRM_Utils_Array::crmArraySortByField($fields, 'title');
$fields = CRM_Utils_Array::index(array('name'), $fields);

CRM_Core_BAO_Cache::setItem($fields, 'contact fields', $cacheKeyString);
}

self::$_importableFields[$cacheKeyString] = $fields;
Expand Down
1 change: 0 additions & 1 deletion hrjobcontract/CRM/Hrjobcontract/BAO/HRJobPension.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ static function importableFields($contactType = 'HRJobPension',
$fields = CRM_Utils_Array::crmArraySortByField($fields, 'title');
$fields = CRM_Utils_Array::index(array('name'), $fields);

CRM_Core_BAO_Cache::setItem($fields, 'contact fields', $cacheKeyString);
}

self::$_importableFields[$cacheKeyString] = $fields;
Expand Down
1 change: 0 additions & 1 deletion hrjobcontract/CRM/Hrjobcontract/BAO/HRJobRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ static function importableFields($contactType = 'HRJobRole',
$fields = CRM_Utils_Array::crmArraySortByField($fields, 'title');
$fields = CRM_Utils_Array::index(array('name'), $fields);

CRM_Core_BAO_Cache::setItem($fields, 'contact fields', $cacheKeyString);
}

self::$_importableFields[$cacheKeyString] = $fields;
Expand Down
4 changes: 2 additions & 2 deletions hrui/CRM/Core/BAO/Navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public static function getNavigationList() {
$config = CRM_Core_Config::singleton();

// check if we can retrieve from database cache
$navigations = CRM_Core_BAO_Cache::getItem('navigation', $cacheKeyString);
$navigations = Civi::cache('navigation')->get($cacheKeyString);

if (!$navigations) {
$domainID = CRM_Core_Config::domainID();
Expand All @@ -187,7 +187,7 @@ public static function getNavigationList() {
$navigations = array();
self::_getNavigationLabel($pidGroups[''], $navigations);

CRM_Core_BAO_Cache::setItem($navigations, 'navigation', $cacheKeyString);
Civi::cache('navigation')->set($cacheKeyString, $navigations);
}
return $navigations;
}
Expand Down
4 changes: 2 additions & 2 deletions uk.co.compucorp.civicrm.hrcore/CRM/HRCore/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ class CRM_HRCore_Info {
*/
public static function getVersion() {

$version = CRM_Core_BAO_Cache::getItem('HRCore_Info', 'version');
$version = Civi::cache('HRCore_Info')->get('version');

if (empty($version)) {
$info = CRM_Extension_Info::loadFromFile(__DIR__ . '/../../info.xml');
$version = $info->version;
CRM_Core_BAO_Cache::setItem($version, 'HRCore_Info', 'version');
Civi::cache('HRCore_Info')->set('version', $version);
}

return $version;
Expand Down
12 changes: 12 additions & 0 deletions uk.co.compucorp.civicrm.hrcore/config/container/container.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@
class="CRM_HRCore_CMSData_Role_RoleServiceInterface"
/>
<service id="core.cache" class="CRM_Core_BAO_Cache"/>
<service id="cache.HRCore_Info" class="CRM_Utils_Cache_Interface"
factory-class="CRM_Utils_Cache" factory-method="create">
<argument type="collection">
<argument key="name">HRCore_Info</argument>
<argument key="type" type="collection">
<argument>*memory*</argument>
<argument>SqlGroup</argument>
<argument>ArrayCache</argument>
</argument>
<argument key="withArray">fast</argument>
</argument>
</service>
<service id="core.http_client" class="CRM_Utils_HttpClient">
<argument>%civihr.connection_timeout%</argument>
</service>
Expand Down