Skip to content

Commit

Permalink
Message attribute is now case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Webklex committed Jun 25, 2017
1 parent ec1cf60 commit add1a03
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip

## [UNRELEASED]

## [1.0.2.8] - 2017-06-25
### Added
-Message attribute is now case insensitive
-Readme file extended
-Changelog typo fixed

### Affected Classes
\Webklex\IMAP\Message


## [1.0.2.7] - 2017-04-23
### Added
-imap_fetchheader(): Bad message number - merged
-Changed the default options in imap_fetchbody function - merged
-Attachment handling fixed (Plain text files are no longer ignored)
-Optional config parameter added.
-Readme file extened
-Readme file extended

### Changes
\Webklex\IMAP\Client
Expand All @@ -24,7 +34,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
### Added
-Code commented
-A whole bunch of functions and features added. To many to mention all of them ;)
-Readme file extened
-Readme file extended

### Changes
\Webklex\IMAP\Client
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ You can define your accounts inside the `config/imap.php` file:
```

## Documentation
### \Webklex\IMAP\Client
### [Client::class](src/IMAP/Client.php)
| Method | Arguments | Return | Description |
| --------------------- | ------------------------------------------------- | :-----: | ---------------------------------------------------------------------------------------------------------------------------- |
| setConfig | array $config | self | Set the Client configuration. Take a look at `config/imap.php` for more inspiration. |
Expand All @@ -157,7 +157,7 @@ You can define your accounts inside the `config/imap.php` file:
| expunge | | bool | Delete all messages marked for deletion |
| checkCurrentMailbox | | object | Check current mailbox |

### \Webklex\IMAP\Message
### [Message::class](src/IMAP/Message.php)
| Method | Arguments | Return | Description |
| -------------- | ----------------------------- | :---------: | -------------------------------------- |
| delete | | | Delete the current Message |
Expand All @@ -171,7 +171,7 @@ You can define your accounts inside the `config/imap.php` file:
| getHTMLBody | | string | Get the Message html body |
| getAttachments | | collection | Get all message attachments |

### \Webklex\IMAP\Folder
### [Folder::class](src/IMAP/Folder.php)
| Method | Arguments | Return | Description |
| ------------- | ------------------------------------------------------- | :-----: | ---------------------------------------------- |
| hasChildren | | bool | Determine if folder has children. |
Expand Down
6 changes: 3 additions & 3 deletions src/IMAP/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ protected function fetchAttachment($structure, $partNumber){
$attachment->name = false;
if (property_exists($structure, 'dparameters')) {
foreach ($structure->dparameters as $parameter) {
if ($parameter->attribute == "filename") {
if (strtolower($parameter->attribute) == "filename") {
$attachment->name = $parameter->value;
break;
}
Expand All @@ -420,7 +420,7 @@ protected function fetchAttachment($structure, $partNumber){

if (!$attachment->name && property_exists($structure, 'parameters')) {
foreach ($structure->parameters as $parameter) {
if ($parameter->attribute == "name") {
if (strtolower($parameter->attribute) == "name") {
$attachment->name = $parameter->value;
break;
}
Expand Down Expand Up @@ -495,7 +495,7 @@ private function convertEncoding($str, $from = "ISO-8859-2", $to = "UTF-8") {
private function getEncoding($structure) {
if (property_exists($structure, 'parameters')) {
foreach ($structure->parameters as $parameter) {
if ($parameter->attribute == "charset") {
if (strtolower($parameter->attribute) == "charset") {
return strtoupper($parameter->value);
}
}
Expand Down

0 comments on commit add1a03

Please sign in to comment.