R26763 - in /trunk: etemplate/inc/class.vfs_widget.inc.php phpgwapi/inc/class.vfs_stream_wrapper.inc.php

Author: ralfbecker
New Revision: 26763

URL: http://www.egroupware.org/viewvc/egroupware?rev=3D26763&view=3Drev
Log:
allowing stream-wrappers to specify an other mime-type for directories

Modified:
trunk/etemplate/inc/class.vfs_widget.inc.php
trunk/phpgwapi/inc/class.vfs_stream_wrapper.inc.php

Modified: trunk/etemplate/inc/class.vfs_widget.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/etemplate/inc/class.=
vfs_widget.inc.php?rev=3D26763&r1=3D26762&r2=3D26763&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
— trunk/etemplate/inc/class.vfs_widget.inc.php (original)
+++ trunk/etemplate/inc/class.vfs_widget.inc.php Wed Apr 8 11:54:13 2009
@@ -152,7 +152,7 @@
}
if (egw_vfs::check_access($path,egw_vfs::READABLE)) // show link only=
if we have access to the file or dir
{

  •   				if ($n < count($comps)-1 || $mime =3D=3D egw_vfs::DIR_MIME_TYPE)
    
  •   				if ($n < count($comps)-1 || $mime =3D=3D egw_vfs::DIR_MIME_TYPE || e=
    

gw_vfs::is_dir($path))
{
$value[‘l’.$n] =3D ‘/index.php?menuaction=3Dfilemanager.filemanager=
_ui.index&path=3D’.urlencode($path);
$target =3D ‘’;

Modified: trunk/phpgwapi/inc/class.vfs_stream_wrapper.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/phpgwapi/inc/class.v=
fs_stream_wrapper.inc.php?rev=3D26763&r1=3D26762&r2=3D26763&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
— trunk/phpgwapi/inc/class.vfs_stream_wrapper.inc.php (original)
+++ trunk/phpgwapi/inc/class.vfs_stream_wrapper.inc.php Wed Apr 8 11:54:13=
2009
@@ -595,11 +595,7 @@
{
return false;
}

  •   if (is_dir($url))
    
  •   {
    
  •   	$mime =3D self::DIR_MIME_TYPE;
    
  •   }
    
  •   if (!$mime && ($scheme =3D parse_url($url,PHP_URL_SCHEME)))
    
  •   if (($scheme =3D parse_url($url,PHP_URL_SCHEME)))
      {
      	// check it it's an eGW stream wrapper returning mime-type via url_stat
      	if (class_exists($class =3D self::scheme2class($scheme)) && ($mime_attr=
    

=3D @constant($class.’::STAT_RETURN_MIME_TYPE’)))
@@ -610,6 +606,10 @@
$mime =3D $stat[$mime_attr];
}
}

  •   }
    
  •   if (!$mime && is_dir($url))
    
  •   {
    
  •   	$mime =3D self::DIR_MIME_TYPE;
      }
      // if we operate on the regular filesystem and the mime_content_type fun=
    

ction is available --> use it
if (!$mime && !$scheme && function_exists(‘mime_content_type’))


This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com


eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs