Skip to content

Commit

Permalink
Merge branch 'staging' into cookie-improvements
Browse files Browse the repository at this point in the history
# Conflicts:
#   app/bundles/CoreBundle/Translations/en_US/messages.ini
  • Loading branch information
escopecz committed May 5, 2017
2 parents 686a4f6 + 1a38b63 commit afeb29a
Show file tree
Hide file tree
Showing 383 changed files with 17,343 additions and 3,560 deletions.
Empty file modified .github/PULL_REQUEST_TEMPLATE.md
100755 → 100644
Empty file.
54 changes: 45 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,81 @@
!.gitignore
!.htaccess
!.gitkeep
/composer.phar

/app/bootstrap*
/app/tests.bootstrap*
/app/phpunit.xml

/app/bundles/CoreBundle/Assets/css/app/less/**/*.css
/app/bundles/CoreBundle/Assets/css/libraries/**/*.css
/app/bundles/CoreBundle/Assets/css/libraries/Froala/plugins/*.css
!/app/bundles/CoreBundle/Assets/css/libraries/builder.css
!/app/bundles/CoreBundle/Assets/css/libraries/froala/plugins/gated_video.css
!/app/bundles/CoreBundle/Assets/css/*.css

/app/cache/*
!/app/cache/.gitkeep
/app/logs/*
!/app/logs/.gitkeep

/app/config/local*.php
/app/config/config_local.php
/app/config/paths_local.php

/app/logs/*
!/app/logs/.gitkeep

/app/Resources/SensioGeneratorBundle
/app/phpunit.xml
/app/spool/*

/vendor/*
!/vendor/.htaccess

/bin/*
/composer.phar
/bundles
/media/files/*
!/media/files/.htaccess
/node_modules
/build/packaging
/build/packages/*
!/build/packages/.placeholder
/mockup
/upgrade
/upgrade_errors.txt
/translations

/media/dashboards/*
!/media/dashboards/*.json
/media/files/*
!/media/files/.htaccess
/media/images/*
!/media/images/flags
!/media/images/apple-touch-icon.png
!/media/images/avatar.png
!/media/images/favicon.ico
!/media/images/mautic_logo*
!/media/images/.htaccess
/media/dashboards/*
!/media/dashboards/*.json

/plugins/*
!/plugins/MauticCitrixBundle
!/plugins/MauticClearbitBundle
!/plugins/MauticCloudStorageBundle
!/plugins/MauticCrmBundle
!/plugins/MauticEmailMarketingBundle
!/plugins/MauticFocusBundle
!/plugins/MauticFullContactBundle
!/plugins/MauticGmailBundle
!/plugins/MauticOutlookBundle
!/plugins/MauticSocialBundle
!/plugins/index.html

/themes/*
!/themes/blank
!/themes/coffee
!/themes/goldstar
!/themes/Mauve
!/themes/nature
!/themes/neopolitan
!/themes/oxygen
!/themes/skyline
!/themes/sunday
!/themes/blank.png
!/themes/blank-big.png

/translations
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ php:
#- 5.5
- 5.6
- 7.0
- 7.1

matrix:
allow_failures:
- php: 7.0

before_script:
- composer install
Expand Down
3 changes: 2 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = function (grunt) {
mautic: {
// configurable paths
bundleAssets: 'app/bundles/**/Assets/css',
pluginAssets: 'plugins/**/Assets/css',
rootAssets: 'media/css'
},

