Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.0.0RC2

Bug #698 addStyleDeclaration() always overwrite current style.
Submitted: 2004-02-06 12:21 UTC
From: dostick at ctco dot lv Assigned: thesaur
Status: Wont fix Package: HTML_Page
PHP Version: 4.3.4 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2004-02-06 12:21 UTC] dostick at ctco dot lv
Description: ------------ addStyleDeclaration() always overwrite current style. so if you're using addStyleDeclaration() more than once in script it will use the value passed in last call. This is VERY inconvenient and annoying. Other PEAR HTML_Page methods accumulate passed data: e.g. addBodyContent() adds content to the internal buffer and of course does not override it.

Comments

 [2004-02-06 12:34 UTC] thesaur at php dot net
addScriptDeclaration() acts the same way. The side-effect of creating an array is that as it now stands, it would create a new <script> or <style> section for each addition. That's not very pretty. However, I will attempt to group by type and then implode the content before wrapping it with the html elements. I will get to that hopefully this coming week.
 [2004-06-07 21:39 UTC] thesaur
This has now been fixed in HTML_Page2. The flipside is that it is now impossible to overwrite a script or stylesheet declaration. I will change this in a future release to provide a way to replace the content much like I now do with addBodyContent. I am leaving this bug open for now even though the problem you mention has been fixed. It will remind me to properly fix the problem ;-)
 [2004-07-11 22:08 UTC] gurugeek
Dear Maintainer, Your package html_page has currently 1 open bug. We urge you to take the necessary steps to solve the reported issues at your soonest convenience. If the bug issue hasn’t been addressed yet you are kindly asked to take the necessary steps to ensure a prompt resolution of the problem. If you already addressed the reported problem feel free to change the bug status as soon as possible. Regards David Costa PEAR Quality Assurance pear-qa@lists.php.net
 [2005-10-14 16:57 UTC] arnaud
This package has been superceeded by HTML_Page2, I am marking this bug as won't fix.