kopia lustrzana https://github.com/jprochazka/adsb-receiver
				
				
				
			Add setting and set to v2.7.1.
							rodzic
							
								
									5ac8dc11c9
								
							
						
					
					
						commit
						b97bf0a54d
					
				|  | @ -2,7 +2,11 @@ | ||||||
| 
 | 
 | ||||||
| The following is a history of the changes made to this project. | The following is a history of the changes made to this project. | ||||||
| 
 | 
 | ||||||
| ## v2.7.0 *(pre-release)* | ## v2.7.1 *(pre-release)* | ||||||
|  | 
 | ||||||
|  | * Added missing purgeAircraft setting to the database. *(advanced)* | ||||||
|  | 
 | ||||||
|  | ## v2.7.0 *(not released)* | ||||||
| 
 | 
 | ||||||
| * Added option to install dump1090-hptoa. | * Added option to install dump1090-hptoa. | ||||||
| * Added ADSBHub support. | * Added ADSBHub support. | ||||||
|  |  | ||||||
|  | @ -7,7 +7,7 @@ | ||||||
|     //                                                                                 //
 |     //                                                                                 //
 | ||||||
|     // The MIT License (MIT)                                                           //
 |     // The MIT License (MIT)                                                           //
 | ||||||
|     //                                                                                 //
 |     //                                                                                 //
 | ||||||
|     // Copyright (c) 2015-2016 Joseph A. Prochazka                                     //
 |     // Copyright (c) 2015-2019 Joseph A. Prochazka                                     //
 | ||||||
|     //                                                                                 //
 |     //                                                                                 //
 | ||||||
|     // Permission is hereby granted, free of charge, to any person obtaining a copy    //
 |     // Permission is hereby granted, free of charge, to any person obtaining a copy    //
 | ||||||
|     // of this software and associated documentation files (the "Software"), to deal   //
 |     // of this software and associated documentation files (the "Software"), to deal   //
 | ||||||
|  | @ -37,7 +37,7 @@ | ||||||
| 
 | 
 | ||||||
|             // Check if the portal is installed or needs upgraded.
 |             // Check if the portal is installed or needs upgraded.
 | ||||||
| 
 | 
 | ||||||
|             $thisVersion = "2.7.0"; |             $thisVersion = "2.7.1"; | ||||||
| 
 | 
 | ||||||
