kopia lustrzana https://github.com/jprochazka/adsb-receiver
				
				
				
			SQLite upgrade fix.
							rodzic
							
								
									85fecdc76c
								
							
						
					
					
						commit
						635131b50f
					
				| 
						 | 
					@ -49,7 +49,14 @@
 | 
				
			||||||
                    $dsn = "pgsql:host=".$settings::db_host.";dbname=".$settings::db_database;
 | 
					                    $dsn = "pgsql:host=".$settings::db_host.";dbname=".$settings::db_database;
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                case 'sqlite':
 | 
					                case 'sqlite':
 | 
				
			||||||
 | 
					                    // In v2.5.0 the path to the SQLite database is no longer hard coded.
 | 
				
			||||||
 | 
					                    // So if there is a problem getting the path the the SQLite database
 | 
				
			||||||
 | 
					                    // from settings.class.php we must use the old style hard coded path.
 | 
				
			||||||
                    $dsn = "sqlite:".$settings::db_host;
 | 
					                    $dsn = "sqlite:".$settings::db_host;
 | 
				
			||||||
 | 
					                    if ($dsn == "sqlite:") {
 | 
				
			||||||
 | 
					                        // Use the legacy hard coded path for older systems being updated before v2.5.0.
 | 
				
			||||||
 | 
					                        $dsn = "sqlite:".$_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."data".DIRECTORY_SEPARATOR."portal.sqlite";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -112,7 +112,7 @@
 | 
				
			||||||
        const db_database = '';
 | 
					        const db_database = '';
 | 
				
			||||||
        const db_username = '';
 | 
					        const db_username = '';
 | 
				
			||||||
        const db_password = '';
 | 
					        const db_password = '';
 | 
				
			||||||
        const db_host = '/var/www/html/portal.sqlite';
 | 
					        const db_host = '/var/www/html/data/portal.sqlite';
 | 
				
			||||||
        const db_prefix = 'adsb_';
 | 
					        const db_prefix = 'adsb_';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Security Settings
 | 
					        // Security Settings
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Ładowanie…
	
		Reference in New Issue