[Phpfreechat-svn] SF.net SVN: phpfreechat: [518] trunk/src/commands/debug.class.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-05-28 11:55:36
|
Revision: 518 Author: kerphi Date: 2006-05-28 04:55:31 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=518&view=rev Log Message: ----------- New command: /debug '/debug userconfig' : display user config array '/debug globalconfig' : display global config array Added Paths: ----------- trunk/src/commands/debug.class.php Added: trunk/src/commands/debug.class.php =================================================================== --- trunk/src/commands/debug.class.php (rev 0) +++ trunk/src/commands/debug.class.php 2006-05-28 11:55:31 UTC (rev 518) @@ -0,0 +1,31 @@ +<?php + +require_once(dirname(__FILE__)."/../pfccommand.class.php"); + +class pfcCommand_debug extends pfcCommand +{ + function run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid) + { + $c =& $this->c; + $u =& $this->u; + + if ($param == "userconfig") + { + $msg = ""; + $msg .= var_export($u, true); + $msg = str_replace("\n","",addslashes(nl2br($msg))); + $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ok', '".$msg."');"); + } + + if ($param == "globalconfig") + { + $msg = ""; + $msg .= var_export($c, true); + $msg = str_replace("\n","",addslashes(nl2br($msg))); + $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ok', '".$msg."');"); + } + + } +} + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |