Commit fa925502 authored by dmorley's avatar dmorley

few issues on dev that needed working out

parent fab455b9
......@@ -46,7 +46,7 @@ while ($row = pg_fetch_array($result)) {
<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.) <textarea cols="100" rows="7" name="podmin_statement"></textarea></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" size="2" name="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>
......
......@@ -6,9 +6,10 @@ strlen($_token) > 6 || die('bad token');
// Other parameters.
$_action = $_GET['action'] ?? '';
$_weight = $_GET['weight'] ?? '';
$_weight = $_GET['weight'] ?? 10;
$_email = $_GET['email'] ?? '';
$_podmin_statement = $_GET['podmin_statement'] ?? '';
$_podmin_notify = $_GET['podmin_notify'] ?? 0;
require_once __DIR__ . '/../config.php';
......
......@@ -18,7 +18,11 @@ ALTER TABLE pods ALTER COLUMN hidden TYPE boolean USING hidden::boolean;
ALTER TABLE pods ALTER COLUMN secure TYPE boolean USING secure::boolean;
ALTER TABLE pods ALTER COLUMN signup TYPE boolean USING signup::boolean;
ALTER TABLE pods ALTER weight SET DEFAULT 10;
ALTER TABLE pods ALTER score SET DEFAULT 50;
ALTER TABLE pods ALTER adminrating SET DEFAULT 0;
ALTER TABLE pods ALTER userrating SET DEFAULT 0;
ALTER TABLE pods ALTER weightedscore SET DEFAULT 0;
DROP TABLE users;
......
......@@ -5,10 +5,10 @@ CREATE TABLE pods (
softwarename text,
masterversion text,
shortversion text,
score int DEFAULT 10,
weightedscore numeric(5,2) DEFAULT 10,
adminrating decimal DEFAULT 10,
userrating decimal DEFAULT 10,
score int DEFAULT 50,
weightedscore numeric(5,2) DEFAULT 0,
adminrating decimal DEFAULT 0,
userrating decimal DEFAULT 0,
hidden boolean DEFAULT true,
ip text,
country text,
......@@ -42,7 +42,7 @@ CREATE TABLE pods (
sslexpire timestamp,
dnssec boolean,
comment_counts int,
weight int DEFAULT 50,
weight int DEFAULT 10,
date_updated timestamp DEFAULT current_timestamp,
date_laststats timestamp DEFAULT current_timestamp,
date_created timestamp DEFAULT current_timestamp
......
......@@ -28,7 +28,7 @@ foreach ($csv as $cords) {
$dbh = pg_connect("dbname=$pgdb user=$pguser password=$pgpass");
$dbh || die('Error in connection: ' . pg_last_error());
$sql = "SELECT domain,signup,name,lat,long,softwarename,uptime_alltime,active_users_halfyear,service_facebook,service_twitter,service_tumblr,service_wordpress,service_xmpp FROM pods WHERE NOT hidden";
$sql = "SELECT domain,signup,name,lat,long,softwarename,uptime_alltime,active_users_halfyear,service_facebook,service_twitter,service_tumblr,service_wordpress,service_xmpp FROM pods WHERE NOT hidden AND lat != '' AND long != ''";
$result = pg_query($dbh, $sql);
$result || die('Error in SQL query: ' . pg_last_error());
......
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