#967 Article selection defunc - SQL logic error in tikilib.php

v1.7.3
closed-fixed
5
2003-11-04
2003-10-23
No

In the lib/tikilib.php, there is a small flaw which e.g.
prevents selection of articles by topic:

tiki-view_article.php?topic=1

spits out the full list of articles instead of articles
belonging to topic group 1 only (under certain
circumstances).

diff tikilib.php.1.7.3orig tikilib.php_patched

1749c1749
< $mid .= "(publishDate<=$date and type<>'Event')
or (publishDate>=$date and type='Event')";
---
> $mid .= "((publishDate<=$date and type<>'Event')
or (publishDate>=$date and type='Event'))";

Note the parentheses to prevent the Event-clause from
being absorbed by further "and"s in the SQL query.

Discussion

  • Philippe Cloutier

    Logged In: YES
    user_id=738765

    Hi, could you either commit this or either open a patch
    tracker? It would speed up the fixing process.

    Thank you

     
  • Joerg Seyfried

    Joerg Seyfried - 2003-10-24

    Logged In: YES
    user_id=892997

    Hi, I've just opened a patch tracker (#829431):

    https://sourceforge.net/tracker/index.php?
    func=detail&aid=829431&group_id=64258&atid=506848

    and added a unified diff. Hope that helps (admittedly, I was
    too lazy to commit it -- sorry)!

     
  • Dennis Heltzel

    Dennis Heltzel - 2003-11-04

    Logged In: YES
    user_id=714633

    This is fixed (actually re-written) in 1.8. If you want to
    help test via the RC releases or CVS that would be very helpful.

     
  • Dennis Heltzel

    Dennis Heltzel - 2003-11-04
    • assigned_to: nobody --> dheltzel
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks