Fixed if statement and added v2.6.2 PHP upgrade file.

pull/290/merge
Joe Prochazka 2018-03-23 13:50:51 -04:00
rodzic 58d5b62629
commit 1dfbbbb6ec
3 zmienionych plików z 72 dodań i 2 usunięć

Wyświetl plik

@ -120,6 +120,7 @@ echo -e ""
# Download the file rtl-sdr.rules from the osmocon rtl-sdr repository if it does not already exist.
if [[ ! -f "/etc/udev/rules.d/rtl-sdr.rules" ]] ; then
echo -e "\e[94m Downloading the file rtl-sdr.rules from the rtl-sdr repository...\e[97m"
echo ""
sudo wget -O /etc/udev/rules.d/rtl-sdr.rules https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules
echo -e "\e[94m Restarting udev...\e[97m"
sudo service udev restart

Wyświetl plik

@ -265,8 +265,6 @@ if [ "$RECEIVER_MTA" == "POSTFIX" ] || [ -z "$RECEIVER_MTA" ]; then
CheckPackage postfix
fi
exit 0
CheckPackage libpython2.7
# Install packages needed for advanced portal setups.

Wyświetl plik

@ -0,0 +1,71 @@
<?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.6.2
///////////////////////
// ------------------------------------------------------------------------------------------
// Updates the version setting to 2.6.2.
// Adds hideNavbarAndFooter setting used to toggle navigation and footer autohide feature.
// ------------------------------------------------------------------------------------------
$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("hideNavbarAndFooter", "FALSE");
// Update the version and patch settings..
$common->updateSetting("version", "2.6.2");
$common->updateSetting("patch", "");
// The upgrade process completed successfully.
$results['success'] = TRUE;
$results['message'] = "Upgrade to v2.6.2 successful.";
return $results;
} catch(Exception $e) {
// Something went wrong during this upgrade process.
$results['success'] = FALSE;
$results['message'] = $e->getMessage();
return $results;
}
}
?>