|
From: <gem...@li...> - 2012-11-01 08:55:44
|
Revision: 1002
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1002&view=rev
Author: mennodekker
Date: 2012-11-01 08:55:36 +0000 (Thu, 01 Nov 2012)
Log Message:
-----------
Made renderArray obsolete by making renderAny behave the same as renderAny (as it should)
Modified Paths:
--------------
trunk/library/classes/MUtil/Html/HtmlElement.php
trunk/library/classes/MUtil/Html/Renderer.php
Modified: trunk/library/classes/MUtil/Html/HtmlElement.php
===================================================================
--- trunk/library/classes/MUtil/Html/HtmlElement.php 2012-10-31 16:58:48 UTC (rev 1001)
+++ trunk/library/classes/MUtil/Html/HtmlElement.php 2012-11-01 08:55:36 UTC (rev 1002)
@@ -1062,13 +1062,13 @@
if ($this->_repeater->__start()) {
$html = null;
while ($this->_repeater->__next()) {
- $html .= implode('', $renderer->renderArray($view, $this->_content));
+ $html .= implode('', $renderer->renderAny($view, $this->_content));
}
return $html;
}
- } elseif ($content = $renderer->renderArray($view, $this->_content)) {
+ } elseif ($content = $renderer->renderAny($view, $this->_content)) {
return implode('', $content);
}
}
Modified: trunk/library/classes/MUtil/Html/Renderer.php
===================================================================
--- trunk/library/classes/MUtil/Html/Renderer.php 2012-10-31 16:58:48 UTC (rev 1001)
+++ trunk/library/classes/MUtil/Html/Renderer.php 2012-11-01 08:55:36 UTC (rev 1002)
@@ -1,34 +1,34 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
+
/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
* @author Matijs de Jong
* @since 1.0
* @version 1.1
@@ -118,11 +118,7 @@
}
}
- if (count($new_content)) {
- $new_content = implode('', $new_content);
- } else {
- return null;
- }
+ return $new_content;
} else {
if (is_object($content)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|