Skip to content

Commit

Permalink
CRM-20958 - TimestampTriggers - Update docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
totten committed Aug 2, 2017
1 parent dfe984e commit 40399e1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Civi/Core/SqlTrigger/TimestampTriggers.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,15 @@ public function onTriggerInfo($e) {
* See hook_civicrm_triggerInfo.
*/
public function alterTriggerInfo(&$info, $tableFilter = NULL) {
//during upgrade, first check for valid version and then create triggers
//i.e the columns created_date and modified_date are introduced in 4.3.alpha1 so dont create triggers for older version
// If we haven't upgraded yet, then the created_date/modified_date may not exist.
// In the past, this was a version-based check, but checkFieldExists()
// seems more robust.
if (\CRM_Core_Config::isUpgradeMode()) {
if (!\CRM_Core_DAO::checkFieldExists($this->getTableName(),
$this->getCreatedDate())
) {
return;
}
// $currentVer = CRM_Core_BAO_Domain::version(TRUE);
// if (version_compare($currentVer, '4.3.alpha1') < 0) {
// return;
// }
}

if ($tableFilter == NULL || $tableFilter == $this->getTableName()) {
Expand Down

0 comments on commit 40399e1

Please sign in to comment.