From e2eb3f672083bb079de693f4534e1eac1ba60a7b Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 27 Aug 2024 15:39:13 +1200 Subject: [PATCH] API Standardise extension hooks (#629) --- src/File.php | 2 +- src/Folder.php | 2 +- src/Storage/DBFile.php | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/File.php b/src/File.php index 8b3c6483..fa8e499b 100644 --- a/src/File.php +++ b/src/File.php @@ -1183,7 +1183,7 @@ public function validate() { $result = ValidationResult::create(); $this->File->validate($result, $this->Name); - $this->extend('validate', $result); + $this->extend('updateValidate', $result); return $result; } diff --git a/src/Folder.php b/src/Folder.php index e9e1c78d..1a6041c5 100644 --- a/src/Folder.php +++ b/src/Folder.php @@ -339,7 +339,7 @@ public function StripThumbnail() public function validate() { $result = ValidationResult::create(); - $this->extend('validate', $result); + $this->extend('updateValidate', $result); return $result; } diff --git a/src/Storage/DBFile.php b/src/Storage/DBFile.php index d75e61ec..5ec4300b 100644 --- a/src/Storage/DBFile.php +++ b/src/Storage/DBFile.php @@ -277,8 +277,7 @@ public function getURL($grant = true) return null; } $url = $this->getSourceURL($grant); - $this->updateURL($url); - $this->extend('updateURL', $url); + $this->invokeWithExtensions('updateURL', $url); return $url; }