R27466 - in /trunk/phpgwapi/inc: class.egw_link.inc.php class.sqlfs_stream_wrapper.inc.php

Author: ralfbecker
New Revision: 27466

URL: http://www.egroupware.org/viewvc/egroupware?rev=27466&view=rev
Log:
checking if attachment or attachment dir exists, before trying to delete it, to quieten warning, also improved warning to be precise if file does not exist, is no directory, or permission missing

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

Modified: trunk/phpgwapi/inc/class.egw_link.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/phpgwapi/inc/class.egw_link.inc.php?rev=27466&r1=27465&r2=27466&view=diff

— trunk/phpgwapi/inc/class.egw_link.inc.php (original)
+++ trunk/phpgwapi/inc/class.egw_link.inc.php Sat Jul 18 11:12:52 2009
@@ -827,12 +827,12 @@
}
if (self::DEBUG)
{

  •   	echo "<p>egw_link::delete_attached('$app','$id','$fname') url=$url</p>\n";
    
  •   }
    
  •   if (($Ok = egw_vfs::remove($url,true)) && ((int)$app > 0 || $fname))
    
  •   	echo '<p>'.__METHOD__."('$app','$id','$fname') url=$url</p>\n";
    
  •   }
    
  •   if (($Ok = !file_exists($url) || egw_vfs::remove($url,true)) && ((int)$app > 0 || $fname))
      {
      	// try removing the dir, in case it's empty
    
  •   	@rmdir(egw_vfs::dirname($url));
    
  •   	@egw_vfs::rmdir(egw_vfs::dirname($url));
      }
      if (!is_null($current_is_root))
      {
    

Modified: trunk/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php?rev=27466&r1=27465&r2=27466&view=diff

— trunk/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php (original)
+++ trunk/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php Sat Jul 18 11:12:52 2009
@@ -695,10 +695,12 @@
!egw_vfs::check_access($parent,egw_vfs::WRITABLE))
{
self::_remove_password($url);

  •   	if (self::LOG_LEVEL) error_log(__METHOD__."($url,$options) (type=$type) permission denied!");
    
  •   	$err_msg = __METHOD__."($url,$options) ".(!$stat ? 'not found!' :
    
  •   		($stat['mime'] != self::DIR_MIME_TYPE ? 'not a directory!' : 'permission denied!'));
    
  •   	if (self::LOG_LEVEL) error_log($err_msg);
      	if (!($options & STREAM_URL_STAT_QUIET))
      	{
    
  •   		trigger_error(__METHOD__."('$url',$options) (type=$type) permission denied!",E_USER_WARNING);
    
  •   		trigger_error($err_msg,E_USER_WARNING);
      	}
      	return false;	// no permission or file does not exist
      }
    

Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World™ will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge


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