mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	update: route data struct & remove google analytics
This commit is contained in:
		| @@ -221,7 +221,14 @@ class ServerService | ||||
|  | ||||
|     public function getRoutes(array $routeIds) | ||||
|     { | ||||
|         return ServerRoute::select(['id', 'match', 'action', 'action_value'])->whereIn('id', $routeIds)->get(); | ||||
|         $routes = ServerRoute::select(['id', 'match', 'action', 'action_value'])->whereIn('id', $routeIds)->get(); | ||||
|         // TODO: remove on 1.8.0 | ||||
|         foreach ($routes as $k => $route) { | ||||
|             $array = json_decode($route->match, true); | ||||
|             if (is_array($array)) $routes[$k]['match'] = $array; | ||||
|         } | ||||
|         // TODO: remove on 1.8.0 | ||||
|         return $routes; | ||||
|     } | ||||
|  | ||||
|     public function getServer($serverId, $serverType) | ||||
|   | ||||
| @@ -18,9 +18,10 @@ class ThemeService | ||||
|  | ||||
|     public function init() | ||||
|     { | ||||
|         $themeConfigFile = $this->path . "{$this->theme}/config.php"; | ||||
|         if (!File::exists($themeConfigFile)) return; | ||||
|         $themeConfig = include($themeConfigFile); | ||||
|         $themeConfigFile = $this->path . "{$this->theme}/config.json"; | ||||
|         if (!File::exists($themeConfigFile)) abort(500, "{$this->theme}主题不存在"); | ||||
|         $themeConfig = json_decode(File::get($themeConfigFile), true); | ||||
|         if (!isset($themeConfig['configs']) || !is_array($themeConfig)) abort(500, "{$this->theme}主题配置文件有误"); | ||||
|         $configs = $themeConfig['configs']; | ||||
|         $data = []; | ||||
|         foreach ($configs as $config) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user