[imp] Minor but annoying bug (mailbox.php line 361)

Jan Schneider jan@horde.org
Thu, 24 Jan 2002 19:18:15 +0100


Zitat von "Marcus I. Ryan" <marcus@riboflavin.net>:

> Obviously my attachment didn't get marked text/plain, so didn't go
> through...rather than having the patch wrap, I just changed
> 
> MIME::decode($message->from)
> 
> to
> 
> (IsSet($message->subject)?MIME::decode($message->subject):_("[No
> Subject]"))
> 
> in lines 347, 350, and 361

Unfortunately this may break other filter rules that work on the subject 
line. Did you test if in the error case the subject really isn't set 
[!isset()] or is just a null string [empty()]. If it isn't set it would be 
better to set it to a null string to avoid collisions.

> > Another question is in IMP how do I specify the mime type for an
> > attachment?  The patch should already be text/plain, but say I
> > submit
> > a PDF document, how can I tell IMP to send it as text/plain so it
> > gets
> > through the filter?

The mime type is set by the browser, so you're not able to set it in IMP.

> > Lastly, is this the proper method of doing a patch? (diff -u
> > file1
> > file2) or is there a better method.

That's perfectly.

> > I'm just learning PHP, and I've never really worked with anyone
> > else
> > on programming projects on UNIX, so I'm still learning about
> > diff,
> > patch, etc.  I'm trying to get to the point where I can just
> > submit
> > patches instead of saying "Hey! Fix this!" :)

Great, that's the right attitude! :-)

Jan.

--
::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::