Skip to content

Instantly share code, notes, and snippets.

View bangpound's full-sized avatar

Benjamin Doherty bangpound

View GitHub Profile
diff --git a/docroot/cron.php b/docroot/cron.php
index c6ce531..f0ecbad 100644
--- a/docroot/cron.php
+++ b/docroot/cron.php
@@ -10,6 +10,7 @@
*/
define('DRUPAL_ROOT', getcwd());
+require_once DRUPAL_ROOT . '/../vendor/autoload.php';
include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
diff --git a/nopremium.admin.inc b/nopremium.admin.inc
index 99918eb..6f601bb 100644
--- a/nopremium.admin.inc
+++ b/nopremium.admin.inc
@@ -5,6 +5,12 @@
* http://www.absyx.fr
*/
+/**
+ * Node Option Premium module settings form.
diff --git a/og_forum.module b/og_forum.module
index 4e37b94..0ccce9c 100644
--- a/og_forum.module
+++ b/og_forum.module
@@ -88,8 +88,10 @@ function og_forum_query_term_access_alter(QueryAlterableInterface $query) {
// Load all the groups of the user for which the query is executed.
$group_gids = array();
$groups = og_get_entity_groups('user', $account);
- foreach ($groups as $gid => $value) {
- $group_gids[] = $gid;
diff --git a/og_email_blast.info b/og_email_blast.info
old mode 100755
new mode 100644
index 75bf2d8..e1b7d68
--- a/og_email_blast.info
+++ b/og_email_blast.info
@@ -5,3 +5,10 @@ package = Organic groups
dependencies[] = og_ui
files[] = og_email_blast.module
files[] = og_email_blast.admin.inc
diff --git a/nopremium.admin.inc b/nopremium.admin.inc
index 99918eb..6f601bb 100644
--- a/nopremium.admin.inc
+++ b/nopremium.admin.inc
@@ -5,6 +5,12 @@
* http://www.absyx.fr
*/
+/**
+ * Node Option Premium module settings form.
diff --git a/placeholder.js b/placeholder.js
index b28e272..9fa8d37 100644
--- a/placeholder.js
+++ b/placeholder.js
@@ -7,7 +7,9 @@
(function ($) {
Drupal.behaviors.placeholder = {
attach: function () {
- $("input[placeholder], textarea[placeholder]").placeholder();
+ if(typeof($("input[placeholder], textarea[placeholder]").placeholder())=='function') {

Keybase proof

I hereby claim:

  • I am bangpound on github.
  • I am bangpound (https://keybase.io/bangpound) on keybase.
  • I have a public key ASCjPpZS9mwR3MlYMaKPJzXppBCiNvFa9wRIXxZ5NRDc3Ao

To claim this, I am signing this object:

diff --git a/docroot/profiles/discoverdesign/themes/newel/templates/content/node--challenge--card.html.twig b/docroot/profiles/discoverdesign/themes/newel/templates/content/node--challenge--card.html.twig
index 90b7f11..a89a530 100644
--- a/docroot/profiles/discoverdesign/themes/newel/templates/content/node--challenge--card.html.twig
+++ b/docroot/profiles/discoverdesign/themes/newel/templates/content/node--challenge--card.html.twig
@@ -74,7 +74,7 @@
{%
set classes = [
'summary-card',
- content.field_competition.isEmpty() ? '': 'flagged',
+ node.field_competition.isEmpty() ? '': 'flagged',
@bangpound
bangpound / workflow.patch
Last active August 26, 2016 16:26
hides error message.
diff --git a/src/Entity/Workflow.php b/src/Entity/Workflow.php
index d484db9..e79c6e0 100644
--- a/src/Entity/Workflow.php
+++ b/src/Entity/Workflow.php
@@ -296,7 +296,7 @@ class Workflow extends ConfigEntityBase implements WorkflowInterface {
}
else {
// This should never happen, but it did during testing.
- drupal_set_message(t('There are no workflow states available. Please notify your site administrator.'), 'error');
+ // drupal_set_message(t('There are no workflow states available. Please notify your site administrator.'), 'error');
<?php
namespace Drush\Drupal;
use Drush\Log\LogLevel;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Reference;
/**
* This compiler pass is added to Drupal's ContainerBuilder by our own