Merge pull request #1218 from AndreasK79/small_fixes_for_better_compability
PHP8 fix and folder not found fix
这个提交包含在:
		
						当前提交
						48a2d3fb7c
					
				
					共有  3 个文件被更改,包括 21 次插入 和 11 次删除
				
			
		|  | @ -30,10 +30,16 @@ | ||||||
| 		    <select class="custom-select" name="user_type"> | 		    <select class="custom-select" name="user_type"> | ||||||
| 			<?php | 			<?php | ||||||
| 				$levels = $this->config->item('auth_level'); | 				$levels = $this->config->item('auth_level'); | ||||||
| 				while (list($key, $val) = each($levels)) { | 				foreach ($levels as $key => $value) { | ||||||
|  | 					echo '<option value="'. $key . '"'; | ||||||
|  | 					if(isset($user_type)) {  | ||||||
|  | 						if($user_type == $key) {  | ||||||
|  | 							echo "selected=\"selected\"";  | ||||||
|  | 						}  | ||||||
|  | 					}  | ||||||
|  | 					echo '>' . $value . '</option>'; | ||||||
|  | 				}  | ||||||
| 				?>
 | 				?>
 | ||||||
| 					<option value="<?php echo $key; ?>" <?php if(isset($user_type)) { if($user_type == $key) { echo "selected=\"selected\""; } } ?>><?php echo $val; ?></option>
 |  | ||||||
| 				<?php } ?>
 |  | ||||||
| 			</select> | 			</select> | ||||||
| 		  </div> | 		  </div> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -71,10 +71,14 @@ | ||||||
| 						<select class="custom-select" name="user_type"> | 						<select class="custom-select" name="user_type"> | ||||||
| 						<?php | 						<?php | ||||||
| 							$levels = $this->config->item('auth_level'); | 							$levels = $this->config->item('auth_level'); | ||||||
| 							while (list($key, $val) = each($levels)) { | 							foreach ($levels as $key => $value) { | ||||||
|  | 								echo '<option value="'. $key . '"'; | ||||||
|  | 									if($user_type == $key) {  | ||||||
|  | 										echo "selected=\"selected\"";  | ||||||
|  | 									}  | ||||||
|  | 								echo '>' . $value . '</option>'; | ||||||
|  | 							}  | ||||||
| 							?>
 | 							?>
 | ||||||
| 							<option value="<?php echo $key; ?>" <?php if($user_type == $key) { echo "selected=\"selected\""; } ?>><?php echo $val; ?></option>
 |  | ||||||
| 							<?php } ?>
 |  | ||||||
| 						</select> | 						</select> | ||||||
| 						<?php } else { | 						<?php } else { | ||||||
| 							$l = $this->config->item('auth_level'); | 							$l = $this->config->item('auth_level'); | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ class Core { | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		if($data['directory'] != "") { | 		if($data['directory'] != "") { | ||||||
| 			if (file_exists("../".$data['directory'])) { | 			if (file_exists($_SERVER['DOCUMENT_ROOT'].$data['directory'])) { | ||||||
| 				//pass folders real
 | 				//pass folders real
 | ||||||
| 				$counter++; | 				$counter++; | ||||||
| 			} else { | 			} else { | ||||||
|  | @ -56,7 +56,7 @@ class Core { | ||||||
| 
 | 
 | ||||||
| 		// Config path
 | 		// Config path
 | ||||||
| 		$template_path 	= 'config/database.php'; | 		$template_path 	= 'config/database.php'; | ||||||
| 		$output_path 	= '../application/config/database.php'; | 		$output_path 	= $_SERVER['DOCUMENT_ROOT'].$data['directory'].'/application/config/database.php'; | ||||||
| 
 | 
 | ||||||
| 		// Open the file
 | 		// Open the file
 | ||||||
| 		$database_file = file_get_contents($template_path); | 		$database_file = file_get_contents($template_path); | ||||||
|  | @ -92,7 +92,7 @@ class Core { | ||||||
| 
 | 
 | ||||||
| 		// Config path
 | 		// Config path
 | ||||||
| 		$template_path 	= 'config/config.php'; | 		$template_path 	= 'config/config.php'; | ||||||
| 		$output_path 	= '../application/config/config.php'; | 		$output_path 	= $_SERVER['DOCUMENT_ROOT'].$data['directory'].'/application/config/config.php'; | ||||||
| 
 | 
 | ||||||
| 		// Open the file
 | 		// Open the file
 | ||||||
| 		$database_file = file_get_contents($template_path); | 		$database_file = file_get_contents($template_path); | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用