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/sh | |
# | |
# An example hook script to prepare the commit log message. | |
# Called by "git commit" with the name of the file that has the | |
# commit message, followed by the description of the commit | |
# message's source. The hook's purpose is to edit the commit | |
# message file. If the hook fails with a non-zero status, | |
# the commit is aborted. | |
# | |
# To enable this hook, rename this file to "prepare-commit-msg" and |
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 | |
/** | |
* references: | |
* http://www.murraypicton.com/2010/09/extending-objects-using-anonymous-functions-in-php/ | |
* http://php.net/manual/en/functions.anonymous.php | |
* http://php.net/manual/en/function.is-callable.php | |
*/ | |
class Foo { | |
public $bar; |
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
/* ========================================================= | |
* bootstrap-modal.js v3.0.0 | |
* http://twitter.github.com/bootstrap/javascript.html#modals | |
* ========================================================= | |
* Copyright 2012 Twitter, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
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
diff --git a/src/Authentication/AuthenticationManager.php b/src/Authentication/AuthenticationManager.php | |
index 460815c..2f0e059 100644 | |
--- a/src/Authentication/AuthenticationManager.php | |
+++ b/src/Authentication/AuthenticationManager.php | |
@@ -96,13 +96,13 @@ class AuthenticationManager implements AuthenticationManagerInterface { | |
$account = NULL; | |
foreach ($this->plugins as $provider) { | |
/* @var \Drupal\restful\Plugin\authentication\AuthenticationInterface $provider */ | |
- if ($provider->applies($request) && $account = $provider->authenticate($request)) { | |
+ if ($provider->applies($request) && ($account = $provider->authenticate($request)) && $account->uid) { |
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
diff --git a/modules/restful_token_auth/src/Plugin/authentication/TokenAuthentication.php b/modules/restful_token_auth/src/Plugin/authentication/TokenAuthentication.php | |
index 331281a..9d33d7a 100644 | |
--- a/modules/restful_token_auth/src/Plugin/authentication/TokenAuthentication.php | |
+++ b/modules/restful_token_auth/src/Plugin/authentication/TokenAuthentication.php | |
@@ -93,7 +93,7 @@ class TokenAuthentication extends Authentication { | |
// If we don't have a $key_name on either the URL or the in the headers, | |
// then check again using a hyphen instead of an underscore. This is due to | |
// new versions of Apache not accepting headers with underscores. | |
- if (empty($input[$key_name]) && $request->getHeaders()->get($key_name)->getValueString()) { | |
+ if (!$input[$key_name] && !$request->getHeaders()->get($key_name)->getValueString()) { |
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 | |
if (basename(getcwd()) !== 'docroot') { | |
echo "You must run this in docroot.\n"; | |
exit(1); | |
} | |
if (count($argv) < 4) { | |
echo "Usage: php rebuild_module_paths.php hostname dbname username password\n"; | |
exit(1); | |
} |
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
<?xml version="1.0"?> | |
<ruleset | |
name="PMD Ruleset for Drupal" | |
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd" | |
> | |
<rule ref="rulesets/unusedcode.xml" /> | |
<rule ref="rulesets/codesize.xml"> | |
<exclude name="ExcessiveMethodLength" /> |
OlderNewer