From 03ffb1e1475f2fbc83fda609c7d5732cdff5735a Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 13 Nov 2015 23:28:25 +0100 Subject: [PATCH] Continued a bit: - added correct test for UUID (will be later moved to 'core') - moved config entry 'extension_foo_loaded' to core's config.php (DONT TOUCH IT) - updated 'core' Signed-off-by: Roland Haeder --- .../filter/node/class_NodePhpRequirementsFilter.php | 10 ++++++++++ application/hub/init.php | 3 --- contrib/find-bad-php.sh | 4 ++-- core | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/application/hub/classes/filter/node/class_NodePhpRequirementsFilter.php b/application/hub/classes/filter/node/class_NodePhpRequirementsFilter.php index 7cba2b5ca..cb8a15785 100644 --- a/application/hub/classes/filter/node/class_NodePhpRequirementsFilter.php +++ b/application/hub/classes/filter/node/class_NodePhpRequirementsFilter.php @@ -76,6 +76,16 @@ class NodePhpRequirementsFilter extends BaseNodeFilter implements Filterable { self::createDebugInstance(__CLASS__)->debugOutput('FILTER[' . __METHOD__ . ':' . __LINE__ . '] ext-scrypt not found or scrypt() function not found. "Hubcoin reward" feature disabled.'); } + // If uuid_create() is not found (ext-uuid) then some keys are a bit weaker + if ((extension_loaded('uuid')) && (is_callable('uuid_create'))) { + // Mark it as working + self::createDebugInstance(__CLASS__)->debugOutput('FILTER[' . __METHOD__ . ':' . __LINE__ . '] ext-uuid and a callable uuid_create() function found. UUID "entropy" available.'); + $this->getConfigInstance()->setConfigEntry('extension_uuid_loaded', TRUE); + } else { + // Not working (not all have ext-uuid installed + self::createDebugInstance(__CLASS__)->debugOutput('FILTER[' . __METHOD__ . ':' . __LINE__ . '] ext-uuid not found or uuid_create() function not found. "Hubcoin reward" feature disabled.'); + } + // Are all tests passed? if ($checkPassed === FALSE) { // Throw an exception diff --git a/application/hub/init.php b/application/hub/init.php index 1c750dc76..548d5172e 100644 --- a/application/hub/init.php +++ b/application/hub/init.php @@ -37,8 +37,5 @@ require($cfg->getConfigEntry('base_path') . 'inc/database.php'); // Get own internal address and set it in config $cfg->setConfigEntry('internal_address', HubTools::determineOwnInternalAddress()); -// By default scrypt is assumed absent and later tested being there -$cfg->setConfigEntry('extension_scrypt_loaded', FALSE); - // [EOF] ?> diff --git a/contrib/find-bad-php.sh b/contrib/find-bad-php.sh index 2fdfecf45..85af1b245 100755 --- a/contrib/find-bad-php.sh +++ b/contrib/find-bad-php.sh @@ -1,7 +1,7 @@ #!/bin/sh echo "$0: Searching for PHP scripts (except 3rd party) ..." -PHP=`find -type f -name "*.php" | grep -v "third_party"` +PHP=`find -type f -name "*.php" 2>&1 | grep -v "third_party"` for SCRIPT in ${PHP}; do @@ -19,7 +19,7 @@ do echo "$0: Script '${SCRIPT}' has non-typical footer." fi - LINT=`php -l "${SCRIPT}" 2>&1 | grep -v "No syntax errors detected in"` + LINT=`php -l "${SCRIPT}" 2>&1 | grep -v "Constant FUSE_EDEADLK already defined in Unknown on line 0" | grep -v "No syntax errors detected in"` if [ -n "${LINT}" ] then diff --git a/core b/core index e3c9a9ab3..df42c6e50 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit e3c9a9ab3fc3f5d6a11b5af02d89cdba472d7ab8 +Subproject commit df42c6e506561f872ee628448945833cad968d28 -- 2.39.5