mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-28 12:57:13 -05:00
- Corrected minimum image size value in migration script - Added save logic to save_general() in Config controller - Added logic in the index() of the Config controller to properly prep allowed_image_types data
28 lines
730 B
PHP
28 lines
730 B
PHP
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
class Migration_image_upload_defaults extends CI_Migration
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
public function up()
|
|
{
|
|
$image_values = array(
|
|
array('key' => 'image_allowed_types', 'value' => 'gif|jpg|png'),
|
|
array('key' => 'image_max_height', 'value' => '480'),
|
|
array('key' => 'image_max_size', 'value' => '128'),
|
|
array('key' => 'image_max_width', 'value' => '640'));
|
|
|
|
$this->db->insert_batch('app_config', $image_values);
|
|
}
|
|
|
|
public function down()
|
|
{
|
|
$this->db->where_in('key', array('image_allowed_types','image_max_height','image_max_size','image_max_width'));
|
|
$this->db->delete('app_config');
|
|
}
|
|
}
|
|
?>
|