From 8630d2174a0f798739eeea16be61b8653a10a5da Mon Sep 17 00:00:00 2001 From: niekt0 Date: Thu, 23 Dec 2010 20:41:09 +0100 Subject: [PATCH] registration temporary fixup --- wwwroot/inc/eventz/register.inc | 4 ++-- wwwroot/inc/eventz/verify.inc | 10 +++++----- wwwroot/inc/senate.inc | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/wwwroot/inc/eventz/register.inc b/wwwroot/inc/eventz/register.inc index bb75903..14506f9 100644 --- a/wwwroot/inc/eventz/register.inc +++ b/wwwroot/inc/eventz/register.inc @@ -41,7 +41,7 @@ function register() { } // registration clause // XXX hard coded, registration text - $qr_rc = $db->query('select node_content from nodes where node_id = 791946'); + $qr_rc = $db->query('select node_content from nodes where node_id = '.REGISTRATION_TEXT_NODE); $qr_rc->next(); $params['node_content'] = sprintf('%s
%s
@@ -50,7 +50,7 @@ function register() { $content, $email); // XXX hard-coded - $params['node_parent'] = 1836516; // registrations_noverified forum + $params['node_parent'] = UNVERIFIED_REGISTRATIONS_NODE; // registrations_noverified forum $params['node_name'] = 'request for access'; $params['flag'] = 'registration'; $user_id = nodes::addNode($params); diff --git a/wwwroot/inc/eventz/verify.inc b/wwwroot/inc/eventz/verify.inc index a062642..407e480 100644 --- a/wwwroot/inc/eventz/verify.inc +++ b/wwwroot/inc/eventz/verify.inc @@ -28,13 +28,13 @@ if($uvercode!=$vercode) { // ouch!! this is gonna be dirty!!!!! will be revised later:-) // XXX hardcoded, rewrite -//$q="update nodes set node_parent=".REGISTRATION_REQUEST_NODE.", node_vector='00000101020914480$userid' where node_id='$userid'"; -//$db->update($q); +$q="update nodes set node_parent=".REGISTRATION_REQUEST_NODE.", node_vector='000001010473807402091448$userid' where node_id='$userid'"; +$db->update($q); - $params['node_parent']=REGISTRATION_REQUEST_NODE; - $params['node_id']=$userid; - nodes::setParent($params); +// $params['node_parent']=REGISTRATION_REQUEST_NODE; +// $params['node_id']=$userid; +// nodes::setParent($params); $q="update nodes set node_children_count=node_children_count+1 where node_id=".REGISTRATION_REQUEST_NODE; diff --git a/wwwroot/inc/senate.inc b/wwwroot/inc/senate.inc index 42638bd..f99800d 100644 --- a/wwwroot/inc/senate.inc +++ b/wwwroot/inc/senate.inc @@ -3,6 +3,7 @@ define('DAILY_K',30); define('REGISTRATION_VOTES',2); //too small so far // An attempt to remove hard-code constants from code +define('REGISTRATION_TEXT_NODE',791946); define('REGISTRATION_REQUEST_NODE',2091448); define('UNVERIFIED_REGISTRATIONS_NODE',1836516); -- 2.30.2