Expand All @@ -31,7 +32,7 @@ module.exports = function (grunt) {
// Compiles less files in bundle's Assets/css root and single level directory to CSS
less: {
files: {
src: ['<%= mautic.bundleAssets %>/*.less', '<%= mautic.bundleAssets %>/*/*.less', '<%= mautic.bundleAssets %>/../builder/*.less'],
src: ['<%= mautic.bundleAssets %>/*.less', '<%= mautic.pluginAssets %>/*.less', '<%= mautic.bundleAssets %>/*/*.less', '<%= mautic.bundleAssets %>/../builder/*.less'],
expand: true,
rename: function (dest, src) {
return dest + src.replace('.less', '.css')
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Installing from source is only recommended if you are comfortable using the comm
#### Mautic requirements

1. See [Mautic requirements](https://www.mautic.org/download/requirements).
2. PHP modules:
2. PHP modules:
- required: `zip`, `xml`, `mcrypt`, `imap`, `mailparse`
- recommended: `openssl`, `opcache` / `apcu` / `memcached`
- recommended for development: `xdebug`
Expand All @@ -76,32 +76,32 @@ Before running these commands, please make a backup of your database.

If updating from <a href="https://github.com/mautic/mautic/releases">a tagged release</a> to <a href="https://github.com/mautic/mautic/releases">a tagged release</a>, schema changes will be included in a migrations file. To apply the changes, run

`$ php app/console doctrine:migrations:migrate`
$ php app/console doctrine:migrations:migrate

If you are updating to the latest source (remember this is alpha), first run

`$ php app/console doctrine:schema:update --dump-sql`
$ php app/console doctrine:schema:update --dump-sql

This will list out the queries Doctrine wants to execute in order to get the schema up-to-date (no queries are actually executed). Review the queries to ensure there is nothing detrimental to your data. If you have doubts about a query, submit an issue here and we'll verify it.

If you're satisfied with the queries, execute them with

`$ php app/console doctrine:schema:update --force`
$ php app/console doctrine:schema:update --force

Your schema should now be up-to-date with the source.

# Usage

Learning how to use marketing automation can be challenging. The first step is to understand what marketing automation is and how it can help your business be more successful. This quick usage outline is not meant to be comprehensive but will outline a few key areas of Mautic and how to use each of them.
Learning how to use marketing automation can be challenging. The first step is to understand what marketing automation is and how it can help your business be more successful. This quick usage outline is not meant to be comprehensive but will outline a few key areas of Mautic and how to use each of them.

*You can find more detailed information at <a href="https://docs.mautic.org">https://docs.mautic.org</a>*

### 1. Monitoring

The act of monitoring website traffic and visitors is often the first step in a marketing automation system. This step involves collecting details and information about each visitor to your website.
The act of monitoring website traffic and visitors is often the first step in a marketing automation system. This step involves collecting details and information about each visitor to your website.

#### Visitor Types
There are two types of visitor, **anonymous** and **known**.
There are two types of visitor, **anonymous** and **known**.

**Anonymous visitors** are all visitors which browse to your website. These visitors are monitored and certain key pieces of information are collected. This information includes:

Expand Down Expand Up @@ -143,16 +143,16 @@ There are several ways to connect with your leads. The three most common are **e

**Landing pages** are usually the first step in the connection process as these are used to make initial contact with leads and collect the information to move them from an anonymous visitor to a known visitor. These pages are used to funnel visitors to a specific call to action. This call to action is usually a form to collect the visitor's information.

###3. Automating
### 3. Automating

One of Mautic's main purposes is to enable automation of specific tasks. The task of connecting with leads is one such area where automation becomes increasingly valuable. Mautic allows you to define specific times, events, or actions when a connection should be triggered. Here is an example of an automation process.
One of Mautic's main purposes is to enable automation of specific tasks. The task of connecting with leads is one such area where automation becomes increasingly valuable. Mautic allows you to define specific times, events, or actions when a connection should be triggered. Here is an example of an automation process.

**Example**
A visitor fills out a call-to-action form on your landing page. This form collects their email address and automatically moves them from an **anonymous** to a **known** visitor. As a known visitor they are now added as a new lead to a specific campaign. This campaign will send the new lead an email you have pre-defined. You can then define additional actions to be taken based on the lead's response to your email.
A visitor fills out a call-to-action form on your landing page. This form collects their email address and automatically moves them from an **anonymous** to a **known** visitor. As a known visitor they are now added as a new lead to a specific campaign. This campaign will send the new lead an email you have pre-defined. You can then define additional actions to be taken based on the lead's response to your email.

This example demonstrates several uses of automation. First, the visitor is *automatically* moved from anonymous to known status. Second, the visitor is *automatically* added to a particular campaign. Lastly the visitor is sent an email *automatically* as a new lead.
This example demonstrates several uses of automation. First, the visitor is *automatically* moved from anonymous to known status. Second, the visitor is *automatically* added to a particular campaign. Lastly the visitor is sent an email *automatically* as a new lead.

There are many more ways in which automation can be used throughout Mautic to improve efficiency and reduce the time you spend connecting with your leads. As mentioned earlier, refer to [https://docs.mautic.org](https://docs.mautic.org) for more details.
There are many more ways in which automation can be used throughout Mautic to improve efficiency and reduce the time you spend connecting with your leads. As mentioned earlier, refer to [https://docs.mautic.org](https://docs.mautic.org) for more details.

## Customizing - Plugins, Themes

Expand All @@ -168,7 +168,7 @@ Read more about API and webhooks in the [Mautic Developer Docummentation](https:

## Translations

One benefit of using Mautic is the ability to modify and customize the solution to fit your needs. Mautic allows you to quickly change to your preferred language, or modify any string through the language files. These language files are available for the translation by the community at [Transifex](https://www.transifex.com/mautic/mautic/dashboard) and if you are interested you can add more languages, or help to translate the current ones.
One benefit of using Mautic is the ability to modify and customize the solution to fit your needs. Mautic allows you to quickly change to your preferred language, or modify any string through the language files. These language files are available for the translation by the community at [Transifex](https://www.transifex.com/mautic/mautic/dashboard) and if you are interested you can add more languages, or help to translate the current ones.

## How to test a pull request

Expand Down Expand Up @@ -207,7 +207,7 @@ Every change to Mautic core happens via PRs. Every PR must have 2 successful tes

## Unit Tests

The unit tests can be executed in the Mautic root directory with `phpunit --bootstrap vendor/autoload.php --configuration app/phpunit.xml.dist app/bundles` command.
The unit tests can be executed in the Mautic root directory with `composer test` command.

# FAQ and Contact Information
Marketing automation has historically been a difficult tool to implement in a business. The Mautic community is a rich environment for you to learn from others and share your knowledge as well. Open source means more than open code. Open source is providing equality for all and a chance to improve. If you have questions then the Mautic community can help provide the answers.
Expand Down
3 changes: 2 additions & 1 deletion app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AppKernel extends Kernel
*
* @const integer
*/
const MINOR_VERSION = 6;
const MINOR_VERSION = 8;

/**
* Patch version number.
Expand Down Expand Up @@ -181,6 +181,7 @@ public function registerBundles()
new Mautic\WebhookBundle\MauticWebhookBundle(),
new LightSaml\SymfonyBridgeBundle\LightSamlSymfonyBridgeBundle(),
new LightSaml\SpBundle\LightSamlSpBundle(),
new Ivory\OrderedFormBundle\IvoryOrderedFormBundle(),
];

//dynamically register Mautic Plugin Bundles
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/ApiBundle/Translations/en_US/messages.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mautic.api.auth.error.signature_method_rejected="The signature method used is un
mautic.api.auth.error.signature_invalid="The signature provided does not match the one calculated by the service."
mautic.api.auth.error.consumer_key_unknown="The consumer key provided is unsupported."
mautic.api.auth.error.token_expired="The access token provided is valid, but has expired."
mautic.api.auth.error.token_rejected="The token provided does not have the right format.";
mautic.api.auth.error.token_rejected="The token provided does not have the right format."
mautic.api.auth.error.additional_authorization_required="The access token does not have the correct access scopes."
permission_denied="The access session handle (ASH) has expired or is invalid."
mautic.api.call.notfound="Object not found."
Expand Down
17 changes: 15 additions & 2 deletions app/bundles/AssetBundle/EventListener/ReportSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ public function onReportBuilder(ReportBuilderEvent $event)
],
];

$columns = array_merge($columns, $event->getStandardColumns($prefix, ['name'], 'mautic_asset_action'), $event->getCategoryColumns());
$columns = array_merge(
$columns,
$event->getStandardColumns($prefix, ['name'], 'mautic_asset_action'),
$event->getCategoryColumns(),
$event->getCampaignByChannelColumns()
);

$event->addTable(
'assets',
[
Expand Down Expand Up @@ -107,7 +113,12 @@ public function onReportBuilder(ReportBuilderEvent $event)
'asset.downloads',
[
'display_name' => 'mautic.asset.report.downloads.table',
'columns' => array_merge($columns, $downloadColumns, $event->getLeadColumns(), $event->getIpColumn()),
'columns' => array_merge(
$columns,
$downloadColumns,
$event->getLeadColumns(),
$event->getIpColumn()
),
],
'assets'
);
Expand Down Expand Up @@ -135,6 +146,7 @@ public function onReportGenerate(ReportGeneratorEvent $event)
if ($context == 'assets') {
$queryBuilder->from(MAUTIC_TABLE_PREFIX.'assets', 'a');
$event->addCategoryLeftJoin($queryBuilder, 'a');
$event->addCampaignByChannelJoin($queryBuilder, 'a', 'asset');
} elseif ($context == 'asset.downloads') {
$event->applyDateFilters($queryBuilder, 'date_download', 'ad');

Expand All @@ -143,6 +155,7 @@ public function onReportGenerate(ReportGeneratorEvent $event)
$event->addCategoryLeftJoin($queryBuilder, 'a');
$event->addLeadLeftJoin($queryBuilder, 'ad');
$event->addIpAddressLeftJoin($queryBuilder, 'ad');
$event->addCampaignByChannelJoin($queryBuilder, 'a', 'asset');
}

$event->setQueryBuilder($queryBuilder);
Expand Down
2 changes: 1 addition & 1 deletion app/bundles/CampaignBundle/Config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
],
'mautic.form.type.campaignconfig' => [
'class' => 'Mautic\CampaignBundle\Form\Type\ConfigType',
'arguments' => 'mautic.factory',
'arguments' => 'translator',
'alias' => 'campaignconfig',
],
],
Expand Down
14 changes: 10 additions & 4 deletions app/bundles/CampaignBundle/Entity/LeadEventLogRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ public function getLeadLogs($leadId, array $options = [])
->leftJoin('ll', MAUTIC_TABLE_PREFIX.'campaign_events', 'e', 'll.event_id = e.id')
->leftJoin('ll', MAUTIC_TABLE_PREFIX.'campaigns', 'c', 'll.campaign_id = c.id')
->where('ll.lead_id = '.(int) $leadId)
->andWhere('e.event_type = :eventType')
->setParameter('eventType', 'action');
->andWhere('e.event_type != :eventType')
->setParameter('eventType', 'decision');

if (isset($options['scheduledState'])) {
if ($options['scheduledState']) {
Expand Down Expand Up @@ -176,8 +176,14 @@ public function getUpcomingEvents(array $options = null)
}

if (isset($options['eventType'])) {
$query->andwhere('e.event_type = :eventType')
->setParameter('eventType', $options['eventType']);
if (is_array($options['eventType'])) {
$query->andWhere(
$query->expr()->in('e.event_type', array_map([$query->expr(), 'literal'], $options['eventType']))
);
} else {
$query->andwhere('e.event_type = :eventTypes')
->setParameter('eventTypes', $options['eventType']);
}
}

if (isset($options['limit'])) {
Expand Down
11 changes: 10 additions & 1 deletion app/bundles/CampaignBundle/Form/Type/ConfigType.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php
// plugins/HelloWorldBundle/Form/Type/ConfigType.php

/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/

namespace Mautic\CampaignBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
Expand Down
8 changes: 7 additions & 1 deletion app/bundles/CampaignBundle/Model/CampaignModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ public function setEvents(Campaign $entity, $sessionEvents, $sessionConnections,
}

$relationships = [];

if (isset($sessionConnections['connections'])) {
foreach ($sessionConnections['connections'] as $connection) {
$source = $connection['sourceId'];
Expand All @@ -299,7 +300,12 @@ public function setEvents(Campaign $entity, $sessionEvents, $sessionConnections,
// Only concerned with events and not sources
continue;
}
$sourceDecision = (!empty($connection['anchors'][0])) ? $connection['anchors'][0]['endpoint'] : null;

if (isset($connection['anchors']['source'])) {
$sourceDecision = $connection['anchors']['source'];
} else {
$sourceDecision = (!empty($connection['anchors'][0])) ? $connection['anchors'][0]['endpoint'] : null;
}

if ($sourceDecision == 'leadsource') {
// Lead source connection that does not matter
Expand Down
Loading

0 comments on commit afeb29a

Please sign in to comment.