1
moflus
XoopsTree with only one query
  • 2006/1/28 19:21

  • moflus

  • Just popping in

  • Posts: 24

  • Since: 2004/12/25


The using of the XoopsTree class generates a lot of queries to the database.
Most modules are using it directly or by XoopsTopic
I have re-writen it to make only one query when it's intanciated.
I've preserved all the methods with the same return (checked)
The code is also shorter & faster than the original one.

If you want to have a look to the code:
http://www.moflus.com/modules/newbb/viewtopic.php?topic_id=15&post_id=58#forumpost58

2
Catzwolf
Re: XoopsTree with only one query
  • 2006/1/28 19:32

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


I have to say this is one of the best hacks I have seen for a long time that answers a few questions imposed on this #OOPS#ty class. Well done :)

3
phppp
Re: XoopsTree with only one query
  • 2006/1/28 19:53

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


generally, class XoopsObjectTree in tree.php is the right class to use when DB query is involved.

4
moflus
Re: XoopsTree with only one query
  • 2006/1/28 20:14

  • moflus

  • Just popping in

  • Posts: 24

  • Since: 2004/12/25


So, why XoopsTopic is using XoopsTree instead?

I didn't know that XoopsObjectTree exists.
It's not documented in the wiki. Isn't it?

Login

Who's Online

485 user(s) are online (353 user(s) are browsing Support Forums)


Members: 0


Guests: 485


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits