π΄οΈ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- All mautic campaign delays merged. Two queries (the first is important). Takes under 10s. | |
| -- Depends on the PR of soft-deleted campaign events. | |
| SET @@group_concat_max_len = 10000000000000; | |
| SELECT * | |
| FROM ( | |
| SELECT NULL as campaign_id, | |
| NULL as campaign_name, | |
| NULL as event_id, | |
| NULL as event_name, | |
| NULL as lead_count, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- All mautic delays merged. Two queries (the first is important). | |
| SET @@group_concat_max_len = 10000000000000; | |
| SELECT * | |
| FROM ( | |
| SELECT NULL as campaign_id, | |
| NULL as campaign_name, | |
| NULL as event_id, | |
| NULL as event_name, | |
| NULL as lead_count, | |
| NULL as type, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT cat.id as category_id, cat.title as category_name, COUNT(camp.id) as campaigns | |
| FROM campaigns camp | |
| LEFT JOIN categories cat | |
| ON camp.category_id = cat.id | |
| WHERE | |
| cat.is_published = 0 | |
| AND camp.is_published = 1 | |
| GROUP BY cat.id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| cf_user=xxxxxxxxx | |
| cf_token=xxxxxxxxx | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| NC='\033[0m' | |
| if [ -z $1 ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /home/clientsiwanta/public_html/mautic/ | |
| find . -type d -exec sudo chmod 755 {} \; | |
| find . -type f -exec sudo chmod 644 {} \; | |
| sudo chmod -R g+w app/cache/ | |
| sudo chmod -R g+w app/logs/ | |
| sudo chmod -R g+w app/config/ | |
| sudo chmod -R g+w media/files/ | |
| sudo chmod -R g+w media/images/ | |
| sudo chmod -R g+w translations/ | |
| sudo chown -R www-data:www-data . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add sums to all chart labels in Mautic. | |
| Mautic.chartLabelSum = function () { | |
| if ( | |
| typeof Mautic.chartObjects !== 'undefined' | |
| && Mautic.chartObjects.length | |
| ) { | |
| var total, numeric, updated, totalStr; | |
| mQuery.each(Mautic.chartObjects, function (i, chart) { | |
| updated = false; | |
| if ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| UPDATE lead_fields AS f | |
| CROSS JOIN ( | |
| SELECT @cnt := 0 | |
| ) AS dummy | |
| JOIN ( | |
| SELECT (@cnt := @cnt + 1) AS cnt, id | |
| FROM lead_fields | |
| CROSS JOIN (SELECT @cnt := 0) AS dummy | |
| ORDER BY label ASC | |
| ) AS c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $rows = [ | |
| 'row1' => [ | |
| 'key' => 'value', | |
| 'key2' => 'value2', | |
| 'key3' => 'value3', | |
| ], | |
| 'row2' => [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/bundles/CampaignBundle/Controller/CampaignController.php b/app/bundles/CampaignBundle/Controller/CampaignController.php | |
| index 0e854506e8..38c152e180 100644 | |
| --- a/app/bundles/CampaignBundle/Controller/CampaignController.php | |
| +++ b/app/bundles/CampaignBundle/Controller/CampaignController.php | |
| @@ -179,7 +179,7 @@ protected function afterEntityClone($campaign, $oldCampaign) | |
| $objectId = $oldCampaign->getId(); | |
| // Get the events that need to be duplicated as well | |
| - $events = $oldCampaign->getEvents()->toArray(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/bundles/CampaignBundle/Entity/CampaignRepository.php b/app/bundles/CampaignBundle/Entity/CampaignRepository.php | |
| index 589253a618..5442ca10d5 100644 | |
| --- a/app/bundles/CampaignBundle/Entity/CampaignRepository.php | |
| +++ b/app/bundles/CampaignBundle/Entity/CampaignRepository.php | |
| @@ -22,6 +22,7 @@ | |
| class CampaignRepository extends CommonRepository | |
| { | |
| use ContactLimiterTrait; | |
| + use SlaveConnectionTrait; |