OSDN Git Service

Update sql.php
authorJoshua Thomas Przyborowski <joshua.przyborowski@gmail.com>
Thu, 14 Dec 2017 01:13:02 +0000 (19:13 -0600)
committerGitHub <noreply@github.com>
Thu, 14 Dec 2017 01:13:02 +0000 (19:13 -0600)
sql.php

diff --git a/sql.php b/sql.php
index 6c39a77..f0960c7 100644 (file)
--- a/sql.php
+++ b/sql.php
@@ -191,15 +191,13 @@ require_once($SettDir['misc'].'utf8.php');
 require_once($SettDir['inc'].'filename.php');
 if(!isset($Settings['use_hashtype'])) {
        $Settings['use_hashtype'] = "sha1"; }
-if(!function_exists('hash')||!function_exists('hash_algos')||!function_exists('password_hash')) {
+if(!function_exists('hash')||!function_exists('hash_algos')) {
 if($Settings['use_hashtype']!="md5"&&
-   $Settings['use_hashtype']!="sha1") {
+   $Settings['use_hashtype']!="sha1"&&
+   $Settings['use_hashtype']!="bcrypt") {
        $Settings['use_hashtype'] = "sha1"; } }
-if(function_exists('hash')&&function_exists('hash_algos')&&$Settings['use_hashtype']!="bcrypt") {
-if(!in_array($Settings['use_hashtype'],hash_algos())) {
-       $Settings['use_hashtype'] = "sha1"; }
-if(function_exists('password_hash')&&$Settings['use_hashtype']=="bcrypt") {
-if(!in_array($Settings['use_hashtype'],hash_algos())) {
+if((function_exists('hash')&&function_exists('hash_algos'))||function_exists('password_hash')) {
+if(!in_array($Settings['use_hashtype'],hash_algos())&&$Settings['use_hashtype']!="bcrypt") {
        $Settings['use_hashtype'] = "sha1"; }
 if($Settings['use_hashtype']!="md2"&&
    $Settings['use_hashtype']!="md4"&&