[Phpfreechat-svn] SF.net SVN: phpfreechat: [1100] trunk/src
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2007-08-08 07:28:27
|
Revision: 1100 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1100&view=rev Author: kerphi Date: 2007-08-08 00:17:57 -0700 (Wed, 08 Aug 2007) Log Message: ----------- Fix the new cmdtoplay queue Modified Paths: -------------- trunk/src/pfccommand.class.php trunk/src/pfccontainer.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2007-08-08 07:08:23 UTC (rev 1099) +++ trunk/src/pfccommand.class.php 2007-08-08 07:17:57 UTC (rev 1100) @@ -223,16 +223,14 @@ // Get all queued commands to be played $cmdtoplay_ids = $ct->getCmdMeta($nickid); - // process each command and parse content foreach ( $cmdtoplay_ids as $cid ) { // take a command from the list $cmdtoplay = $ct->getCmdMeta($nickid, $cid); - $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); - + $cmdtoplay = ($cmdtoplay == NULL || count($cmdtoplay) == 0) ? array() : unserialize($cmdtoplay[0]); + // play the command - // print_r($cmdtoplay); $cmd =& pfcCommand::Factory($cmdtoplay['cmdstr']); $cmdp = $cmdtoplay['params']; if (!isset($cmdp['param'])) $cmdp['param'] = ''; Modified: trunk/src/pfccontainer.class.php =================================================================== --- trunk/src/pfccontainer.class.php 2007-08-08 07:08:23 UTC (rev 1099) +++ trunk/src/pfccontainer.class.php 2007-08-08 07:17:57 UTC (rev 1100) @@ -523,7 +523,7 @@ function getCmdMeta($nickid, $key = NULL) { $ret = $this->getMeta("nickid-to-cmdtoplay", $nickid, $key, true); - return isset($ret['value'][0]) ? $ret['value'][0] : NULL; + return $ret['value']; } function setCmdMeta($nickid, $key, $value) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |