From 9300bc293378b215d8df2f44d7e00f00b0f739a1 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 1 Oct 2016 23:19:28 -0700 Subject: [PATCH] Move MWCryptHash into libs/ Remove the single wfDebug() call that was making this class MW specific, someone can log the return value of MWCryptHash::hashAlgo() if they'd like to know the specific implementation being used. Change-Id: Ibb7ead7594edab7861631046dd8316daab613401 --- autoload.php | 2 +- includes/{utils => libs}/MWCryptHash.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) rename includes/{utils => libs}/MWCryptHash.php (97%) diff --git a/autoload.php b/autoload.php index 8d9a80fe3b..5e81e833c9 100644 --- a/autoload.php +++ b/autoload.php @@ -771,7 +771,7 @@ $wgAutoloadLocalClasses = [ 'MWCallableUpdate' => __DIR__ . '/includes/deferred/MWCallableUpdate.php', 'MWContentSerializationException' => __DIR__ . '/includes/content/ContentHandler.php', 'MWCryptHKDF' => __DIR__ . '/includes/utils/MWCryptHKDF.php', - 'MWCryptHash' => __DIR__ . '/includes/utils/MWCryptHash.php', + 'MWCryptHash' => __DIR__ . '/includes/libs/MWCryptHash.php', 'MWCryptRand' => __DIR__ . '/includes/utils/MWCryptRand.php', 'MWDebug' => __DIR__ . '/includes/debug/MWDebug.php', 'MWDocGen' => __DIR__ . '/maintenance/mwdocgen.php', diff --git a/includes/utils/MWCryptHash.php b/includes/libs/MWCryptHash.php similarity index 97% rename from includes/utils/MWCryptHash.php rename to includes/libs/MWCryptHash.php index 11173573e7..f9b71729af 100644 --- a/includes/utils/MWCryptHash.php +++ b/includes/libs/MWCryptHash.php @@ -52,7 +52,6 @@ class MWCryptHash { foreach ( $preference as $algorithm ) { if ( in_array( $algorithm, $algos ) ) { self::$algo = $algorithm; - wfDebug( __METHOD__ . ': Using the ' . self::$algo . " hash algorithm.\n" ); return self::$algo; } -- 2.20.1