Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-6261

This patch adds the 'replace' functionality for the copyGeneric function in CRM\Core\DAO.php

    Details

    • Type: Patch
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.4
    • Fix Version/s: 3.2
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Patch for CRM\Core\DAO.php file to implement a 'replace' functionality similar to 'prefix' and 'suffix'. This is useful when copying an event to a different start/end date (i.e. create occurances of an event)

      1026d1025
      < $fieldsToReplace = array( ); //GE Added 4-7-2010
      1034,1037d1032
      < // fieldsToReplace – GE Added 4-7-2010
      < if ($fieldsFix['replace'])

      { < $fieldsToReplace = $fieldsFix['replace']; < }

      1053,1056d1047
      < // fieldsToReplace – GE Added 4-7-2010
      < if ( isset( $fieldsToReplace[$dbName] ) )

      { < $newObject->$dbName = $fieldsToReplace[$dbName]; < }


      1059,1060c1050
      < //$newObject->$dbName = CRM_Utils_Date::isoToMysql($object->$dbName);
      < $newObject->$dbName = CRM_Utils_Date::isoToMysql($newObject->$dbName); //GE Fixed this to ref newObject

      > $newObject->$dbName = CRM_Utils_Date::isoToMysql($object->$dbName);

      Reference: http://forum.civicrm.org/index.php/topic,13788.0.html

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              geeffland Greg Effland
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: