R35552 - in /trunk/phpgwapi/inc: class.egw_link.inc.php class.egw_vfs.inc.php

Author: ralfbecker
New Revision: 35552

URL: http://svn.stylite.de/viewvc/egroupware?rev=35552&view=rev
Log:
fixed attachments lost when converting email to infolog, is_uploaded_file check in egw_vfs::copy_uploaded need to be switched off (plus improved logging)

Modified:
trunk/phpgwapi/inc/class.egw_link.inc.php
trunk/phpgwapi/inc/class.egw_vfs.inc.php

Modified: trunk/phpgwapi/inc/class.egw_link.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/phpgwapi/inc/class.egw_link.inc.php?rev=35552&r1=35551&r2=35552&view=diff

— trunk/phpgwapi/inc/class.egw_link.inc.php (original)
+++ trunk/phpgwapi/inc/class.egw_link.inc.php Wed Jun 29 09:00:09 2011
@@ -941,6 +941,8 @@
/**
* Put a file to the corrosponding place in the VFS and set the attributes
*

    • Does NO is_uploaded_file check, calling application is responsible for doing that for uploaded files!
    • @param string $app appname to linke the file to
    • @param string $id id in $app
    • @param array $file informations about the file in format of the etemplate file-type
      @@ -961,8 +963,8 @@
      }
      if (file_exists($entry_dir) || ($Ok = mkdir($entry_dir,0,true)))
      {
  •   	$Ok = egw_vfs::copy_uploaded($file, $p=self::vfs_path($app,$id,'',true), $comment);
    
  •   	error_log(__METHOD__."('$app', '$id', ".array2string($file).", '$comment') called egw_vfs::copy('$file[tmp_name]', '$p')=".array2string($Ok));
    
  •   	$Ok = egw_vfs::copy_uploaded($file, $p=self::vfs_path($app,$id,'',true), $comment, false);	// no is_uploaded_file() check!
    
  •   	if (!$Ok) error_log(__METHOD__."('$app', '$id', ".array2string($file).", '$comment') called egw_vfs::copy_uploaded('$file[tmp_name]', '$p', '$comment', false)=".array2string($Ok));
      }
      else
      {
    

Modified: trunk/phpgwapi/inc/class.egw_vfs.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/phpgwapi/inc/class.egw_vfs.inc.php?rev=35552&r1=35551&r2=35552&view=diff

— trunk/phpgwapi/inc/class.egw_vfs.inc.php (original)
+++ trunk/phpgwapi/inc/class.egw_vfs.inc.php Wed Jun 29 09:00:09 2011
@@ -1710,10 +1710,14 @@
{
$target = self::concat($target, self::encodePathComponent(is_array($src) ? $src[‘name’] : basename($tmp_name)));
}

  •   if ($check_is_uploaded_file && !is_uploaded_file($tmp_name) ||
    
  •   	!(self::is_writable($target) || self::is_writable(self::dirname($target))))
    
  •   {
    
  •   	if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).") returning false");
    
  •   if ($check_is_uploaded_file && !is_uploaded_file($tmp_name))
    
  •   {
    
  •   	if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).",$check_is_uploaded_file) returning FALSE !is_uploaded_file()");
    
  •   	return false;
    
  •   }
    
  •   if (!(self::is_writable($target) || self::is_writable(self::dirname($target))))
    
  •   {
    
  •   	if (self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).",$check_is_uploaded_file) returning FALSE !writable");
      	return false;
      }
      if ($props)
    

@@ -1744,7 +1748,7 @@
self::proppatch($target, $props);
}
$ret = copy($tmp_name,self::PREFIX.$target) ? self::stat($target) : false;

  •   if (self::LOG_LEVEL > 1) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).") returning ".array2string($ret));
    
  •   if (self::LOG_LEVEL > 1 || !$ret && self::LOG_LEVEL) error_log(__METHOD__."($tmp_name, $target, ".array2string($props).") returning ".array2string($ret));
      return $ret;
    
    }
    }

All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2


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