Useless return in tableBox class

mandreiana <[email protected]>
Newsgroups gmane.comp.web.oscommerce.devel
Message-ID <8abd110185e6643abce21fe915b58faf@osCommerce-Forums>
This message was sent from: Development
http://forums.oscommerce.com/viewtopic.php?p=157334#157334
----------------------------------------------------------------

The tableBox class in boxes.php had the good intention to return HTML sometimes instead of just printing to screen ( so it can be used in templates ). However, it tries to return it in the constructor and contructors can't return values ( this feature is never used, all tableBox calles use true for $direct_output )

I've fixed this by implementing a get_html() method which returns $this->tableBox_string

I've also made functions for other boxes ( specials ) to return HTML instead of printing to screen, as I need them in other pages ( not catalog ) of a site I design now ( with templates ). Too bad this can't get into main OSC repository ( see my next post, "Can't get involved in development" )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.