Skip to content

Commit

Permalink
Merge pull request #453 from mattwire/nodejsv
Browse files Browse the repository at this point in the history
2.7
  • Loading branch information
mattwire authored May 24, 2021
2 parents a600002 + a6c0816 commit 7800d47
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 37 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: uk.co.vedaconsulting.mosaico
Copyright (C) 2016, deepak-srivastava <[email protected]>
Copyright (C) 2021, CiviCRM <[email protected]>
Licensed under the GNU Affero Public License 3.0 (below).

-------------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ This extension integrates a responsive email template editor, [Mosaico](https://
View/Download this extension in the [Extension Directory](https://civicrm.org/extensions/email-template-builder).

## Compatibility / Requirements
* CiviCRM 5.24+
* PHP-ImageMagick - recommended.
* [FlexMailer](https://docs.civicrm.org/flexmailer/en/latest/) 1.1+
* [FlexMailer](https://docs.civicrm.org/flexmailer/en/latest/)

## Documentation

Expand Down
5 changes: 5 additions & 0 deletions docs/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ This option requires several command-line tools:
* [`grunt-cli`](http://gruntjs.com/getting-started)
* [`cv`](https://github.com/civicrm/cv)

!!! note "nodejs"
Currently the mosaico build script only works with node v8 and older. You can use `nvm` -
https://github.com/nvm-sh/nvm#installing-and-updating to use multiple versions of nodejs.
Eg. `nvm install 8 && nvm use 8`

Once these are installed, you should:

```
Expand Down
7 changes: 3 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ This extension integrates a responsive email template editor, [Mosaico](https://

View/Download this extension in the [Extension Directory](https://civicrm.org/extensions/email-template-builder).

## Compatibility / Requirements
* CiviCRM 5.24+
## Requirements
* PHP-ImageMagick - recommended.
* [FlexMailer](https://docs.civicrm.org/flexmailer/en/latest/) 1.1+
* [FlexMailer](https://docs.civicrm.org/flexmailer/en/latest/)

## History and blog posts
* [Initial Blog Post](https://civicrm.org/blogs/parvez/a-new-beginning-for-civimail)
Expand All @@ -21,7 +20,7 @@ View/Download this extension in the [Extension Directory](https://civicrm.org/ex

For help installing extensions, please see the [Install a New Extension section of the Extensions chapter](https://docs.civicrm.org/sysadmin/en/latest/customize/extensions/#installing-a-new-extension) in the SysAdmin Guide.

!!! warning "DO NOT DOWNLOAD DIRECTLY FROM GITHUB"
!!! warning "DO NOT DOWNLOAD DIRECTLY FROM GITHUB"
Download Mosaico from the [Mosaico page on the CiviCRM extensions directory](https://civicrm.org/extensions/email-template-builder) as the Mosaico extension requires additional packaging steps for a working release!

## Getting started (Usage)
Expand Down
10 changes: 10 additions & 0 deletions docs/releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
**DO NOT DOWNLOAD DIRECTLY FROM GITHUB**
Download via [the extensions directory](https://civicrm.org/extensions/email-template-builder) as there are additional packaging requirements not handled by github.

## Release 2.7

* [#440](https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/440) Add support for personalized tokens for "View in your browser" mode.
* [#451](https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/451) Update unit tests to work with phpunit8.
* [#452](https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/452) Use Generic Settings Form rather than our custom form. Fix for issue #427
* [#427](https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/427) Update AutoGenerated DAO, Civix, auto_install files to be latest versions from civix commands.
* [#437](https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/437) phpunit8 testing compatibility.
* [#433](https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/433) Throw error message on resizing image and prevent hard fail.
* [#414](https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/414) Add setting to hide base templates.

## Release 2.6

* [#321](https://github.com/veda-consulting-company/uk.co.vedaconsulting.mosaico/issues/321) Introduce A/B testing for subject lines.
Expand Down
6 changes: 3 additions & 3 deletions info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
<url desc="Support">https://vedaconsulting.co.uk</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2020-12-24</releaseDate>
<version>2.6</version>
<releaseDate>2021-05-24</releaseDate>
<version>2.7</version>
<develStage>stable</develStage>
<compatibility>
<ver>5.35</ver>
</compatibility>
<requires>
<ext version="~1.1">org.civicrm.flexmailer</ext>
<ext>org.civicrm.flexmailer</ext>
</requires>
<comments>To help contribute please contact us on [email protected] or initiate a conversation / issue on github.</comments>
<civix>
Expand Down
30 changes: 3 additions & 27 deletions mosaico.civix.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,40 +221,16 @@ function _mosaico_civix_upgrader() {
* Search directory tree for files which match a glob pattern.
*
* Note: Dot-directories (like "..", ".git", or ".svn") will be ignored.
* Note: In Civi 4.3+, delegate to CRM_Utils_File::findFiles()
* Note: Delegate to CRM_Utils_File::findFiles(), this function kept only
* for backward compatibility of extension code that uses it.
*
* @param string $dir base dir
* @param string $pattern , glob pattern, eg "*.txt"
*
* @return array
*/
function _mosaico_civix_find_files($dir, $pattern) {
if (is_callable(['CRM_Utils_File', 'findFiles'])) {
return CRM_Utils_File::findFiles($dir, $pattern);
}

$todos = [$dir];
$result = [];
while (!empty($todos)) {
$subdir = array_shift($todos);
foreach (_mosaico_civix_glob("$subdir/$pattern") as $match) {
if (!is_dir($match)) {
$result[] = $match;
}
}
if ($dh = opendir($subdir)) {
while (FALSE !== ($entry = readdir($dh))) {
$path = $subdir . DIRECTORY_SEPARATOR . $entry;
if ($entry[0] == '.') {
}
elseif (is_dir($path)) {
$todos[] = $path;
}
}
closedir($dh);
}
}
return $result;
return CRM_Utils_File::findFiles($dir, $pattern);
}

/**
Expand Down

0 comments on commit 7800d47

Please sign in to comment.