[dev] Re: [cvs] commit: horde/lib/MIME Magic.php horde/config conf.php.dist horde/docs CHANGES

Mike Cochrane mike at graftonhall.co.nz
Fri Dec 13 20:50:40 PST 2002


This is nearly your todo...
It uses the mime_magic php extension which is based on the apache module.

The extension is only in the php cvs I think... it's in the win32 snapshots that
i use and works okay.

- Mike :-)

140,142c140
<         if (empty($conf['programs']['file']) ||
<             !is_executable($conf['programs']['file']) ||
<             !file_exists($path)) {
---
>         if (!file_exists($path)) {
143a142,150
>         }    
> 
>         if (empty($conf['programs']['file']) ||
>             !is_executable($conf['programs']['file'])) {
>             if (extension_loaded('mime_magic')) {
>                 return mime_content_type($path);
>             } else {
>                 return false;
>             }    


> ----- Message from slusarz@bigworm.colorado.edu ---------
>     Date: Thu, 12 Dec 2002 22:30:01 -0800 (PST)
>     From: Michael M Slusarz <slusarz@bigworm.colorado.edu>
> Reply-To: dev@lists.horde.org
>  Subject: [cvs] commit: horde/lib/MIME Magic.php horde/config conf.php.dist
horde/docs CHANGES
>       To: cvs@lists.horde.org
> 
> slusarz     2002/12/12 22:30:01 PST
> 
>   Modified files:
>     lib/MIME             Magic.php
>     config               conf.php.dist
>     docs                 CHANGES
>   Log:
>   Add support for using the UNIX file command to determine the MIME type of
>   unknown files.
> 
>   Revision  Changes    Path
>   1.20      +11 -1     horde/config/conf.php.dist
>   1.353     +2 -0      horde/docs/CHANGES
>   1.19      +45 -5     horde/lib/MIME/Magic.php
> 
>   Chora Links:
>  
> http://cvs.horde.org/diff.php/horde/config/conf.php.dist?r1=1.19&r2=1.20&ty=u
>   http://cvs.horde.org/diff.php/horde/docs/CHANGES?r1=1.352&r2=1.353&ty=u
>   http://cvs.horde.org/diff.php/horde/lib/MIME/Magic.php?r1=1.18&r2=1.19&ty=u
> 
> --
> To unsubscribe, mail: cvs-unsubscribe@lists.horde.org
> 
> 
> 
> ----- End message from slusarz@bigworm.colorado.edu -----






More information about the dev mailing list