diff --git a/api/v1/announcements/PKPAnnouncementHandler.php b/api/v1/announcements/PKPAnnouncementHandler.php index fd11146c1dc..6c35800c8e6 100644 --- a/api/v1/announcements/PKPAnnouncementHandler.php +++ b/api/v1/announcements/PKPAnnouncementHandler.php @@ -25,7 +25,7 @@ use PKP\announcement\Collector; use PKP\config\Config; use PKP\context\Context; -use PKP\core\exceptions\StoryTemporaryFileException; +use PKP\core\exceptions\StoreTemporaryFileException; use PKP\db\DAORegistry; use PKP\facades\Locale; use PKP\handler\APIHandler; @@ -223,7 +223,7 @@ public function add($slimRequest, $response, $args) try { $announcementId = Repo::announcement()->add($announcement); - } catch (StoryTemporaryFileException $e) { + } catch (StoreTemporaryFileException $e) { $announcement = Repo::announcement()->get($announcementId); Repo::announcement()->delete($announcement); return $response->withStatus(400)->withJson([ @@ -285,7 +285,7 @@ public function edit($slimRequest, $response, $args) try { Repo::announcement()->edit($announcement, $params); - } catch (StoryTemporaryFileException $e) { + } catch (StoreTemporaryFileException $e) { Repo::announcement()->delete($announcement); return $response->withStatus(400)->withJson([ 'image' => __('api.400.errorUploadingImage') diff --git a/api/v1/highlights/HighlightsHandler.php b/api/v1/highlights/HighlightsHandler.php index a4b7534dcff..771ae1b431f 100644 --- a/api/v1/highlights/HighlightsHandler.php +++ b/api/v1/highlights/HighlightsHandler.php @@ -20,7 +20,7 @@ use APP\facades\Repo; use Exception; use PKP\core\APIResponse; -use PKP\core\exceptions\StoryTemporaryFileException; +use PKP\core\exceptions\StoreTemporaryFileException; use PKP\handler\APIHandler; use PKP\highlight\Collector; use PKP\plugins\Hook; @@ -170,7 +170,7 @@ public function add(SlimRequest $slimRequest, APIResponse $response, array $args try { $highlightId = Repo::highlight()->add($highlight); - } catch (StoryTemporaryFileException $e) { + } catch (StoreTemporaryFileException $e) { $highlight = Repo::highlight()->get($highlightId, $context?->getId()); Repo::highlight()->delete($highlight); return $response->withStatus(400)->withJson([ diff --git a/classes/announcement/Repository.php b/classes/announcement/Repository.php index 3d009811f10..675fb84d1a8 100644 --- a/classes/announcement/Repository.php +++ b/classes/announcement/Repository.php @@ -18,7 +18,7 @@ use APP\file\PublicFileManager; use PKP\context\Context; use PKP\core\Core; -use PKP\core\exceptions\StoryTemporaryFileException; +use PKP\core\exceptions\StoreTemporaryFileException; use PKP\file\FileManager; use PKP\file\TemporaryFile; use PKP\file\TemporaryFileManager; @@ -237,7 +237,7 @@ protected function handleImageUpload(Announcement $announcement): void $this->dao->update($announcement); } else { $this->delete($announcement); - throw new StoryTemporaryFileException($temporaryFile, $filePath, $user, $announcement); + throw new StoreTemporaryFileException($temporaryFile, $filePath, $user, $announcement); } } } diff --git a/classes/highlight/Repository.php b/classes/highlight/Repository.php index a3f8ff40b43..b2853c85eb7 100644 --- a/classes/highlight/Repository.php +++ b/classes/highlight/Repository.php @@ -19,7 +19,7 @@ use Exception; use PKP\context\Context; use PKP\core\Core; -use PKP\core\exceptions\StoryTemporaryFileException; +use PKP\core\exceptions\StoreTemporaryFileException; use PKP\file\FileManager; use PKP\file\TemporaryFile; use PKP\file\TemporaryFileManager; @@ -252,7 +252,7 @@ public function getFileUploadBaseUrl(?Context $context = null): string /** * Handle image uploads * - * @throws StoryTemporaryFileException + * @throws StoreTemporaryFileException */ protected function handleImageUpload(Highlight $highlight): void { @@ -270,7 +270,7 @@ protected function handleImageUpload(Highlight $highlight): void $this->dao->update($highlight); } else { $this->delete($highlight); - throw new StoryTemporaryFileException($temporaryFile, $filepath, $user, $highlight); + throw new StoreTemporaryFileException($temporaryFile, $filepath, $user, $highlight); } } }