mirror of
https://github.com/retailcrm/opencart-module.git
synced 2024-11-21 20:56:07 +03:00
Added query escaping in method for getting zone
This commit is contained in:
commit
a375804086
@ -1,3 +1,6 @@
|
|||||||
|
## v4.1.12
|
||||||
|
* Added escaping for db query in method for getting zone
|
||||||
|
|
||||||
## v4.1.11
|
## v4.1.11
|
||||||
* Fixed the transfer of the weight offers
|
* Fixed the transfer of the weight offers
|
||||||
|
|
||||||
|
@ -124,6 +124,7 @@ class DataRepository extends \retailcrm\Base {
|
|||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getZoneByName($name) {
|
public function getZoneByName($name) {
|
||||||
|
$name = $this->db->escape($name);
|
||||||
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "zone` WHERE name = '" . $name . "'");
|
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "zone` WHERE name = '" . $name . "'");
|
||||||
|
|
||||||
return $query->row;
|
return $query->row;
|
||||||
|
@ -19,6 +19,8 @@ class DataRepositoryAdminTest extends TestCase {
|
|||||||
|
|
||||||
$this->assertNotEmpty($zone);
|
$this->assertNotEmpty($zone);
|
||||||
$this->assertNotEmpty($zone['zone_id']);
|
$this->assertNotEmpty($zone['zone_id']);
|
||||||
|
|
||||||
|
$repository->getZoneByName('Rostov-na-Do\'nu');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetCurrencyByCode() {
|
public function testGetCurrencyByCode() {
|
||||||
|
Loading…
Reference in New Issue
Block a user