R28330 - /branches/1.6/phpgwapi/inc/class.hooks.inc.php

Author: ralfbecker
New Revision: 28330

URL: http://www.egroupware.org/viewvc/egroupware?rev=28330&view=rev
Log:
“let new method hooks fail gracefully if hook class-file does not exists (like the old hooks do, eg. if app got removed)”

Modified:
branches/1.6/phpgwapi/inc/class.hooks.inc.php

Modified: branches/1.6/phpgwapi/inc/class.hooks.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/branches/1.6/phpgwapi/inc/class.hooks.inc.php?rev=28330&r1=28329&r2=28330&view=diff

— branches/1.6/phpgwapi/inc/class.hooks.inc.php (original)
+++ branches/1.6/phpgwapi/inc/class.hooks.inc.php Mon Nov 16 10:44:20 2009
@@ -158,7 +158,18 @@
if (strpos($method,’::’) !== false || count($parts) == 3 && $parts[1] != ‘inc’ && $parts[2] != ‘php’)
{
// new style hook with method string or static method (eg. ‘class::method’)

  •   		return ExecMethod($method,$args);
    
  •   		try
    
  •   		{
    
  •   			return ExecMethod($method,$args);
    
  •   		}
    
  •   		catch(egw_exception_assertion_failed $e)
    
  •   		{
    
  •   			if (substr($e->getMessage(),-19) == '.inc.php not found!')
    
  •   			{
    
  •   				return false;	// fail gracefully if hook class-file does not exists (like the old hooks do, eg. if app got removed)
    
  •   			}
    
  •   			throw $e;
    
  •   		}
      	}
      	else
      	{
    

Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what’s new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july


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