Lack of interest Allow uppercase syntax in orderDirection.

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

emu87

Member
Maybe this is my fault. But i think it other developer just make the same mistake.

XenForo/Model/Thread.php line 109

please change to:

if (!isset($fetchOptions['orderDirection']) || $fetchOptions['orderDirection'] == 'desc')

to

if (!isset($fetchOptions['orderDirection']) || strtolower($fetchOptions['orderDirection']) == 'desc')

Maybe there are more positions in different models.

I just want to start a discussion and hope to make it easier for developer to use models in their addons.

Thanks,

Daniel
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Moved to suggestions. You'll find that we either use under_score or camelCase names for values like this. Either way "desc" would come out to be the standard value.
 
Top Bottom