Author: ralfbecker
New Revision: 55275
URL: http://svn.stylite.de/viewvc/egroupware?rev=55275&view=rev
Log:
Api\Vfs::mime_icon() only returns url or eTemplate app/name string, no more html image tag, egw_vfs compatibility class still implements that
Modified:
trunk/egroupware/api/src/Vfs.php
trunk/phpgwapi/inc/class.egw_vfs.inc.php
— trunk/egroupware/api/src/Vfs.php (original)
+++ trunk/egroupware/api/src/Vfs.php Sat Mar 5 16:59:20 2016
@@ -14,7 +14,6 @@
namespace EGroupware\Api;
// explicitly import old phpgwapi classes used:
-use html;
use HTTP_WebDAV_Server;
/**
@@ -1192,7 +1191,7 @@
* Get the closest mime icon
*
* @param string $mime_type
-
-
@param boolean $et_image =true return $app/$icon string for etemplate (default) or html img tag if false
-
-
@param boolean $et_image =true return $app/$icon string for etemplate (default) or url for false
-
@param int $size =128
-
@return string
*/
@@ -1217,15 +1216,7 @@
{
$img = Image::find(‘etemplate’,$icon=‘mime’.$size.’_unknown’);
}
-
if ($et_image === 'url')
-
{
-
return $img;
-
}
-
if ($et_image)
-
{
-
return 'etemplate/'.$icon;
-
}
-
return html::image('etemplate',$icon,MimeMagic::mime2label($mime_type));
— trunk/phpgwapi/inc/class.egw_vfs.inc.php (original)
+++ trunk/phpgwapi/inc/class.egw_vfs.inc.php Sat Mar 5 16:59:20 2016
@@ -7,13 +7,36 @@
use EGroupware\Api\Vfs;
+use EGroupware\Api;
/**
-
@deprecated use EGroupware\Api\Vfs
*/
-class egw_vfs extends Vfs {}
+class egw_vfs extends Vfs
+{
- /**
-
- Get the closest mime icon
-
-
-
-
@param boolean $et_image =true return $app/$icon string for etemplate (default),
-
- ‘url’ for ‘url’ or false for an html image tag (deprecated)
-
-
- */
- static function mime_icon($mime_type, $et_image=true, $size=128)
- {
-
$img = parent::mime_icon($mime_type, $et_image && $et_image !== 'url', $size);
-
-
if (!$et_image)
-
{
-
list(,$img) = explode('/', $img);
-
return html::image('etemplate', $img, Api\MimeMagic::mime2label($mime_type));
-
}
-
return $img;
- }
+}
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs