From 1abe149b13ed1064c0c56e582d2ddfa0aa756729 Mon Sep 17 00:00:00 2001 From: Stephen J Carnam Date: Mon, 31 Jul 2023 13:24:43 -0700 Subject: [PATCH] Already patch notice --- hooks/pluginable.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hooks/pluginable.php b/hooks/pluginable.php index 161e448..6fdc2e2 100644 --- a/hooks/pluginable.php +++ b/hooks/pluginable.php @@ -465,6 +465,10 @@ public function patch_file( $file, $search, $replace, $retry_tabs = false ) { $content = str_replace( $search, $replace, $content ); file_put_contents( $file, $content ); $this->log( "Patched $file with $replace"); + }else{ + if ( strstr( $content, $replace ) ) { + $this->log( "Already patched $file with $replace" ); + } } // Report patch_file failures, Hestia version may not be compatible