Skip to content

Instantly share code, notes, and snippets.

@herbdool
herbdool / convert-location.txt
Last active August 4, 2023 13:12
Convert Location module data to Address, Telephone and Email
<?php
/**
* Convert Location to Address, Telephone and Email
*
* bee php-script convert-location.php
*
* @todo add batching.
*
* - Requires using bee commandline tools in Backdrop: https://github.com/backdrop-contrib/bee
@herbdool
herbdool / convert-fc2p.php
Last active October 11, 2023 15:27
Convert Field Collection to Paragraph
<?php
/**
* Convert Field Collection to Paragraphs
*
* bee php-script convert-fc2p.php
*
* @todo add batching.
*
* - Both field_collection and paragraphs need to be enabled.
@herbdool
herbdool / convert-d7media2backdrop.php
Last active November 18, 2023 02:26
Convert D7 Media to Backdrop Media
<?php
/**
* Convert d7 media to Backdrop media
*
* bee php-script convert-d7media2backdrop.php
*
* @todo add batching.
*/
@herbdool
herbdool / pantheon.civicrm.settings.local.php
Created March 4, 2022 20:45
Pantheon settings for CiviCRM
<?php
/**
* CiviCRM Local configuration file.
*/
/**
* 1. After installing CiviCRM place this snippet in civicrm.settings.php,
* just below
* "global $civicrm_root, $civicrm_setting, $civicrm_paths;"
@herbdool
herbdool / civicrm.settings.local.php
Created November 18, 2021 18:24
CiviCRM settings file for Drupal 9 on Pantheon
<?php
/**
* CiviCRM Configuration File.
*/
/**
* Installing CiviCRM with Drupal 9 on Pantheon.
*
* 1. Create a new site on Pantheon using Drupal 9 (sftp mode).
@herbdool
herbdool / gist:54ca80f8089c261e072896fb6a1be2bf
Created January 24, 2020 14:55 — forked from bryhal/gist:4129042
MYSQL: Generate Calendar Table
DROP TABLE IF EXISTS time_dimension;
CREATE TABLE time_dimension (
id INTEGER PRIMARY KEY, -- year*10000+month*100+day
db_date DATE NOT NULL,
year INTEGER NOT NULL,
month INTEGER NOT NULL, -- 1 to 12
day INTEGER NOT NULL, -- 1 to 31
quarter INTEGER NOT NULL, -- 1 to 4
week INTEGER NOT NULL, -- 1 to 52/53
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'...
verbose: /usr/share/lando/bin/docker-compose,--project-name,gottabd,--file,/home/herb/.lando/compose/gottabd/globals-0.yml,--file,/home/herb/.lando/compose/gottabd/appserver-0.yml,--file,/home/herb/.lando/compose/gottabd/appserver-1.yml,--file,/home/herb/.lando/compose/gottabd/appserver-2.yml,--file,/home/herb/.lando/compose/gottabd/appserver-3.yml,--file,/home/herb/.lando/compose/gottabd/database-0.yml,--file,/home/herb/.lando/compose/gottabd/database-1.yml,--file,/home/herb/.lando/compose/gottabd/database-2.yml,--file,/home/herb/.lando/compose/gottabd/database-3.yml,--file,/home/herb/.lando/compose/gottabd/database-4.yml,--file,/home/herb/.lando/compose/gottabd/database-5.yml,--file,/home/herb/.lando/compose/gottabd/proxy-0.yml,up,--detach,--no-recreate,--remove-orphans,appserver finished with code 0
verbose: Running ["/usr/share/lando/bin/docker-compose","--project-name","gottabd","--file","/home/herb/.lando/compose/gottabd/globals-0.yml","--file","/home/herb/.lando/compose/gottabd/appserver-0.yml","--file
@herbdool
herbdool / backend-payments.patch
Created May 29, 2018 00:16
Stripe backend payments fix
diff --git a/CRM/Core/Form/Stripe.php b/CRM/Core/Form/Stripe.php
index 828e2ea..4b4963e 100644
--- a/CRM/Core/Form/Stripe.php
+++ b/CRM/Core/Form/Stripe.php
@@ -8,9 +8,35 @@ class CRM_Core_Form_Stripe extends CRM_Core_Form {
/**
* Function to access protected payProcessors array in event registraion forms
+ * to see if any of them are stripe processors.
*/
diff --git a/CRM/Utils/Cache.php b/CRM/Utils/Cache.php
index 94b2cfb..d03955d 100644
--- a/CRM/Utils/Cache.php
+++ b/CRM/Utils/Cache.php
@@ -105,6 +105,7 @@ class CRM_Utils_Cache {
$defaults = array();
break;
+ case 'Redis':
case 'Memcache':
diff --git a/CRM/Extension/Mapper.php b/CRM/Extension/Mapper.php
index f765afb..ac27547 100755
--- a/CRM/Extension/Mapper.php
+++ b/CRM/Extension/Mapper.php
@@ -288,6 +288,10 @@ class CRM_Extension_Mapper {
$moduleExtensions = $this->cache->get($this->cacheKey . '/moduleFiles');
}
+ if ($fresh == 'NOCACHE') {
+ $moduleExtensions = NULL;