Skip to content

Commit

Permalink
Sticker fix
Browse files Browse the repository at this point in the history
Удалено кеширование запросов получения списка стикеров
  • Loading branch information
ocshop committed Jan 4, 2015
1 parent f38cb1a commit 7f90ef8
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions upload/admin/model/design/sticker.php
Expand Up @@ -68,29 +68,13 @@ public function getStickers($data = array()) {
}

public function getStickersProduct($data = array()) {
if ($data) {
$sql = "SELECT * FROM " . DB_PREFIX . "sticker";

$sort_data = array(
'name',
);

$sql = "SELECT * FROM " . DB_PREFIX . "sticker";

$query = $this->db->query($sql);

return $query->rows;
} else {
$sticker_data = $this->cache->get('sticker');

if (!$sticker_data) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "sticker ORDER BY name");
$query = $this->db->query($sql);

$sticker_data = $query->rows;
return $query->rows;

$this->cache->set('sticker', $sticker_data);
}

return $sticker_data;
}
}

public function getProductSticker($product_id) {
Expand Down

0 comments on commit 7f90ef8

Please sign in to comment.