[Phpfreechat-svn] SF.net SVN: phpfreechat: [531] trunk/src
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-05-28 18:54:52
|
Revision: 531 Author: kerphi Date: 2006-05-28 11:54:30 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=531&view=rev Log Message: ----------- Bug fix: unknown command error handling was broken Modified Paths: -------------- trunk/src/pfccommand.class.php trunk/src/proxys/auth.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-05-28 18:47:04 UTC (rev 530) +++ trunk/src/pfccommand.class.php 2006-05-28 18:54:30 UTC (rev 531) @@ -75,24 +75,25 @@ { $cmd =& new $cmd_classname(); $cmd->name = $cmd_name; + + // instanciate the proxy chains + $proxy = NULL; + $proxy_name = strtolower($c->proxys[0]); + $proxy_classname = "pfcProxyCommand_" . $proxy_name; + $proxy_filename = dirname(__FILE__)."/proxys/".$proxy_name.".class.php"; + if (file_exists($proxy_filename)) require_once($proxy_filename); + if (class_exists($proxy_classname)) + { + $proxy =& new $proxy_classname(); + $proxy->name = $cmd_name; + $proxy->proxyname = $proxy_name; + $proxy->linkTo($cmd); + } + + // return the proxy, not the command (the proxy will forward the request to the real command) + return $proxy; } - - // instanciate the proxy chains - $proxy = NULL; - $proxy_name = strtolower($c->proxys[0]); - $proxy_classname = "pfcProxyCommand_" . $proxy_name; - $proxy_filename = dirname(__FILE__)."/proxys/".$proxy_name.".class.php"; - if (file_exists($proxy_filename)) require_once($proxy_filename); - if (class_exists($proxy_classname)) - { - $proxy =& new $proxy_classname(); - $proxy->name = $cmd_name; - $proxy->proxyname = $proxy_name; - $proxy->linkTo($cmd); - } - - // return the proxy, not the command (the proxy will forward the request to the real command) - return $proxy; + return $cmd; } /** Modified: trunk/src/proxys/auth.class.php =================================================================== --- trunk/src/proxys/auth.class.php 2006-05-28 18:47:04 UTC (rev 530) +++ trunk/src/proxys/auth.class.php 2006-05-28 18:54:30 UTC (rev 531) @@ -75,7 +75,7 @@ } } - // on passe la main a au prochain proxy (ou a la command finale) + // forward the command to the next proxy or to the final command $this->next->run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |