From 2184e4124fec09c2ac74b8092a4a67389d6ac958 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 13 Nov 2015 23:26:37 +0100 Subject: [PATCH] Continued: - ignored more bad lines (causes by php-fuse) - added extension_foo_loaded (DONT TOUCH THIS) - the script should check for existence (see 'hub' project) of an optional PHP extension and then set the corresponding option to TRUE - the above will later be made more generic MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- contrib/find-bad-php.sh | 4 ++-- inc/config.php | 6 ++++++ inc/main/classes/crypto/class_CryptoHelper.php | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/contrib/find-bad-php.sh b/contrib/find-bad-php.sh index 2fdfecf4..85af1b24 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/inc/config.php b/inc/config.php index 2f3b5faa..d4b24e7c 100644 --- a/inc/config.php +++ b/inc/config.php @@ -464,5 +464,11 @@ $cfg->setConfigEntry('temp_file_path', sys_get_temp_dir()); // CFG: IPC-SOCKET-FILE-NAME $cfg->setConfigEntry('ipc_socket_file_name', 'php_ipc_socket'); +// CFG: EXTENSION-SCRYPT-LOADED (By default scrypt is assumed absent and later tested being there) +$cfg->setConfigEntry('extension_scrypt_loaded', FALSE); + +// CFG: EXTENSION-UUID-LOADED (By default uuid is assumed absent and later tested being there) +$cfg->setConfigEntry('extension_uuid_loaded', FALSE); + // [EOF] ?> diff --git a/inc/main/classes/crypto/class_CryptoHelper.php b/inc/main/classes/crypto/class_CryptoHelper.php index 03458ee5..8acedc89 100644 --- a/inc/main/classes/crypto/class_CryptoHelper.php +++ b/inc/main/classes/crypto/class_CryptoHelper.php @@ -142,8 +142,8 @@ class CryptoHelper extends BaseFrameworkSystem implements Cryptable { // Init empty UUID $uuid = ''; - // Is the UUID extension loaded? (see pecl) - if ((extension_loaded('uuid')) && (function_exists('uuid_create'))) { + // Is the UUID extension loaded and enabled? (see pecl) + if ($this->getConfigInstance()->getConfigEntry('extension_uuid_loaded') === TRUE) { // Then add it as well $uuid = uuid_create(); } // END - if -- 2.39.5