| @@ 20-29 (lines=10) @@ | ||
| 17 | ||
| 18 | public $no_install = true; |
|
| 19 | ||
| 20 | public function __construct() { |
|
| 21 | parent::__construct(); |
|
| 22 | if (count($this->db->where('name', 'banners')->get('components')->result_array()) == 0) { |
|
| 23 | $this->no_install = false; |
|
| 24 | } |
|
| 25 | $this->load->module('core'); |
|
| 26 | $this->load->model('banner_model'); |
|
| 27 | $lang = new MY_Lang(); |
|
| 28 | $lang->load('banners'); |
|
| 29 | } |
|
| 30 | ||
| 31 | public function index() { |
|
| 32 | if ($this->no_install === false) { |
|
| @@ 29-38 (lines=10) @@ | ||
| 26 | /** |
|
| 27 | * Share constructor. |
|
| 28 | */ |
|
| 29 | public function __construct() { |
|
| 30 | ||
| 31 | parent::__construct(); |
|
| 32 | $lang = new MY_Lang(); |
|
| 33 | $lang->load('share'); |
|
| 34 | $this->load->module('core'); |
|
| 35 | ||
| 36 | $this->db->select('settings'); |
|
| 37 | $this->settings = unserialize(implode(',', $this->db->get_where('components', ['name' => 'share'])->row_array())); |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * Default function to access module by URL |
|