kopia lustrzana https://github.com/jprochazka/adsb-receiver
Admins can now specify historical plot map center.
rodzic
5fb758c692
commit
53c3cca439
|
@ -517,6 +517,12 @@ if [ "${DATABASEENGINE}" = "MySQL" ]; then
|
|||
export ADSB_DATABASENAME=${DATABASENAME}
|
||||
elif [ "${DATABASEENGINE}" = "SQLite" ]; then
|
||||
if [ -z "${DATABASENAME}" ] ; then
|
||||
if [ ! -f ${LIGHTTPD_DOCUMENT_ROOT}/data/portal.sqlite ]; then
|
||||
echo -e "\e[94m Creating an empty SQLite database file...\e[97m"
|
||||
sudo touch ${LIGHTTPD_DOCUMENT_ROOT}/data/portal.sqlite
|
||||
echo -e "\e[94m Setting write permissions on the empty SQLite database file...\e[97m"
|
||||
sudo chmod 666 ${LIGHTTPD_DOCUMENT_ROOT}/data/portal.sqlite
|
||||
fi
|
||||
DATABASENAME="${LIGHTTPD_DOCUMENT_ROOT}/data/portal.sqlite"
|
||||
fi
|
||||
export ADSB_DATABASEENGINE=${DATABASEENGINE}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
// Check if the portal is installed or needs upgraded.
|
||||
|
||||
$thisVersion = "2.6.3";
|
||||
$thisVersion = "2.7.0";
|
||||
|
||||
if (!file_exists($_SERVER['DOCUMENT_ROOT']."/classes/settings.class.php")) {
|
||||
header ("Location: /install/install.php");
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// The most current stable release.
|
||||
$thisVersion = "2.6.3";
|
||||
$thisVersion = "2.7.0";
|
||||
|
||||
// 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")) {
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Updates the version setting to 2.6.3.
|
||||
// Added setting to toggle navbar and footer hiding.
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
$results = upgrade();
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
// ADS-B RECEIVER PORTAL //
|
||||
// =============================================================================== //
|
||||
// Copyright and Licensing Information: //
|
||||
// //
|
||||
// The MIT License (MIT) //
|
||||
// //
|
||||
// Copyright (c) 2015-2017 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.0
|
||||
///////////////////////
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Updates the version setting to 2.7.0.
|
||||
// Added options to set the default latitude and longitude for the advanced features map.
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
$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("advancedMapCenterLatitude", "41.3683798");
|
||||
$common->addSetting("advancedMapCenterLongitude", "-82.1076486");
|
||||
|
||||
// Update the version and patch settings..
|
||||
$common->updateSetting("version", "2.7.0");
|
||||
$common->updateSetting("patch", "");
|
||||
|
||||
// The upgrade process completed successfully.
|
||||
$results['success'] = TRUE;
|
||||
$results['message'] = "Upgrade to v2.7.0 successful.";
|
||||
return $results;
|
||||
|
||||
} catch(Exception $e) {
|
||||
// Something went wrong during this upgrade process.
|
||||
$results['success'] = FALSE;
|
||||
$results['message'] = $e->getMessage();
|
||||
return $results;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
$common = new common();
|
||||
|
||||
// The most current stable release.
|
||||
$thisVersion = "2.6.2";
|
||||
$thisVersion = "2.7.0";
|
||||
|
||||
// Begin the upgrade process if this release is newer than what is installed.
|
||||
if ($common->getSetting("version") == $thisVersion) {
|
||||
|
@ -150,6 +150,15 @@
|
|||
$version = "2.6.3";
|
||||
}
|
||||
|
||||
// UPGRADE TO V2.7.0
|
||||
if ($common->getSetting("version") == "2.6.3" && $success) {
|
||||
$json = file_get_contents("http://localhost/install/upgrade-v2.7.0.php");
|
||||
$results = json_decode($json, TRUE);
|
||||
$success = $results['success'];
|
||||
$message = $results['message'];
|
||||
$version = "2.7.0";
|
||||
}
|
||||
|
||||
require_once($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."admin".DIRECTORY_SEPARATOR."includes".DIRECTORY_SEPARATOR."header.inc.php");
|
||||
|
||||
// Display the instalation wizard.
|
||||
|
|
|
@ -164,7 +164,7 @@
|
|||
function initMap() {
|
||||
var map = new google.maps.Map(document.getElementById('map'), {
|
||||
zoom: 7,
|
||||
center: {lat: 41.379857, lng: -82.082877},
|
||||
center: {lat: {setting:advancedMapCenterLatitude}, lng: {setting:advancedMapCenterLongitude}},
|
||||
mapTypeId: google.maps.MapTypeId.TERRAIN
|
||||
});
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue