Add a config item for knowing if v2 migration took place
这个提交包含在:
		
							父节点
							
								
									08d6294e34
								
							
						
					
					
						当前提交
						22f421e9eb
					
				
					共有  4 个文件被更改,包括 59 次插入 和 21 次删除
				
			
		|  | @ -21,7 +21,7 @@ $config['migration_enabled'] = TRUE; | ||||||
| | be upgraded / downgraded to. | | be upgraded / downgraded to. | ||||||
| | | | | ||||||
| */ | */ | ||||||
| $config['migration_version'] = 101; | $config['migration_version'] = 102; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
| |-------------------------------------------------------------------------- | |-------------------------------------------------------------------------- | ||||||
|  |  | ||||||
|  | @ -11,6 +11,8 @@ class Welcome extends CI_Controller { | ||||||
| 
 | 
 | ||||||
| 	public function index() | 	public function index() | ||||||
| 	{ | 	{ | ||||||
|  | 
 | ||||||
|  |         if($this->config->item('option_version2_trigger') == "false") { | ||||||
|             $data['page_title'] = "Welcome to Cloudlog Version 2.0"; |             $data['page_title'] = "Welcome to Cloudlog Version 2.0"; | ||||||
| 
 | 
 | ||||||
|             // load stations model 
 |             // load stations model 
 | ||||||
|  | @ -33,6 +35,9 @@ class Welcome extends CI_Controller { | ||||||
|             $this->load->view('interface_assets/mini_header', $data); |             $this->load->view('interface_assets/mini_header', $data); | ||||||
|             $this->load->view('welcome/index'); |             $this->load->view('welcome/index'); | ||||||
|             $this->load->view('interface_assets/footer'); |             $this->load->view('interface_assets/footer'); | ||||||
|  |         } else { | ||||||
|  |             redirect('login'); | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     public function locationsclaim() { |     public function locationsclaim() { | ||||||
|  |  | ||||||
|  | @ -0,0 +1,25 @@ | ||||||
|  | <?php | ||||||
|  | 
 | ||||||
|  | defined('BASEPATH') OR exit('No direct script access allowed'); | ||||||
|  | 
 | ||||||
|  | /* | ||||||
|  | *   This migration creates a table called options which will hold global options needed within cloudlog | ||||||
|  | *   removing the need for lots of configuration files. | ||||||
|  | */ | ||||||
|  | 
 | ||||||
|  | class Migration_add_version_two_trigger_to_options extends CI_Migration { | ||||||
|  | 
 | ||||||
|  |     public function up() | ||||||
|  |     { | ||||||
|  |         $data = array( | ||||||
|  |             array('option_name' => "version2_trigger", 'option_value' => "false", 'autoload' => "yes"), | ||||||
|  |          ); | ||||||
|  | 
 | ||||||
|  |          $this->db->insert_batch('options', $data); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public function down() | ||||||
|  |     { | ||||||
|  |         // No option to down
 | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -1,3 +1,6 @@ | ||||||
|  | <?php | ||||||
|  | echo $this->config->item('option_version2_trigger'); | ||||||
|  | ?>
 | ||||||
| <div class="container"> | <div class="container"> | ||||||
| 
 | 
 | ||||||
|     <br> |     <br> | ||||||
|  | @ -149,4 +152,9 @@ | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <br> |     <br> | ||||||
|  | 
 | ||||||
|  |     <button  class="btn btn-primary" onClick="window.location.reload();">Check if Migration Complete</button> | ||||||
|  | 
 | ||||||
|  |     <br><br> | ||||||
|  | 
 | ||||||
| </div> | </div> | ||||||
		正在加载…
	
		在新工单中引用