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/bash | |
find . -type f -name '*jar' | while read line; do | |
LOG4JUSAGE='' | |
#echo "Processing file '$line'" | |
LOG4JUSAGE=$(jdeps "$line"|grep -i log4) | |
if [ ! -z "$LOG4JUSAGE" ] | |
then | |
echo "Processing file '$line'" | |
echo "found log4 references" | |
echo "$LOG4JUSAGE" |
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 -ur drupal-8.4.5/core/lib/Drupal/Core/DrupalKernel.php drupal-8.4.6/core/lib/Drupal/Core/DrupalKernel.php | |
--- drupal-8.4.5/core/lib/Drupal/Core/DrupalKernel.php 2018-02-20 20:35:14.000000000 +0100 | |
+++ drupal-8.4.6/core/lib/Drupal/Core/DrupalKernel.php 2018-03-27 10:03:10.000000000 +0200 | |
@@ -20,6 +20,7 @@ | |
use Drupal\Core\Http\TrustedHostsRequestFactory; | |
use Drupal\Core\Installer\InstallerRedirectTrait; | |
use Drupal\Core\Language\Language; | |
+use Drupal\Core\Security\RequestSanitizer; | |
use Drupal\Core\Site\Settings; | |
use Drupal\Core\Test\TestDatabase; |
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 | |
class ShortUrlGenerator { | |
/** | |
* From http://rosettacode.org/wiki/Linear_congruential_generator#PHP | |
*/ | |
public static function bsd_rand($seed) { | |
return function() use (&$seed) { | |
return $seed = (1103515245 * $seed + 12345) % (1 << 31); | |
}; | |
} |
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 | |
/** | |
* From http://rosettacode.org/wiki/Linear_congruential_generator#PHP | |
*/ | |
function bsd_rand($seed) { | |
return function() use (&$seed) { | |
return $seed = (1103515245 * $seed + 12345) % (1 << 31); | |
}; | |
} |
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 | |
function encode_alphas($n, $alphas) { | |
$result = ''; | |
for ($i=0;$i<6;$i++) { | |
$m = $n % count($alphas); | |
$n = $n / count($alphas); | |
$result .= $alphas[$m]; | |
} | |
return $result; | |
} |
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 | |
define('LANGUAGE_NONE', 'und'); | |
/** | |
* Update an associatvie array attached to an object by one of it's keys. | |
* | |
* @param $object object to work on | |
* @param string $field attribute used of object | |
* @param string $key key to be used of value array | |
* @param array $value | |
* @param string $lang |
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 | |
define('LANGUAGE_NONE', 'und'); | |
function _update_array_value($object, $field, $key, $value, $lang = LANGUAGE_NONE) { | |
foreach ($object->{$field}[$lang] as &$sub) { | |
if (isset($sub[$key]) && $sub[$key] == $value[$key]) { | |
$sub = $value; | |
} | |
} | |
} |
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 | |
function bit_get_enabled_dependencies($module) { | |
$dependencies=array(); | |
// Get all module data so we can find dependencies and sort. | |
$module_data = system_rebuild_module_data(); | |
// Get all dependencies for a module | |
if (isset($module_data[$module])) { | |
foreach ($module_data[$module]->required_by as $required_module => $required_module_data) { | |
if (!in_array($required_module, $dependencies)) { | |
if (module_exists($required_module)) { |