1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Allow uppercase syntax in orderDirection.

Discussion in 'Closed Suggestions' started by emu87, Jan 25, 2012.

  1. emu87

    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')


    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.


  2. Mike

    Mike XenForo Developer Staff Member

    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.

Share This Page