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

Duplicated function in CustomGroup.php for apachesolr_civiAttachments

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.6.9
    • Fix Version/s: None
    • Component/s: CiviCRM Search
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      I've just discovered a method that is pretty much duplicated in Core/BAO/CustomGroup.php : getTableNameByEntityName() and mapTableName()

      Having grepped the codebase, mapTableName() is the only one in use. The former is only used by the module apachesolr_civiAttachments (as per the @see in the comments): https://github.com/civicrm/apachesolr_civiAttachments/search?utf8=%E2%9C%93&q=getTableNameByEntityName

      Could we just delete that method and switch apachesolr_civiAttachments to using mapTableName instead? I notice mapTableName has a bit of extra logic at the end - but it could be a straight swap?

      Looks like you've done the bulk of the work on the module Tim, I didn't want to step on your toes, but could do a PR if it sounds sensible.

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              john John K.
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: