diff --git a/README.md b/README.md index e325083..1c774d8 100644 --- a/README.md +++ b/README.md @@ -132,9 +132,9 @@ cd /path-to-some-latex-project │ ├── Handler │ │ └── PluginHandler.php # Main plugin handler / controller │ ├── Helpers # Helper classes - │ │ ├── ArticleSubmissionFile.php # Add submission files to submission + │ │ ├── SubmissionFileHelper.php # Add submission files to submission │ │ ├── FileSystemHelper.php # FileSystem methods - │ │ ├── Log.php # Logging methods + │ │ ├── LogHelper.php # Logging methods │ │ └── ZipHelper.php # ZipArchive methods ├── locale # Language files ├── templates # Templates folder diff --git a/classes/Action/Convert.php b/classes/Action/Convert.php index 0b7c28a..2ce6b84 100755 --- a/classes/Action/Convert.php +++ b/classes/Action/Convert.php @@ -19,7 +19,7 @@ use APP\notification\Notification; use APP\notification\NotificationManager; use APP\plugins\generic\latexConverter\classes\Helpers\FileSystemHelper; -use APP\plugins\generic\latexConverter\classes\Helpers\ArticleSubmissionFile; +use APP\plugins\generic\latexConverter\classes\Helpers\SubmissionFileHelper; use PKP\config\Config; use PKP\core\JSONMessage; use PKP\core\PKPRequest; @@ -355,8 +355,8 @@ private function addFiles(string $fileToAdd, string $fileToAddWithoutExtension): if ($file !== $this->mainFileName && $file !== $fileToAdd) $this->dependentFileNames[] = $file; - $articleSubmissionFile = - new ArticleSubmissionFile( + $submissionFileHelper = + new SubmissionFileHelper( $this->request, $this->submissionId, $this->submissionFile, @@ -365,10 +365,10 @@ private function addFiles(string $fileToAdd, string $fileToAddWithoutExtension): $fileToAdd, $this->dependentFileNames); - if (!$articleSubmissionFile->addMainFile()) return false; + if (!$submissionFileHelper->addMainFile()) return false; if (!empty($this->dependentFileNames)) - if (!$articleSubmissionFile->addDependentFiles()) return false; + if (!$submissionFileHelper->addDependentFiles()) return false; return true; } diff --git a/classes/Action/Extract.php b/classes/Action/Extract.php index 32e2dc2..d3b9786 100755 --- a/classes/Action/Extract.php +++ b/classes/Action/Extract.php @@ -20,7 +20,7 @@ use APP\notification\NotificationManager; use APP\plugins\generic\latexConverter\classes\Helpers\FileSystemHelper; use APP\plugins\generic\latexConverter\classes\Helpers\ZipHelper; -use APP\plugins\generic\latexConverter\classes\Helpers\ArticleSubmissionFile; +use APP\plugins\generic\latexConverter\classes\Helpers\SubmissionFileHelper; use APP\plugins\generic\latexConverter\LatexConverterPlugin; use APP\template\TemplateManager; use PKP\core\JSONMessage; @@ -245,8 +245,8 @@ public function process(): JSONMessage } // add main file - $articleSubmissionFile = - new ArticleSubmissionFile( + $submissionFileHelper = + new SubmissionFileHelper( $this->request, $this->submissionId, $this->submissionFile, @@ -256,11 +256,11 @@ public function process(): JSONMessage $this->dependentFileNames); if (!empty($this->mainFileName)) - if (!$articleSubmissionFile->addMainFile()) return $this->defaultResponse(); + if (!$submissionFileHelper->addMainFile()) return $this->defaultResponse(); // add dependent files if (!empty($this->dependentFileNames)) - if (!$articleSubmissionFile->addDependentFiles()) return $this->defaultResponse(); + if (!$submissionFileHelper->addDependentFiles()) return $this->defaultResponse(); // all went well, return ok return $this->defaultResponse(true); diff --git a/classes/Helpers/Log.php b/classes/Helpers/LogHelper.php similarity index 94% rename from classes/Helpers/Log.php rename to classes/Helpers/LogHelper.php index 68beec4..a7ce9fb 100755 --- a/classes/Helpers/Log.php +++ b/classes/Helpers/LogHelper.php @@ -1,12 +1,12 @@ $baseDir . '/classes/Action/Extract.php', 'APP\\plugins\\generic\\latexConverter\\classes\\Components\\Forms\\SettingsForm' => $baseDir . '/classes/Components/Forms/SettingsForm.php', 'APP\\plugins\\generic\\latexConverter\\classes\\Handler\\PluginHandler' => $baseDir . '/classes/Handler/PluginHandler.php', - 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\ArticleSubmissionFile' => $baseDir . '/classes/Helpers/ArticleSubmissionFile.php', + 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\SubmissionFileHelper' => $baseDir . '/classes/Helpers/SubmissionFileHelper.php', 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\FileSystemHelper' => $baseDir . '/classes/Helpers/FileSystemHelper.php', - 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\Log' => $baseDir . '/classes/Helpers/Log.php', + 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\LogHelper' => $baseDir . '/classes/Helpers/LogHelper.php', 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\ZipHelper' => $baseDir . '/classes/Helpers/ZipHelper.php', 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 4f694cc..d3b795c 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -11,9 +11,9 @@ class ComposerStaticInit1b66bd88bb6dab52bf3af9b9a16ca7a1 'APP\\plugins\\generic\\latexConverter\\classes\\Action\\Extract' => __DIR__ . '/../..' . '/classes/Action/Extract.php', 'APP\\plugins\\generic\\latexConverter\\classes\\Components\\Forms\\SettingsForm' => __DIR__ . '/../..' . '/classes/Components/Forms/SettingsForm.php', 'APP\\plugins\\generic\\latexConverter\\classes\\Handler\\PluginHandler' => __DIR__ . '/../..' . '/classes/Handler/PluginHandler.php', - 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\ArticleSubmissionFile' => __DIR__ . '/../..' . '/classes/Helpers/ArticleSubmissionFile.php', + 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\SubmissionFileHelper' => __DIR__ . '/../..' . '/classes/Helpers/SubmissionFileHelper.php', 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\FileSystemHelper' => __DIR__ . '/../..' . '/classes/Helpers/FileSystemHelper.php', - 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\Log' => __DIR__ . '/../..' . '/classes/Helpers/Log.php', + 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\LogHelper' => __DIR__ . '/../..' . '/classes/Helpers/LogHelper.php', 'APP\\plugins\\generic\\latexConverter\\classes\\Helpers\\ZipHelper' => __DIR__ . '/../..' . '/classes/Helpers/ZipHelper.php', 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', ); diff --git a/version.xml b/version.xml index 8c7b6cb..8218c66 100755 --- a/version.xml +++ b/version.xml @@ -18,8 +18,8 @@ latexConverter plugins.generic - 1.0.0.0 - 2023-05-01 + 1.1.0.0 + 2024-01-23 1 latexConverterPlugin