cvs: pear /HTML_QuickForm_advmultiselect advmultiselect.php
| From: | Laurent Laville | Date: | Sun, 05 Apr 2009 07:03:39 +0000 |
| Subject: | cvs: pear /HTML_QuickForm_advmultiselect advmultiselect.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-55887@lists.php.net to get a copy of this message | ||
farell Sun Apr 5 07:03:39 2009 UTC
Modified files:
/pear/HTML_QuickForm_advmultiselect advmultiselect.php
Log:
fix bug:
- single or dual shape is now well commented when using setComment()
http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm_advmultiselect/advmultiselect.php?r1=1.35&r2=1.36&diff_format=u
Index: pear/HTML_QuickForm_advmultiselect/advmultiselect.php
diff -u pear/HTML_QuickForm_advmultiselect/advmultiselect.php:1.35
pear/HTML_QuickForm_advmultiselect/advmultiselect.php:1.36
--- pear/HTML_QuickForm_advmultiselect/advmultiselect.php:1.35 Sat Feb 7 11:56:29 2009
+++ pear/HTML_QuickForm_advmultiselect/advmultiselect.php Sun Apr 5 07:03:39 2009
@@ -36,7 +36,7 @@
* @author Laurent Laville <pear@laurent-laville.org>
* @copyright 2005-2009 Laurent Laville
* @license http://www.opensource.org/licenses/bsd-license.php
BSD
- * @version CVS: $Id: advmultiselect.php,v 1.35 2009/02/07 11:56:29 farell Exp $
+ * @version CVS: $Id: advmultiselect.php,v 1.36 2009/04/05 07:03:39 farell Exp $
* @link http://pear.php.net/package/HTML_QuickForm_advmultiselect
* @since File available since Release 0.4.0
*/
@@ -591,11 +591,6 @@
$tabs = $this->_getTabs();
$tab = $this->_getTab();
- $strHtml = '';
-
- if ($this->getComment() != '') {
- $strHtml .= $tabs . '<!-- ' . $this->getComment() . "
//-->" . PHP_EOL;
- }
$selectId = $this->getName();
$selectName = $this->getName() . '[]';
@@ -994,6 +989,12 @@
$strHtml = str_replace($placeHolders, $htmlElements, $strHtml);
+ $comment = $this->getComment();
+
+ if (!empty($comment)) {
+ $strHtml = $tabs . '<!-- ' . $comment . " //-->" . PHP_EOL .
$strHtml;
+ }
+
return $strHtml;
}