WeBid Bug Tracking

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000488WeBidAuctionspublic2015-03-23 04:102015-05-24 17:19
Reporterdrosengarden 
Assigned Torenlok 
Priority@0@SeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.1.1 
Target VersionFixed in Version1.2.0 
Summary0000488: Advance Search By Category Causes Error
DescriptionSelect any category when conducting advanced search results in error message
TagsNo tags attached.
import_id504
Thread
Attached Files

- Relationships

-  Notes
(0001332)
pani100 (reporter)
2015-03-24 08:08
edited on: 2015-03-24 08:48

Yes it seems functions_banners.php has a bad query causing the rest of the script to fail.

Solution in includes/functions_banners.php replace the below


[PHP]
elseif (strstr($_SERVER['SCRIPT_FILENAME'], 'adsearch.php')) // check search terms
        {
            global $_SESSION;
            // check title search
            if (isset($_SESSION['advs']['title']) && !empty($_SESSION['advs']['title']))
            {
                $joinings .= ' LEFT JOIN ' . $DBPrefix . 'bannerskeywords k ON (k.banner = b.id)';
                $tmp = explode(' ', $_SESSION['advs']['title']);
                $extra .= build_keyword_sql($tmp);
            }
            // check category search
            if (isset($_SESSION['advs']['category']) && !empty($_SESSION['advs']['category']))
            {
                $joinings .= ' LEFT JOIN ' . $DBPrefix . 'bannerscategories c ON (c.banner = b.id)';
                $extra .= " OR c.category = " . $_SESSION['advs']['category'];
            }
            if ($extra != '')
            {
                $extra = ' AND (' . $extra . ')';
            }
        }
[/PHP]
with
[PHP]
elseif (strstr($_SERVER['SCRIPT_FILENAME'], 'adsearch.php')) // check search terms
        {
            global $_SESSION;
            // check title search
            if (isset($_SESSION['advs']['title']) && !empty($_SESSION['advs']['title']))
            {
                $joinings .= ' LEFT JOIN ' . $DBPrefix . 'bannerskeywords k ON (k.banner = b.id)';
                $tmp = explode(' ', $_SESSION['advs']['title']);
                $extra .= ' AND ' . build_keyword_sql($tmp);
            }
            // check category search
            if (isset($_SESSION['advs']['category']) && !empty($_SESSION['advs']['category']))
            {
                $joinings .= ' LEFT JOIN ' . $DBPrefix . 'bannerscategories c ON (c.banner = b.id)';
                    $extra .= " AND c.category = " . $_SESSION['advs']['category'];
            }
            
        }
[/PHP]

I am sure there is another bug present when you include some or all payment options. Can someone check to see if it is still present?
(0001334)
super_st (reporter)
2015-04-02 15:49

This change works for category search but i then think it breaks the keyword search, please confirm
(0001342)
renlok (administrator)
2015-05-24 17:19

Cannot reproduce assumed to be fixed

- Issue History
Date Modified Username Field Change
2015-04-01 13:17 renlok New Issue
2015-04-01 13:17 renlok import_id => 504
2015-04-01 13:17 renlok Date Submitted 2015-04-01 13:17 => 2015-03-23 04:10
2015-04-01 13:17 renlok Last Update 2015-04-01 13:17 => 2015-03-24 08:08
2015-04-01 13:39 renlok Note Added: 0000001
2015-04-02 15:49 super_st Note Added: 0001334
2015-05-24 17:19 renlok Note Added: 0001342
2015-05-24 17:19 renlok Status new => closed
2015-05-24 17:19 renlok Assigned To => renlok
2015-05-24 17:19 renlok Resolution open => fixed
2015-05-24 17:19 renlok Fixed in Version => 1.2.0


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker