This file contains 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
From d9540e65b7ef2faba3c32ff9a25d5fffca3a9995 Mon Sep 17 00:00:00 2001 | |
From: Mathieu Lutfy <mathieu@symbiotic.coop> | |
Date: Sat, 7 Oct 2017 16:07:52 -0400 | |
Subject: [PATCH] Add alterPriceSet hook. | |
--- | |
.../civicrm/CRM/Member/Form.php | 3 + | |
.../civicrm/CRM/Utils/Hook.php | 19 ++++++ | |
.../civicrm/Civi/Core/Event/AlterPriceSet.php | 69 ++++++++++++++++++++++ | |
3 files changed, 91 insertions(+) |
This file contains 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
/** | |
* Fix timestamp. | |
* | |
* Log_civicrm_contact.modified_date for example would always be copied from civicrm_contact.modified_date, | |
* so there's no need for a default timestamp and therefore we remove such default timestamps | |
* also eliminate the NOT NULL constraint, since we always copy and schema can change down the road) | |
* | |
* @param string $query | |
* | |
* @return mixed |
This file contains 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 | |
# Helps apply a CiviCRM github pull-request. | |
# Based on a script by @litespeedmarc | |
if [ $# -ne 1 ] | |
then | |
echo "Invalid syntax. Syntax is $0 <PR> <CRM> <DESC>" | |
fi |
This file contains 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 | |
/** | |
* Displays and filters activities with file attachments. | |
* | |
* Based on https://github.com/MegaphoneJon/activityAttachmentReport by Jon G. | |
*/ | |
class CRM_SymbioTIC_Form_Report_ActivitiesWithAttachments extends CRM_Report_Form_Activity { | |
function __construct() { |
This file contains 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
drush @example.org api Setting.create communityMessagesUrl=FALSE |
This file contains 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
class CRM_SymbioTIC_Utils_Check_Permissions { | |
function check(&$messages) { | |
$config = CRM_Core_Config::singleton(); | |
$error = FALSE; | |
$count = 0; | |
if ($config->userFramework == 'Drupal6') { | |
$count = CRM_Core_DAO::singleValueQuery("SELECT count(*) | |
FROM permission |
This file contains 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
import os | |
import RPi.GPIO as GPIO | |
import time | |
import http.client, urllib | |
# Based on: | |
# http://raspberry.io/projects/view/reading-and-writing-from-gpio-ports-from-python/ | |
GPIO.setmode(GPIO.BCM) |
This file contains 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
# Drupal 7 | |
drush php-eval 'civicrm_initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);' | |
# Drupal 8 | |
drush php-eval '\Drupal::service('civicrm')->initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);' | |
# WordPress | |
wp eval 'civicrm_initialize(); CRM_Core_I18n_Schema::rebuildMultilingualSchema(["en_US","fr_CA"], NULL);' |
This file contains 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 | |
/** | |
* Implements hook_civicrm_alterMailParams(). | |
* | |
* Intercepts outgoing emails. | |
*/ | |
function myext_civicrm_alterMailParams(&$params) { | |
// redmine:20627 Quickfix for PCP "send to a friend" enforce the 'from' email. | |
if ($params['valueName'] == 'friend') { |
This file contains 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
/** | |
* Implements hook_civicrm_buildForm() is a completely overkill way. | |
* Searches for an override class named after the initial $formName | |
* and calls its buildForm(). | |
* | |
* Ex: for a $formName "CRM_Case_Form_CaseView", it will: | |
* - try to find * CRM/Symbiotic/Case/Form/CaseView.php, | |
* - require_once the file, instanciate an object, and | |
* - call its buildForm() function. | |
* |