Skip to content

Instantly share code, notes, and snippets.

<?php
namespace Psr\Http\Header;
use Countable,
Traversable;
/**
* A HTTP message header.
*/
<?php
namespace Psr\Http\Header;
/**
* HTTP message header.
*/
interface HeaderInterface
{
/**
<?php
namespace Psr\Uri;
use Psr\Uri\Exception\InvalidArgumentException;
/**
* A hierarchical uniform resource identifier (URI) is either an absolute URI
* whose scheme-specific part begins with a slash ("/"), or a relative URI,
* that is, a URI that does not specify a scheme.
@thewilkybarkid
thewilkybarkid / imagecrop_query_string.patch
Last active December 21, 2015 03:19
Patch for the Drupal Image javascript crop module that fixes images problems introduced in Drupal 7.20. This follows the changes in https://drupal.org/node/1924078, but is applied to version 7.x-1.0-rc3 rather than 7.x-1.x-dev
diff --git a/includes/imagecrop.admin.inc b/includes/imagecrop.admin.inc
index ae3d663..ac04f15 100644
--- a/includes/imagecrop.admin.inc
+++ b/includes/imagecrop.admin.inc
@@ -153,7 +153,7 @@ function imagecrop_image_styles_overview($fid, $style_name, $entity_type = NULL,
$imagecrop->addImagecropUi(TRUE);
$image_url = image_style_url($style_name, $imagecrop->getFile()->uri);
- $image_url .= (variable_get('clean_url', 0) ? '?' : '&');
+ $image_url .= (!variable_get('clean_url', 0) || strpos($image_url, '?') !== FALSE) ? '&' : '?';
@thewilkybarkid
thewilkybarkid / imagecrop_theme.patch
Created August 27, 2013 09:08
Patch for the Drupal Image javascript crop module (version 7.x-1.0-rc3) that forces the module to use the admin theme rather than the normal one (see https://drupal.org/node/1491494).
diff --git a/imagecrop.module b/imagecrop.module
index f3e2f72..40bf3f1 100644
--- a/imagecrop.module
+++ b/imagecrop.module
@@ -31,6 +31,10 @@ function imagecrop_permission() {
);
}
+function imagecrop_get_theme() {
+ return variable_get('admin_theme');
@thewilkybarkid
thewilkybarkid / fancybox_jquery.patch
Last active December 22, 2015 23:58
Patch for the Drupal fancyBox module (verrsion 7.x-2.0-beta6) to remove the jQuery version checking (assumes that your theme provides version 1.7+).
diff --git a/fancybox.admin.inc b/fancybox.admin.inc
index 8ba8a31..d95ddc3 100644
--- a/fancybox.admin.inc
+++ b/fancybox.admin.inc
@@ -44,12 +44,6 @@ function fancybox_admin_settings_form($form, &$form_state) {
$jquery = drupal_get_library('system', 'jquery');
- if (version_compare($jquery['version'], '1.7', '<')) {
- drupal_set_message(t('fancyBox requires jQuery 1.7 or higher. Please !configure to use a higher jQuery version.', array('!configure' => l(t('configure jQuery Update'), 'admin/config/development/jquery_update'))), 'error');
@thewilkybarkid
thewilkybarkid / varnish_watchdog_success.patch
Created September 17, 2013 15:08
Patch for the Drupal Varnish module (7.x-1.0-beta2) to log successful command runs.
diff --git a/varnish.module b/varnish.module
index 80e7af2..21dfd8e 100644
--- a/varnish.module
+++ b/varnish.module
@@ -288,6 +288,7 @@ function _varnish_execute_command($client, $command) {
}
else {
// successful connection
+ watchdog('varnish', 'Successfully ran command: %command', array('%command' => $command), WATCHDOG_INFO);
return $status;
@thewilkybarkid
thewilkybarkid / varnish_authentication_fix.patch
Created September 17, 2013 15:11
Patch for the Drupal Varnish module (7.x-1.0-beta2) to fix authentication.
diff --git a/varnish.module b/varnish.module
index 80e7af2..248a564 100644
--- a/varnish.module
+++ b/varnish.module
@@ -260,7 +260,7 @@ function _varnish_terminal_run($commands) {
if ($status['code'] == 107) { // Require authentication
$secret = variable_get('varnish_control_key', '');
$challenge = substr($status['msg'], 0, 32);
- $pack = $challenge . "\x0A" . $secret . "\x0A" . $challenge . "\x0A";
+ $pack = $challenge . "\x0A" . $secret . $challenge . "\x0A";
@thewilkybarkid
thewilkybarkid / varnish_site_alias.patch
Last active December 23, 2015 06:39
Patch for the Drupal Varnish module (7.x-1.0-beta3 + https://www.drupal.org/files/issues/varnish_purge_limit-1481136-11_1.patch) to make it site alias aware.
diff --git a/varnish.cache.inc b/varnish.cache.inc
index 7628579..a18a846 100644
--- a/varnish.cache.inc
+++ b/varnish.cache.inc
@@ -71,10 +71,11 @@ class VarnishCache implements DrupalCacheInterface {
varnish_purge_all_pages();
}
else {
- $host = _varnish_get_host();
$base = base_path();
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 43f08e7..58e94bb 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -3,7 +3,6 @@
[#2255129] by wwalc: Introduced support for the codesnippet and mathjax plugins.
[#1762328] by wwalc: IMPORTANT: <code> tags are no longer protected by default.
[#1327898] by grasmash: Adding new ckeditor_security_filter_alter() hook.
-[#2175565] by hswong3i: Download Library with ckeditor.make for Simple Profile Integration.
[#2249139] by wwalc: Use CKEditor 4.4.0 from CKEditor CDN (http://cdn.ckeditor.com) by default.