osclass / Osclass

With Osclass, get your own classifieds site for free. Build your own Osclass installation and start advertising real estate, jobs or whatever you want- in minutes!
http://osclass.org/
648 stars 343 forks source link

Category.php bugs #2255

Closed wahidmounir closed 6 years ago

wahidmounir commented 6 years ago

in public function listWhere() line 92

$this->dao->select( sprintf("a.*, b.*, c.i_num_items, FIELD(fk_c_locale_code, '%s') as locale_order", $this->dao->connId->real_escape_string($this->_language) ) );

_language variable is an array which generate a bug in the SQL query and the correct value to pass is _language[pk_c_coe] the query becomes $this->dao->select( sprintf("a.*, b.*, c.i_num_items, FIELD(fk_c_locale_code, '%s') as locale_order", $this->dao->connId->real_escape_string($this->_language[pk_c_code]) ) );

same thing for function

listEnabled() in line 127 in category.php

Asifcu commented 6 years ago

My site name is www.sellbaazar.com How to show only ad title without showing details and photo?

garciademarina commented 6 years ago

from the constructor of Category model class:

...
            if($l == '') {
                $l = osc_current_user_locale();
            }

            $this->_language   = $l;
...

osc_current_user_locale() should return always a string.

Can you give me more information about how to reproduce your issue ?

Regards