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
| $header = array(); | |
| $header[] = array( | |
| 'data' => t('title'), | |
| 'type' => 'property', | |
| 'specifier' => 'title', | |
| 'sort' => 'asc', | |
| ); | |
| $query = new EntityFieldQuery(); | |
| $query->entityCondition('entity_type', 'node') | |
| ->entityCondition('bundle', 'convention') |
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
| function securepages_match($path) { | |
| global $is_https; | |
| $secure = variable_get('securepages_secure', 1); | |
| $pages = drupal_strtolower(variable_get('securepages_pages', SECUREPAGES_PAGES)); | |
| $ignore = drupal_strtolower(variable_get('securepages_ignore', SECUREPAGES_IGNORE)); | |
| $path = drupal_strtolower(trim($path, '/')); | |
| $path_alias = NULL; |
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
| #!/usr/bin/php | |
| <?php | |
| /** | |
| * @file | |
| * A Git pre-commit hook script to check files for PHP syntax errors and Drupal | |
| * coding standards violations. Requires phpcs and Coder Sniffer: | |
| * | |
| * @see https://drupal.org/node/1419988 | |
| */ |
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
| Open terminal and run the following commands from the directory you extracted btsync: | |
| sudo tar -C /usr/local/bin -zxvf [name of downloaded btsync archive] | |
| btsync --dump-sample-config > ~/btsync.conf | |
| mkdir ~/btsync-store | |
| mkdir '~/btsync-store/Drupal Community Tools Linux' | |
| nano ~/btsync.conf | |
| In the conf file, set and remove comments in front (//) for: | |
| <ul> | |
| <li>"storage_path" : "btsync-store/",</li> |
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
| if ($cache && $cache->cache_get('results')) { | |
| if($this->query->pager->use_pager() || !empty($this->get_total_rows)) { | |
| $this->query->pager->total_items = $this->total_rows; | |
| $this->query->pager->update_page_info(); | |
| } | |
| vpr('Used cached results'); | |
| } | |
| else { | |
| $this->query->execute($this); | |
| // Enforce the array key rule as documented in |
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
| From 26a7752c34321fd9cb889308f507ca6bdb777f08 Mon Sep 17 00:00:00 2001 | |
| From: David Rothstein | |
| Date: Wed, 15 Oct 2014 14:31:54 +0000 | |
| Subject: SA-CORE-2014-005 by Stefan Horst, greggles, larowlan, David_Rothstein, klausi: Fixed SQL injection vulnerability | |
| --- | |
| diff --git a/includes/database/database.inc b/includes/database/database.inc | |
| index f78098b..01b6385 100644 | |
| --- a/includes/database/database.inc | |
| +++ b/includes/database/database.inc |
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 ll.* FROM linkchecker_node ln | |
| INNER JOIN linkchecker_link ll ON ln.lid = ll.lid | |
| WHERE ln.nid = :nid | |
| AND ll.fail_count > :fail_count | |
| AND ll.status = :status | |
| AND ll.code NOT IN (:codes_0, :codes_1, :codes_2) | |
| SELECT n.nid AS nid | |
| FROM |
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
| #!/usr/bin/php | |
| <?php | |
| /** | |
| * @file | |
| * A Git pre-commit hook script to check files for PHP syntax errors and Drupal | |
| * coding standards violations. Requires phpcs and jshint. For phpcs, one must | |
| * also add the DrupalSecure sniffs: https://www.drupal.org/sandbox/coltrane/1921926 | |
| * | |
| * Saves this file to .git_template/hooks/pre-commit. |
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
| // ==UserScript== | |
| // @name www.drupal.org | |
| // @namespace tagAmsterdam2014 | |
| // @match https://www.drupal.org/node/* | |
| // @run-at document-end | |
| // @grant none | |
| // ==/UserScript== | |
| // SAVE as tagAmsterdam2014.user.js | |
| // Inspired by https://github.com/webflo/drupalsprint-bookmarklet/blob/gh-pages/index.html |