Merge branches 'master' and 'master' of github.com:HaschekSolutions/opentrashmail
This commit is contained in:
commit
4298f1a294
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## V1.2.3
|
||||
- Fixed attachment deletion bug
|
||||
- Fixed random email generation
|
||||
|
||||
## V1.2.0
|
||||
- Implemented IP/Subnet filter using the config option `ALLOWED_IPS`
|
||||
- Implemented Password authentication of the site and API using config option `PASSWORD`
|
||||
|
|
|
@ -134,17 +134,12 @@ function attachmentExists($email,$id,$attachment=false)
|
|||
|
||||
function listAttachmentsOfMailID($email,$id)
|
||||
{
|
||||
$o = array();
|
||||
if ($handle = opendir(getDirForEmail($email).DS.'attachments')) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if (startsWith($entry,$id.'-')) {
|
||||
$o[] = $entry;
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
return $o;
|
||||
$data = json_decode(file_get_contents(getDirForEmail($email).DS.$id.'.json'),true);
|
||||
$attachments = $data['parsed']['attachments'];
|
||||
if(!is_array($attachments))
|
||||
return [];
|
||||
else
|
||||
return $attachments;
|
||||
}
|
||||
|
||||
function deleteEmail($email,$id)
|
||||
|
|
Loading…
Reference in a new issue