|             if (!file_exists($_SERVER['DOCUMENT_ROOT']."/classes/settings.class.php")) { |             if (!file_exists($_SERVER['DOCUMENT_ROOT']."/classes/settings.class.php")) { | ||||||
|                 header ("Location: /install/install.php"); |                 header ("Location: /install/install.php"); | ||||||
|  |  | ||||||
|  | @ -7,7 +7,7 @@ | ||||||
|     //                                                                                 //
 |     //                                                                                 //
 | ||||||
|     // The MIT License (MIT)                                                           //
 |     // The MIT License (MIT)                                                           //
 | ||||||
|     //                                                                                 //
 |     //                                                                                 //
 | ||||||
|     // Copyright (c) 2015-2016 Joseph A. Prochazka                                     //
 |     // Copyright (c) 2015-2019 Joseph A. Prochazka                                     //
 | ||||||
|     //                                                                                 //
 |     //                                                                                 //
 | ||||||
|     // Permission is hereby granted, free of charge, to any person obtaining a copy    //
 |     // Permission is hereby granted, free of charge, to any person obtaining a copy    //
 | ||||||
|     // of this software and associated documentation files (the "Software"), to deal   //
 |     // of this software and associated documentation files (the "Software"), to deal   //
 | ||||||
|  | @ -29,7 +29,7 @@ | ||||||
|     /////////////////////////////////////////////////////////////////////////////////////
 |     /////////////////////////////////////////////////////////////////////////////////////
 | ||||||
| 
 | 
 | ||||||
|     // The most current stable release.
 |     // The most current stable release.
 | ||||||
|     $thisVersion = "2.7.0"; |     $thisVersion = "2.7.1"; | ||||||
| 
 | 
 | ||||||
|     // Begin the upgrade process if this release is newer than what is installed.
 |     // Begin the upgrade process if this release is newer than what is installed.
 | ||||||
|     if (file_exists($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR."settings.class.php")) { |     if (file_exists($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR."settings.class.php")) { | ||||||
|  | @ -428,7 +428,8 @@ EOF; | ||||||
|             $common->addSetting('timeZone', $_POST['timeZone']); |             $common->addSetting('timeZone', $_POST['timeZone']); | ||||||
|             $common->addSetting('enableWebNotifications', FALSE); |             $common->addSetting('enableWebNotifications', FALSE); | ||||||
|             $common->addSetting('googleMapsApiKey', ''); |             $common->addSetting('googleMapsApiKey', ''); | ||||||
|             $common->addSetting("hideNavbarAndFooter", "FALSE"); |             $common->addSetting("hideNavbarAndFooter", FALSE); | ||||||
|  |             $common->addSetting("purgeAircraft", FALSE); | ||||||
| 
 | 
 | ||||||
|             if ($_POST['driver'] == "xml") |             if ($_POST['driver'] == "xml") | ||||||
|                 $common->addSetting('enableFlights', FALSE); |                 $common->addSetting('enableFlights', FALSE); | ||||||
|  |  | ||||||
|  | @ -0,0 +1,71 @@ | ||||||
|  | <?php | ||||||
|  | 
 | ||||||
|  |     /////////////////////////////////////////////////////////////////////////////////////
 | ||||||
|  |     //                            ADS-B RECEIVER PORTAL                                //
 | ||||||
|  |     // =============================================================================== //
 | ||||||
|  |     // Copyright and Licensing Information:                                            //
 | ||||||
|  |     //                                                                                 //
 | ||||||
|  |     // The MIT License (MIT)                                                           //
 | ||||||
|  |     //                                                                                 //
 | ||||||
|  |     // Copyright (c) 2015-2019 Joseph A. Prochazka                                     //
 | ||||||
|  |     //                                                                                 //
 | ||||||
|  |     // Permission is hereby granted, free of charge, to any person obtaining a copy    //
 | ||||||
|  |     // of this software and associated documentation files (the "Software"), to deal   //
 | ||||||
|  |     // in the Software without restriction, including without limitation the rights    //
 | ||||||
|  |     // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell       //
 | ||||||
|  |     // copies of the Software, and to permit persons to whom the Software is           //
 | ||||||
|  |     // furnished to do so, subject to the following conditions:                        //
 | ||||||
|  |     //                                                                                 //
 | ||||||
|  |     // The above copyright notice and this permission notice shall be included in all  //
 | ||||||
|  |     // copies or substantial portions of the Software.                                 //
 | ||||||
|  |     //                                                                                 //
 | ||||||
|  |     // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR      //
 | ||||||
|  |     // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,        //
 | ||||||
|  |     // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE     //
 | ||||||
|  |     // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER          //
 | ||||||
|  |     // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,   //
 | ||||||
|  |     // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE   //
 | ||||||
|  |     // SOFTWARE.                                                                       //
 | ||||||
|  |     /////////////////////////////////////////////////////////////////////////////////////
 | ||||||
|  | 
 | ||||||
|  |     ///////////////////////
 | ||||||
|  |     // UPGRADE TO V2.7.1
 | ||||||
|  |     ///////////////////////
 | ||||||
|  | 
 | ||||||
|  |     // --------------------------------------------------------
 | ||||||
|  |     // Updates the version setting to 2.7.1.
 | ||||||
|  |     // Add missing purgeAircraft setting to the settings table.
 | ||||||
|  |     // --------------------------------------------------------
 | ||||||
|  | 
 | ||||||
|  |     $results = upgrade(); | ||||||
|  |     exit(json_encode($results)); | ||||||
|  | 
 | ||||||
|  |     function upgrade() { | ||||||
|  |         require_once($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR."common.class.php"); | ||||||
|  |         require_once($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR."settings.class.php"); | ||||||
|  | 
 | ||||||
|  |         $common = new common(); | ||||||
|  |         $settings = new settings(); | ||||||
|  | 
 | ||||||
|  |         try { | ||||||
|  |             // Add portal navigation and footer autohide option.
 | ||||||
|  |             $common->addSetting("purgeAircraft", "FALSE"); | ||||||
|  | 
 | ||||||
|  |             // Update the version and patch settings..
 | ||||||
|  |             $common->updateSetting("version", "2.7.1"); | ||||||
|  |             $common->updateSetting("patch", ""); | ||||||
|  | 
 | ||||||
|  |             // The upgrade process completed successfully.
 | ||||||
|  |             $results['success'] = TRUE; | ||||||
|  |             $results['message'] = "Upgrade to v2.7.1 successful."; | ||||||
|  |             return $results; | ||||||
|  | 
 | ||||||
|  |         } catch(Exception $e) { | ||||||
|  |             // Something went wrong during this upgrade process.
 | ||||||
|  |             $results['success'] = FALSE; | ||||||
|  |             $results['message'] = $e->getMessage(); | ||||||
|  |             return $results; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | ?>
 | ||||||
|  | 
 | ||||||
|  | @ -7,7 +7,7 @@ | ||||||
|     //                                                                                 //
 |     //                                                                                 //
 | ||||||
|     // The MIT License (MIT)                                                           //
 |     // The MIT License (MIT)                                                           //
 | ||||||
|     //                                                                                 //
 |     //                                                                                 //
 | ||||||
|     // Copyright (c) 2015-2016 Joseph A. Prochazka                                     //
 |     // Copyright (c) 2015-2019 Joseph A. Prochazka                                     //
 | ||||||
|     //                                                                                 //
 |     //                                                                                 //
 | ||||||
|     // Permission is hereby granted, free of charge, to any person obtaining a copy    //
 |     // Permission is hereby granted, free of charge, to any person obtaining a copy    //
 | ||||||
|     // of this software and associated documentation files (the "Software"), to deal   //
 |     // of this software and associated documentation files (the "Software"), to deal   //
 | ||||||
|  | @ -33,7 +33,7 @@ | ||||||
|     $common = new common(); |     $common = new common(); | ||||||
| 
 | 
 | ||||||
|     // The most current stable release.
 |     // The most current stable release.
 | ||||||
|     $thisVersion = "2.7.0"; |     $thisVersion = "2.7.1"; | ||||||
| 
 | 
 | ||||||
|     // Begin the upgrade process if this release is newer than what is installed.
 |     // Begin the upgrade process if this release is newer than what is installed.
 | ||||||
|     if ($common->getSetting("version") == $thisVersion) { |     if ($common->getSetting("version") == $thisVersion) { | ||||||
|  | @ -159,6 +159,15 @@ | ||||||
|         $version = "2.7.0"; |         $version = "2.7.0"; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     // UPGRADE TO V2.7.1
 | ||||||
|  |     if ($common->getSetting("version") == "2.7.0" && $success) { | ||||||
|  |         $json = file_get_contents("http://localhost/install/upgrade-v2.7.1.php"); | ||||||
|  |         $results = json_decode($json, TRUE); | ||||||
|  |         $success = $results['success']; | ||||||
|  |         $message = $results['message']; | ||||||
|  |         $version = "2.7.1"; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     require_once($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."admin".DIRECTORY_SEPARATOR."includes".DIRECTORY_SEPARATOR."header.inc.php"); |     require_once($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."admin".DIRECTORY_SEPARATOR."includes".DIRECTORY_SEPARATOR."header.inc.php"); | ||||||
| 
 | 
 | ||||||
|     // Display the instalation wizard.
 |     // Display the instalation wizard.
 | ||||||
|  |  | ||||||
		Ładowanie…
	
		Reference in New Issue
	
	 Joe Prochazka
						Joe Prochazka