From 26756cc687f5494acbb09450a17e2f407f37117f Mon Sep 17 00:00:00 2001 From: FreeScout Date: Thu, 11 Apr 2024 23:17:54 -0700 Subject: [PATCH] Add vendor files to dist --- vendor/composer/autoload_classmap.php | 2 +- vendor/composer/autoload_static.php | 2 +- vendor/composer/installed.php | 4 +- vendor/webklex/php-imap/src/Part.php | 312 -------------------------- 4 files changed, 4 insertions(+), 316 deletions(-) delete mode 100644 vendor/webklex/php-imap/src/Part.php diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 1b671fb60..f7b496403 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -3237,7 +3237,7 @@ 'Webklex\\PHPIMAP\\Header' => $baseDir . '/overrides/webklex/php-imap/src/Header.php', 'Webklex\\PHPIMAP\\IMAP' => $vendorDir . '/webklex/php-imap/src/IMAP.php', 'Webklex\\PHPIMAP\\Message' => $baseDir . '/overrides/webklex/php-imap/src/Message.php', - 'Webklex\\PHPIMAP\\Part' => $vendorDir . '/webklex/php-imap/src/Part.php', + 'Webklex\\PHPIMAP\\Part' => $baseDir . '/overrides/webklex/php-imap/src/Part.php', 'Webklex\\PHPIMAP\\Query\\Query' => $vendorDir . '/webklex/php-imap/src/Query/Query.php', 'Webklex\\PHPIMAP\\Query\\WhereQuery' => $vendorDir . '/webklex/php-imap/src/Query/WhereQuery.php', 'Webklex\\PHPIMAP\\Structure' => $baseDir . '/overrides/webklex/php-imap/src/Structure.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index f7a5e84c7..6b7473cef 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4034,7 +4034,7 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4 'Webklex\\PHPIMAP\\Header' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Header.php', 'Webklex\\PHPIMAP\\IMAP' => __DIR__ . '/..' . '/webklex/php-imap/src/IMAP.php', 'Webklex\\PHPIMAP\\Message' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Message.php', - 'Webklex\\PHPIMAP\\Part' => __DIR__ . '/..' . '/webklex/php-imap/src/Part.php', + 'Webklex\\PHPIMAP\\Part' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Part.php', 'Webklex\\PHPIMAP\\Query\\Query' => __DIR__ . '/..' . '/webklex/php-imap/src/Query/Query.php', 'Webklex\\PHPIMAP\\Query\\WhereQuery' => __DIR__ . '/..' . '/webklex/php-imap/src/Query/WhereQuery.php', 'Webklex\\PHPIMAP\\Structure' => __DIR__ . '/../..' . '/overrides/webklex/php-imap/src/Structure.php', diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index c51a13f4c..6ff5d434c 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'freescout-helpdesk/freescout', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '3489567cdeef1978dfd5b445a89fbf3eb4e2bf01', + 'reference' => '171a4e3b480f565d05d41df05c336bf4bac0c85f', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -175,7 +175,7 @@ 'freescout-helpdesk/freescout' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '3489567cdeef1978dfd5b445a89fbf3eb4e2bf01', + 'reference' => '171a4e3b480f565d05d41df05c336bf4bac0c85f', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/vendor/webklex/php-imap/src/Part.php b/vendor/webklex/php-imap/src/Part.php deleted file mode 100644 index f29b63485..000000000 --- a/vendor/webklex/php-imap/src/Part.php +++ /dev/null @@ -1,312 +0,0 @@ -raw = $raw_part; - $this->header = $header; - $this->part_number = $part_number; - $this->parse(); - } - - /** - * Parse the raw parts - * - * @throws InvalidMessageDateException - */ - protected function parse(){ - if ($this->header === null) { - $body = $this->findHeaders(); - }else{ - $body = $this->raw; - } - - $this->parseDisposition(); - $this->parseDescription(); - $this->parseEncoding(); - - $this->charset = $this->header->get("charset"); - $this->name = $this->header->get("name"); - $this->filename = $this->header->get("filename"); - - if(!empty($this->header->get("id"))) { - $this->id = $this->header->get("id"); - } else if(!empty($this->header->get("x_attachment_id"))){ - $this->id = $this->header->get("x_attachment_id"); - } else if(!empty($this->header->get("content_id"))){ - $this->id = strtr($this->header->get("content_id"), [ - '<' => '', - '>' => '' - ]); - } - - $content_types = $this->header->get("content_type"); - if(!empty($content_types)){ - $this->subtype = $this->parseSubtype($content_types); - $content_type = $content_types; - if (is_array($content_types)) { - $content_type = $content_types[0]; - } - $parts = explode(';', $content_type); - $this->content_type = trim($parts[0]); - } - - - $this->content = trim(rtrim($body)); - $this->bytes = strlen($this->content); - } - - /** - * Find all available headers and return the leftover body segment - * - * @return string - * @throws InvalidMessageDateException - */ - private function findHeaders(): string { - $body = $this->raw; - while (($pos = strpos($body, "\r\n")) > 0) { - $body = substr($body, $pos + 2); - } - $headers = substr($this->raw, 0, strlen($body) * -1); - $body = substr($body, 0, -2); - - $this->header = new Header($headers); - - return $body; - } - - /** - * Try to parse the subtype if any is present - * @param $content_type - * - * @return string - */ - private function parseSubtype($content_type){ - if (is_array($content_type)) { - foreach ($content_type as $part){ - if ((strpos($part, "/")) !== false){ - return $this->parseSubtype($part); - } - } - return null; - } - if (($pos = strpos($content_type, "/")) !== false){ - return substr($content_type, $pos + 1); - } - return null; - } - - /** - * Try to parse the disposition if any is present - */ - private function parseDisposition(){ - $content_disposition = $this->header->get("content_disposition"); - if($content_disposition !== null) { - $this->ifdisposition = true; - $this->disposition = (is_array($content_disposition)) ? implode(' ', $content_disposition) : $content_disposition; - } - } - - /** - * Try to parse the description if any is present - */ - private function parseDescription(){ - $content_description = $this->header->get("content_description"); - if($content_description !== null) { - $this->ifdescription = true; - $this->description = $content_description; - } - } - - /** - * Try to parse the encoding if any is present - */ - private function parseEncoding(){ - $encoding = $this->header->get("content_transfer_encoding"); - if($encoding !== null) { - switch (strtolower($encoding)) { - case "quoted-printable": - $this->encoding = IMAP::MESSAGE_ENC_QUOTED_PRINTABLE; - break; - case "base64": - $this->encoding = IMAP::MESSAGE_ENC_BASE64; - break; - case "7bit": - $this->encoding = IMAP::MESSAGE_ENC_7BIT; - break; - case "8bit": - $this->encoding = IMAP::MESSAGE_ENC_8BIT; - break; - case "binary": - $this->encoding = IMAP::MESSAGE_ENC_BINARY; - break; - default: - $this->encoding = IMAP::MESSAGE_ENC_OTHER; - break; - - } - } - } - - /** - * Check if the current part represents an attachment - * - * @return bool - */ - public function isAttachment(): bool { - $valid_disposition = in_array(strtolower($this->disposition ?? ''), ClientManager::get('options.dispositions')); - - if ($this->type == IMAP::MESSAGE_TYPE_TEXT && ($this->ifdisposition == 0 || empty($this->disposition) || !$valid_disposition)) { - if (($this->subtype == null || in_array((strtolower($this->subtype)), ["plain", "html"])) && $this->filename == null && $this->name == null) { - return false; - } - } - return true; - } - -}