Commit db18d2fd authored by David Morley's avatar David Morley

bad merge

parent a854fe83
Pipeline #530 passed with stage
in 2 minutes and 33 seconds
......@@ -10,22 +10,7 @@ use RedBeanPHP\R;
require_once __DIR__ . '/../boot.php';
<<<<<<< HEAD
define('PODUPTIME', microtime(true));
// Set up global DB connection.
R::setup("pgsql:host={$pghost};dbname={$pgdb}", $pguser, $pgpass, true);
R::testConnection() || die('Error in DB connection');
R::usePartialBeans(true);
if (!($_domain = $_GET['domain'] ?? null)) {
die('no pod domain given');
}
=======
($_domain = $_GET['domain'] ?? null) || die('no pod domain given');
>>>>>>> develop
// Other parameters.
$_email = $_GET['email'] ?? '';
......@@ -74,25 +59,6 @@ foreach ($pods as $pod) {
}
echo <<<EOF
<<<<<<< HEAD
<script>
window.onload = function() {
$("#weight").ionRangeSlider();
}
</script>
<form action="/">
<input type="hidden" name="edit">
<input type="hidden" name="domain" value="{$_domain}">
<input type="hidden" name="token" value="{$uuid}">
<label>Email <input type="text" size="20" name="email"></label><br>
<label>Podmin Statement (You can include links to your terms and policies and information about your pod you wish to share with users.) <br><textarea cols="100" rows="7" name="podmin_statement"></textarea></label><br>
<label>Weight <input type="text" data-min="0" data-step="1" data-max="10" name="weight" id="weight"> This lets you weight your pod lower on the list if you have too much traffic coming in, 10 is the norm use lower to move down the list.</label><br>
<input type="submit" name="action" value="save">
</form>
EOF;
$stop = 1;
=======
<script>
window.onload = function() {
$("#weight").ionRangeSlider();
......@@ -112,15 +78,10 @@ EOF;
EOF;
$stop = true;
>>>>>>> develop
}
}
if (!$stop) {
<<<<<<< HEAD
=======
>>>>>>> develop
$link = 'https://' . $_domain . '/nodeinfo/1.0';
if ($infos = file_get_contents('https://' . $_domain . '/.well-known/nodeinfo')) {
$info = json_decode($infos, true);
......@@ -141,27 +102,6 @@ if (!$stop) {
echo 'Your pod has ssl and is valid<br>';
$publickey = md5(uniqid($_domain, true));
<<<<<<< HEAD
try {
$p = R::dispense('pods');
$p['domain'] = $_domain;
$p['email'] = $_email;
$p['podmin_statement'] = $_podmin_statement;
$p['podmin_notify'] = $_podmin_notify;
$p['publickey'] = $publickey;
R::store($p);
} catch (\RedBeanPHP\RedException $e) {
die('Error in SQL query: ' . $e->getMessage());
}
if ($_email) {
$to = $adminemail;
$subject = 'New pod added to ' . $_SERVER['HTTP_HOST'];
$headers = ['From: ' . $_email, 'Reply-To: ' . $_email, 'Cc: ' . $_email];
=======
try {
$p = R::dispense('pods');
......@@ -182,7 +122,6 @@ if (!$stop) {
$subject = 'New pod added to ' . $_SERVER['HTTP_HOST'];
$headers = ['From: ' . $_email, 'Reply-To: ' . $_email, 'Cc: ' . $_email];
>>>>>>> develop
$message_lines = [
'https://' . $_SERVER['HTTP_HOST'],
'Your pod ' . $_domain . ' will not show up right away, as it needs to pass a few checks first.',
......@@ -197,8 +136,4 @@ if (!$stop) {
} else {
echo 'Could not validate your pod, check your setup!<br>Take a look at <a href="' . $link . '">your /nodeinfo</a>';
}
<<<<<<< HEAD
}
=======
}
>>>>>>> develop
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment