Skip to content
Snippets Groups Projects
Commit 80159eb9 authored by Bob Mottram's avatar Bob Mottram
Browse files

Installing apps without domains

parent a0b64062
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,7 @@
<input type="hidden" name="app_name" value="APPNAME">
<input type="hidden" name="install_domain" value="APPDOMAIN">
<input type="hidden" name="freedns_code" value="APPCODE">
<input type="hidden" name="no_domain" value="NODOMAIN">
</p>
<br><br>
<input type="submit" name="installconfirmsubmit" value="Continue" />
......
......@@ -11,6 +11,7 @@ if (isset($_POST['submitappinstall'])) {
$app_name = htmlspecialchars($_POST['app_name']);
$install_domain = '';
$freedns_code = '';
$no_domain='0';
// Note that this value can be changed by install_web_admin
$onion_only=false;
......@@ -36,6 +37,7 @@ if (isset($_POST['submitappinstall'])) {
exec('sed -i "s|APPNAME|'.$app_name.'|g" add_app_confirm.html');
exec('sed -i "s|APPDOMAIN|'.$install_domain.'|g" add_app_confirm.html');
exec('sed -i "s|APPCODE|'.$freedns_code.'|g" add_app_confirm.html');
exec('sed -i "s|NODOMAIN|'.$no_domain.'|g" add_app_confirm.html');
$output_filename = "add_app_confirm.html";
}
}
......
......@@ -24,12 +24,15 @@ if (isset($_POST['installconfirmsubmit'])) {
$continue_install=true;
if(! $onion_only) {
$install_domain = htmlspecialchars($_POST['install_domain']);
if (strpos($install_domain, '.') === false) {
// No domain was provided
$continue_install=false;
$no_domain = htmlspecialchars($_POST['no_domain']);
if ($no_domain === '0') {
$install_domain = htmlspecialchars($_POST['install_domain']);
if (strpos($install_domain, '.') === false) {
// No domain was provided
$continue_install=false;
}
$freedns_code = htmlspecialchars($_POST['freedns_code']);
}
$freedns_code = htmlspecialchars($_POST['freedns_code']);
}
if($continue_install) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment