Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accumulated backports for Mosaico support #9555

Closed
wants to merge 19 commits into from
Closed

Commits on Jan 18, 2017

  1. CRM-19690 - TokenProcessor - Backport from v4.7 to v4.6

    This adds the TokenProcessor and associated classes to the container in 4.6.
    These are not *used* at runtime -- but they're published so that extensions
    may use them.
    
    This folds in a few more recent patches to TokenProcessor subsystem provided
    by civicrm#9497 and removes the parts defined for scheduled reminders.
    totten committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    1ec5bd0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e1e95d7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d5c4958 View commit details
    Browse the repository at this point in the history
  4. CRM-19690 - Mailing - Make getTemplates and getVerpAndUrlsAndHeaders …

    …public
    
    These two functions will be useful in FlexMailer's DefaultEngine.
    totten committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    6fbbc4b View commit details
    Browse the repository at this point in the history
  5. CRM-19690 - CRM_Utils_Token::getAnonymousTokenDetails() - Add missing…

    … `static`
    
    This function is only called once, and it previously lacked test coverage,
    so the `static` warning previously snuck through. Fix it!
    totten committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    5c92978 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3c65d1d View commit details
    Browse the repository at this point in the history
  7. CRM-19690 - CRM_Mailing_MailingSystemTest - Improve CiviMail test cov…

    …erage - Fixup for v4.6
    totten committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    6ce1c8e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7fb0e12 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d6c1e51 View commit details
    Browse the repository at this point in the history
  10. CRM-19826 - CRM_Extension_System - Fix extra slash in vendor URLs

    If you install an extension under `$cmsRoot/vendor/org.example.foo`, the
    resulting URL contains an extraneous `/` (eg
    `http://example.org//vendor/org.example.foo`).  (In Windows, I suspect it's
    even worse because it uses DIRECTORY_SEPARATOR in the URl -- eg
    `http://example.org/\vendor/org.example.foo`.)
    
    This patch checks for and removes the extraneous slash -- and always
    constructs the URL with the appropriate delimiter (`/`).
    
    Problem observed in `dmaster`.
    totten committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    530ee4d View commit details
    Browse the repository at this point in the history
  11. CRM-19690 - crmMailing - Pick editor layout using template_type

    General notes:
    
     1. Template types can be declared (along with preferred editor) using
        hook_civicrm_mailingTemplateTypes.
     2. When creating a mailing, use the path `civicrm/a/#/mailing/new` to create
        a mailing with the default `template_type` (aka first-preferred, by weight).
     3. When creating a mailing, use the path `civicrm/a/#/mailing/new/{template_type}`
        to create a mailing with a specific `template_type`.
     4. When editing a mailing, check the `template_type` and load the
        appropriate editor.
     5. Some of hte boilerplate from `2step.html`, `unified.html`, etal has been
        moved to `base.html`.
    
    Note that this breaks a hidden feature -- before, you could switch among a
    few different layouts (`2step`, `unified`, `unified2`, `wizard`) by manually
    editing the URL (e.g.  `civicrm/a/#/mailing/2/unified`). Now, to change
    the layout of the traditional-style mailings, you can implement a hook, e.g.
    
    ```
    function mymod_civicrm_mailingTemplateTypes(&$types) {
      foreach ($types as &$typeDef) {
        if ($typeDef['name'] === 'traditional') {
          $typeDef['editorUrl'] = '~/crmMailing/EditMailingCtrl/unified.html';
        }
      }
    }
    ```
    totten committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    8769c52 View commit details
    Browse the repository at this point in the history
  12. CRM-19690 - Task_AdhocMailing - Use highest-priority template type

    If you perform a contact search and create a new mailing, it would use
    `template_type=traditional`, even if another template type had greater
    priority. With this patch,  it respects the priority.
    
    Note: I considered changing the default in Mailing.create API to always
    match most-preferred template-type.  However, that would break some existing
    API consumers (e.g.  headless consumers or ones who define their own UI).
    For external API-based integrations, we should preserve the default
    semantics of `body_text`/`body_html` by defaulting to
    `template_type=traditional`.
    
    The preference in CRM-19690 is that any use-case based on the screen
    `civicrm/a/#/mailing/{id}` should have its default determined by weight.
    totten committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    720633b View commit details
    Browse the repository at this point in the history
  13. CRM-19690 - Enable FlexMailer (if present)

    FlexMailer (https://github.com/civicrm/org.civicrm.flexmailer/) is a
    refactoring of the email-delivery logic from the Mailing BAOs.  The primary
    goal is to make the email-delivery logic more extensible by exposing a
    better set of events for extension-authors.  Sadly, the original code is a
    bit toxic (originally lacking in tests; thick with many features; using some
    quirky dataflows), which means:
    
     1. Any refactoring of it poses a high risk.
     2. The refactoring should ideally be done with iteration/validation as
        an optional extension.
    
    This patch aims to be the bare-minimum core patch required to facilitate a
    better 'leap by extension'.  The main priorities are:
    
     1. Minimize risk -- no impact on existing users who can continue using existing logic.
     2. Enable iteration/testing/deployment of an optional extension in real-world scenarios.
     3. Keep any core hacks clear and isolated - don't rashly commit to new, public APIs.
    totten committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    2cdf7a3 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    86344a2 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    d9df759 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    92a49a3 View commit details
    Browse the repository at this point in the history
  17. Civi\Test - Backport helper test classes from 4.7.

    Note: These classes are not actually referenced by anything in core v4.6;
    however, we provide so that extensions can use them.
    totten committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    c829601 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    30ef9dd View commit details
    Browse the repository at this point in the history
  19. CRM_Extension_Browser - Allow different cache files for different feeds

    The motivation here is to support these two different CLI commands:
    
    ```
    cv dl myextension
    cv dl myextension --dev
    ```
    
    The two commands differ in that they pull from different feeds -- e.g.  the
    stable feed `https://civicrm.org/extdir/ver={ver}|cms={uf}` vs the
    developmental feed `https://civicrm.org/extdir/ver={ver}|cms={uf}|status=`.
    However, this creates the real possibility that the user might go back/forth
    among different feeds (omitting/enabling the `--dev` option per whim).
    totten committed Jan 18, 2017
    Configuration menu
    Copy the full SHA
    528b869 View commit details
    Browse the repository at this point in the history