cvs: pear /PEAR_Frontend_Web/Frontend Web.php
| From: | Brett Bieber | Date: | Wed, 22 Apr 2009 02:18:01 +0000 |
| Subject: | cvs: pear /PEAR_Frontend_Web/Frontend Web.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-55967@lists.php.net to get a copy of this message | ||
saltybeagle Wed Apr 22 02:18:01 2009 UTC
Modified files:
/pear/PEAR_Frontend_Web/Frontend Web.php
Log:
Handle array data format for when no packages are installed for a channel.
http://cvs.php.net/viewvc.cgi/pear/PEAR_Frontend_Web/Frontend/Web.php?r1=1.87&r2=1.88&diff_format=u
Index: pear/PEAR_Frontend_Web/Frontend/Web.php
diff -u pear/PEAR_Frontend_Web/Frontend/Web.php:1.87 pear/PEAR_Frontend_Web/Frontend/Web.php:1.88
--- pear/PEAR_Frontend_Web/Frontend/Web.php:1.87 Wed Apr 15 04:05:42 2009
+++ pear/PEAR_Frontend_Web/Frontend/Web.php Wed Apr 22 02:18:01 2009
@@ -23,7 +23,7 @@
* @author Tias Guns <tias@ulyssis.org>
* @copyright 1997-2007 The PHP Group
* @license http://www.php.net/license/2_02.txt PHP License 2.02
- * @version CVS: $Id: Web.php,v 1.87 2009/04/15 04:05:42 saltybeagle Exp $
+ * @version CVS: $Id: Web.php,v 1.88 2009/04/22 02:18:01 saltybeagle Exp $
* @link http://pear.php.net/package/PEAR_Frontend_Web
* @since File available since Release 0.1
*/
@@ -51,7 +51,7 @@
* @author Tias Guns <tias@ulyssis.org>
* @copyright 1997-2007 The PHP Group
* @license http://www.php.net/license/2_02.txt PHP License 2.02
- * @version CVS: $Id: Web.php,v 1.87 2009/04/15 04:05:42 saltybeagle Exp $
+ * @version CVS: $Id: Web.php,v 1.88 2009/04/22 02:18:01 saltybeagle Exp $
* @link http://pear.php.net/package/PEAR_Frontend_Web
* @since File available since Release 0.1
*/
@@ -759,7 +759,11 @@
}
} else {
$tpl->setCurrentBlock('Headline');
- $tpl->setVariable('Text', $data['data']);
+ if (is_array($data['data']) && isset($data['data'][0])) {
+ $tpl->setVariable('Text', $data['data'][0][0]);
+ } else {
+ $tpl->setVariable('Text', $data['data']);
+ }
$tpl->parseCurrentBlock();
unset($data['data']); //clear
}