Commit a56e2126 authored by noplanman's avatar noplanman Committed by David Morley

Temporary fix for pods table boolean fields. (#119)

parent 7abdd377
......@@ -56,6 +56,12 @@ foreach ($pods as $pod) {
$p = R::findOne('pods', $pod['id']);
$p['token'] = $uuid;
$p['tokenexpire'] = date('Y-m-d H:i:s', $expire);
// @todo Temporary fix! https://github.com/gabordemooij/redbean/issues/547
foreach ($p->getProperties() as $key => $value) {
$pod[$key] = $value;
}
R::store($p);
} catch (\RedBeanPHP\RedException $e) {
die('Error in SQL query: ' . $e->getMessage());
......@@ -103,6 +109,12 @@ if (stristr($outputssl, 'openRegistrations')) {
$p['podmin_statement'] = $_podmin_statement;
$p['podmin_notify'] = $_podmin_notify;
$p['publickey'] = $publickey;
// @todo Temporary fix! https://github.com/gabordemooij/redbean/issues/547
foreach ($p->getProperties() as $key => $value) {
$pod[$key] = $value;
}
R::store($p);
} catch (\RedBeanPHP\RedException $e) {
die('Error in SQL query: ' . $e->getMessage());
......
......@@ -48,6 +48,12 @@ if ('save' === $_action) {
$pod['weight'] = $_weight;
$pod['podmin_statement'] = $_podmin_statement;
$pod['podmin_notify'] = $_podmin_notify;
// @todo Temporary fix for RedBean property handling, hope this gets fixed soon!
foreach ($pod->getProperties() as $key => $value) {
$pod[$key] = $value;
}
R::store($pod);
} catch (\RedBeanPHP\RedException $e) {
die('Error in SQL query: ' . $e->getMessage());
......
......@@ -52,6 +52,12 @@ if ($_email) {
try {
$pod['token'] = $uuid;
$pod['tokenexpire'] = date('Y-m-d H:i:s', $expire);
// @todo Temporary fix! https://github.com/gabordemooij/redbean/issues/547
foreach ($pod->getProperties() as $key => $value) {
$pod[$key] = $value;
}
R::store($pod);
} catch (\RedBeanPHP\RedException $e) {
die('Error in SQL query: ' . $e->getMessage());
......
......@@ -287,10 +287,11 @@ foreach ($pods as $pod) {
$p['sslvalid'] = $outputsslerror;
$p['dnssec'] = $dnssec;
$p['sslexpire'] = $sslexpire;
// This is a silly fix which is necessary due to:
// https://github.com/gabordemooij/redbean/issues/547
$p['podmin_notify'] = $p['podmin_notify'];
// @todo Temporary fix! https://github.com/gabordemooij/redbean/issues/547
foreach ($p->getProperties() as $key => $value) {
$pod[$key] = $value;
}
R::store($p);
} catch (\RedBeanPHP\RedException $e) {
......
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