FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Caterogies may be hidden
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Caterogies may be hidden [message #165476 is a reply to message #165242] Sun, 26 June 2011 06:25 Go to previous messageGo to previous message
Atomicrun is currently offline  Atomicrun   Sweden
Messages: 54
Registered: November 2010
Location: Lund
Karma:
Member
Den Mon, 16 May 2011 08:12 skrev syl20a:
Hello,

include/cat.inc use an array with a numeric key to sort categories and forums in cache

the numeric key is computed like this :
$c += pow(10, 2 + $ml - $lvl[0]]) * $v[4];


!?!?!
What is this about !?
Could it be that the text of a category shall be converted into a numeric for identification purposes?

Or do you want to make the numerics correlate, so if you show in numerical $c order, the forum come up in a logical order?
Please kindly, kill the POW before you figure out what it do!

number pow( number $base, number $exp)
Returns base raised to the power of exp.

NEVER NEVER enter into the floating point unless you do science calculations or similar work. Always set the BUG flag to all such code. I once removed the floating points from a point-of-sales terminal.

Floating point have (... they are called the Ureal Numbers!) have the nasty habit of working only somtimes or mostly.

I am willing to help to change this into something else.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error During Consistency Checking
Next Topic: Permissions to Edit Messages on 3.0.2
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 07:34:55 GMT 2024

Total time taken to generate the page: 0.04024 seconds