UPGRADE NOTE: Do not edit or add to this file if you wish to upgrade AbanteCart to newer versions in the future. If you wish to customize AbanteCart for your needs please refer to http://www.AbanteCart.com for more information. ------------------------------------------------------------------------------*/ if (! defined ( 'DIR_CORE' ) || !IS_ADMIN) { header ( 'Location: static_pages/' ); } class ModelSettingExtension extends Model { //???? i think this method not needed anymore public function getInstalled($type) { $extension_data = array(); $query = $this->db->query("SELECT * FROM " . $this->db->table("extensions") . " WHERE `type` = '" . $this->db->escape($type) . "'"); foreach ($query->rows as $result) { $extension_data[] = $result['key']; } return $extension_data; } /* * Get enabled payment extensions. Used in configuration for shipping extensions */ public function getEnabledPayments() { $extension_data = array(); $query = $this->db->query("SELECT * FROM " . $this->db->table("extensions") . " WHERE `type` = 'payment' and status = 1"); return $query->rows; } public function install($type, $key) { $this->db->query("INSERT INTO " . $this->db->table("extensions") . " SET `type` = '" . $this->db->escape($type) . "', `key` = '" . $this->db->escape($key) . "'"); } public function uninstall($type, $key) { $this->db->query("DELETE FROM " . $this->db->table("extensions") . " WHERE `type` = '" . $this->db->escape($type) . "' AND `key` = '" . $this->db->escape($key) . "'"); } } ?>