Skip to content

Instantly share code, notes, and snippets.

diff --git a/plugins/export_ui/semantic_fields_ctools_export_ui.inc b/plugins/export_ui/semantic_fields_ctools_export_ui.inc
index 3c31148..274c82e 100644
--- a/plugins/export_ui/semantic_fields_ctools_export_ui.inc
+++ b/plugins/export_ui/semantic_fields_ctools_export_ui.inc
@@ -325,15 +325,12 @@ function semantic_fields_ctools_export_ui_form(&$form, &$form_state) {
);
if (module_exists('token') == TRUE) {
$form['semantic_field_settings']['tokens_fieldset']['info'] = array(
- '#markup' => t('You could use tokens, like <em>[node:title]</em> and <em>[node:url]</em> !token_tree', array(
- '!token_tree' => theme(
@pvhee
pvhee / sharethis.patch
Created June 16, 2014 08:36
sharethis.patch
diff --git a/sharethis.module b/sharethis.module
index b11b052..5b8b988 100644
--- a/sharethis.module
+++ b/sharethis.module
@@ -304,15 +304,15 @@ function sharethis_node_view($node, $view_mode, $langcode) {
}
// This will choose the path to use.
if ($is_path) {
- $path_module = $node->path;
+ $path_module = url($node->path['source']);
@pvhee
pvhee / gist:9f154eeb68966fa7c59f
Last active August 29, 2015 14:02
Hard-coding timeline JS version
diff --git a/views_timelinejs.module b/views_timelinejs.module
index f1a1a4d..f9b0989 100644
--- a/views_timelinejs.module
+++ b/views_timelinejs.module
@@ -40,17 +40,13 @@ function views_timelinejs_libraries_info() {
'name' => 'timeline',
'vendor url' => 'http://timeline.verite.co',
'download url' => 'http://timeline.verite.co',
- 'version arguments' => array(
- 'file' => 'build/js/timeline.js',
@pvhee
pvhee / field_collection_migrate_language.patch
Created July 15, 2014 08:52
field_collection_migrate_language.patch
diff --git a/field_collection/field_collection.migrate.inc b/field_collection/field_collection.migrate.inc
index 552551b..27e9165 100644
--- a/field_collection/field_collection.migrate.inc
+++ b/field_collection/field_collection.migrate.inc
@@ -105,7 +105,7 @@ class MigrateDestinationFieldCollection extends MigrateDestinationEntity {
$updating = FALSE;
$host_entity = entity_load_single($this->hostEntityType, $collection->host_entity_id);
entity_get_controller($this->hostEntityType)->resetCache();
- $entity->setHostEntity($this->hostEntityType, $host_entity);
+ $entity->setHostEntity($this->hostEntityType, $host_entity, $collection->language);
@pvhee
pvhee / 0_reuse_code.js
Created July 17, 2014 17:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
diff --git a/includes/ScaldAtomController.inc b/includes/ScaldAtomController.inc
index 3402499..cd1f898 100644
--- a/includes/ScaldAtomController.inc
+++ b/includes/ScaldAtomController.inc
@@ -181,12 +181,23 @@ class ScaldAtomController extends DrupalDefaultEntityController {
if (!isset($atom->data)) {
$atom->data = array();
}
+ if (!isset($atom->created)) {
+ $atom->created = REQUEST_TIME;
@pvhee
pvhee / gist:8c164879a529a4c97ead
Created August 25, 2014 12:06
MZ base profile hack
diff --git a/libraries.module b/libraries.module
index 687fa29..782792b 100644
--- a/libraries.module
+++ b/libraries.module
@@ -82,6 +82,9 @@ function libraries_get_libraries() {
// Always search sites/all/libraries.
$searchdir[] = 'sites/all/libraries';
+ // Patch until we sort out https://drupal.org/node/1811486 and drupal_get_profiles actually exists. Profile inheritance is still relatively new, but we need this new, hence the hardcoded hack. Expected to be removed in the next cycle of D7
+ $searchdir[] = drupal_get_path('profile', 'mz') . "/libraries";
@pvhee
pvhee / .travis.yml
Last active August 29, 2015 14:06 — forked from iamEAP/.travis.yml
language: php
#
# Important to note, this is the version of PHP used to run this build, not the
# one used to run your Drupal installation. Ensure compatibility with the Drush
# and Terminus versions you're using for this build.
#
php:
- 5.3
@pvhee
pvhee / eva_disable_hook_entity_view_alter.patch
Last active August 29, 2015 14:13
eva: disable hook_entity_view_alter to improve performance
diff --git a/eva.module b/eva.module
index 5de36e1..ea8dab3 100755
--- a/eva.module
+++ b/eva.module
@@ -52,54 +52,6 @@ function eva_field_extra_fields() {
}
/**
- * Implements hook_entity_view_alter().
- *
@pvhee
pvhee / remove_debug_message.patch
Created March 3, 2015 13:18
remove_debug_message.patch
diff --git a/ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php b/ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php
index 4b3e429..ad405e0 100644
--- a/ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php
+++ b/ldap_authorization/ldap_authorization_og/LdapAuthorizationConsumerOG.class.php
@@ -553,7 +553,7 @@ class LdapAuthorizationConsumerOG extends LdapAuthorizationConsumerAbstract {
* - remove and grant og roles
* - flush appropriate caches
*/
- debug("og_actions"); debug($og_actions); debug("user_auth_data"); debug($user_auth_data);
+ //debug("og_actions"); debug($og_actions); debug("user_auth_data"); debug($user_auth_data);