diff options
Diffstat (limited to '0001-OC_Log.patch')
-rw-r--r-- | 0001-OC_Log.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/0001-OC_Log.patch b/0001-OC_Log.patch new file mode 100644 index 000000000000..c99fd5bfa4cf --- /dev/null +++ b/0001-OC_Log.patch @@ -0,0 +1,86 @@ +diff --git a/user_otp/lib/otp.php b/user_otp/lib/otp.php +index cf5bfa0..304af3b 100755 +--- a/user_otp/lib/otp.php ++++ b/user_otp/lib/otp.php +@@ -53,7 +53,7 @@ class OC_USER_OTP extends OC_User_Backend{ + * Constructor sets up {@link $firstvar} + */ + public function __construct(){ +- //OC_Log::write('OC_USER_OTP', __FUNCTION__.'().', OC_Log::DEBUG); ++ //OCP\Util::writeLog('OC_USER_OTP', __FUNCTION__.'().', OCP\Util::DEBUG); + $this->mOtp = new MultiOtpDb(OCP\Config::getAppValue( + 'user_otp','EncryptionKey','DefaultCliEncryptionKey') + ); +@@ -81,10 +81,10 @@ class OC_USER_OTP extends OC_User_Backend{ + } + + public static function registerBackends($usedBackends){ +- //OC_Log::write('OC_USER_OTP', __FUNCTION__.'().', OC_Log::DEBUG); ++ //OCP\Util::writeLog('OC_USER_OTP', __FUNCTION__.'().', OCP\Util::DEBUG); + if(self::$_backends === null){ + foreach ($usedBackends as $backend){ +- //OC_Log::write('user_otp', 'instance '.$backend.' backend.', OC_Log::DEBUG); ++ //OCP\Util::writeLog('user_otp', 'instance '.$backend.' backend.', OCP\Util::DEBUG); + self::$_backends[$backend] = new $backend(); + } + } +@@ -142,7 +142,7 @@ class OC_USER_OTP extends OC_User_Backend{ + * @return boolean + */ + public function userExists($uid) { +- //OC_Log::write('OC_USER_OTP', __FUNCTION__.'().', OC_Log::DEBUG); ++ //OCP\Util::writeLog('OC_USER_OTP', __FUNCTION__.'().', OCP\Util::DEBUG); + if($this->mOtp->CheckUserExists($uid)){ + return true; + } +@@ -179,7 +179,7 @@ class OC_USER_OTP extends OC_User_Backend{ + * @return backend + */ + public function getRealBackend($uid) { +- //OC_Log::write('OC_USER_OTP', __FUNCTION__.'().', OC_Log::DEBUG); ++ //OCP\Util::writeLog('OC_USER_OTP', __FUNCTION__.'().', OCP\Util::DEBUG); + if($this->_userBackend !== null){ + return $this->_userBackend; + } +@@ -194,7 +194,7 @@ class OC_USER_OTP extends OC_User_Backend{ + } + + public function __call($name, $arguments){ +- OC_Log::write('OC_USER_OTP', $name.'().', OC_Log::DEBUG); ++ OCP\Util::writeLog('OC_USER_OTP', $name.'().', OCP\Util::DEBUG); + $userBackend=$this->getRealBackend(OCP\User::getUser()); + //var_dump($userBackend); + if($userBackend===null){ +@@ -220,7 +220,7 @@ class OC_USER_OTP extends OC_User_Backend{ + */ + public function checkPassword($uid, $password) { + //print_r($_SERVER); +- OC_Log::write('OC_USER_OTP', __FUNCTION__.'().', OC_Log::DEBUG); ++ OCP\Util::writeLog('OC_USER_OTP', __FUNCTION__.'().', OCP\Util::DEBUG); + $userBackend=$this->getRealBackend($uid); + if ($userBackend===null){ + return false; +@@ -249,12 +249,12 @@ class OC_USER_OTP extends OC_User_Backend{ + } + + if(!$this->mOtp->CheckUserExists($uid)){ +- OC_Log::write('OC_USER_OTP','No OTP for user '.$uid.' use user backend', OC_Log::DEBUG); ++ OCP\Util::writeLog('OC_USER_OTP','No OTP for user '.$uid.' use user backend', OCP\Util::DEBUG); + return $userBackend->checkPassword($uid, $password); + }else{ + $this->mOtp->SetUser($uid); + $authMethode=OCP\Config::getAppValue('user_otp','authMethod',_AUTH_DEFAULT_); +- OC_Log::write('OC_USER_OTP','used auth method : '.$authMethode, OC_Log::DEBUG); ++ OCP\Util::writeLog('OC_USER_OTP','used auth method : '.$authMethode, OCP\Util::DEBUG); + switch($authMethode){ + case _AUTH_STANDARD_: + return $userBackend->checkPassword($uid, $password); +@@ -296,7 +296,7 @@ class OC_USER_OTP extends OC_User_Backend{ + if(!isset($_POST['otpPassword']) || $_POST['otpPassword']===""){ + return false; + } +- OC_Log::write('OC_USER_OTP','used OTP : '.$_POST['otpPassword'], OC_Log::DEBUG); ++ OCP\Util::writeLog('OC_USER_OTP','used OTP : '.$_POST['otpPassword'], OCP\Util::DEBUG); + $result = $this->mOtp->CheckToken($_POST['otpPassword']); + if ($result===0){ + return $userBackend->checkPassword($uid, $password); |