diff --git a/README.md b/README.md index 8a458d4..ed3ace5 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,7 @@ password: Ss123456 Please note that changes are reverted every hour. ### I noticed there is a new release. How do I update? -Updating server status is fairly straightforward. Download your config.php from the server. Delete all files. Upload the new release with config.php you downloaded earlier. You need to manually run install scripts. For that head to your domain and run create-server-config.php deleting it afterwards. -If you don't want to allow php to access your files or you have permission issues, use the following instructions. +In the admin panel, check for updates. If a version is available you can click to update. #### Updating server config Follow the instructions for installation without giving the app write access. Keep in mind that you will need to re-apply any modifications you made. diff --git a/SkyfallenCodeLib/UpdatesConsoleConnector.php b/SkyfallenCodeLib/UpdatesConsoleConnector.php new file mode 100644 index 0000000..10cb23a --- /dev/null +++ b/SkyfallenCodeLib/UpdatesConsoleConnector.php @@ -0,0 +1,53 @@ +open($file); + if ($res === TRUE) { + $zip->extractTo($rootpath); + $zip->close(); + return true; + } else { + return false; + } + } + public static function getProviderData($providerurl){ + $vajson = file_get_contents($providerurl."/provider/"); + $prv_array = json_decode($vajson,true); + return $prv_array; + } +} diff --git a/config.php.template b/config.php.template index f0ec1b9..de4139b 100644 --- a/config.php.template +++ b/config.php.template @@ -68,3 +68,12 @@ if ($mysqli->connect_errno) { } $mysqli->set_charset("utf8"); + +include "SkyfallenCodeLib/UpdatesConsoleConnector.php"; + +define("UPDATES_PROVIDER_URL","https://swupdate.theskyfallen.com"); +define("UPDATES_PROVIDER_APP_ID","6d84a0d1b6cc05e071c0199a8d8894c4"); +define("UPDATE_SEED","STABLE"); + +include_once "updater.php"; +include "thisversion.php"; diff --git a/onupdate.php b/onupdate.php new file mode 100644 index 0000000..1b39836 --- /dev/null +++ b/onupdate.php @@ -0,0 +1,2 @@ +