[geeklog-cvs] geeklog-1.3/public_html users.php,1.90,1.91 usersettings.php,1.105,1.106
blaine at iowaoutdoors.org
blaine at iowaoutdoors.org
Sat Oct 9 16:18:36 EDT 2004
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv16788/public_html
Modified Files:
users.php usersettings.php
Log Message:
Rest of changes to support new location field in the user account profile
Index: usersettings.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/usersettings.php,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** usersettings.php 30 Sep 2004 18:14:29 -0000 1.105
--- usersettings.php 9 Oct 2004 20:18:34 -0000 1.106
***************
*** 55,59 ****
global $_CONF, $_TABLES, $_USER, $LANG04;
! $result = DB_query("SELECT fullname,cookietimeout,email,homepage,sig,emailstories,about,pgpkey,photo FROM {$_TABLES['users']},{$_TABLES['userprefs']},{$_TABLES['userinfo']} WHERE {$_TABLES['users']}.uid = {$_USER['uid']} && {$_TABLES['userprefs']}.uid = {$_USER['uid']} && {$_TABLES['userinfo']}.uid = {$_USER['uid']}");
$A = DB_fetchArray ($result);
--- 55,59 ----
global $_CONF, $_TABLES, $_USER, $LANG04;
! $result = DB_query("SELECT fullname,cookietimeout,email,homepage,sig,emailstories,about,location,pgpkey,photo FROM {$_TABLES['users']},{$_TABLES['userprefs']},{$_TABLES['userinfo']} WHERE {$_TABLES['users']}.uid = {$_USER['uid']} && {$_TABLES['userprefs']}.uid = {$_USER['uid']} && {$_TABLES['userinfo']}.uid = {$_USER['uid']}");
$A = DB_fetchArray ($result);
***************
*** 78,81 ****
--- 78,83 ----
$preferences->set_var ('lang_homepage', $LANG04[6]);
$preferences->set_var ('lang_homepage_text', $LANG04[36]);
+ $preferences->set_var ('lang_location', $LANG04[106]);
+ $preferences->set_var ('lang_location_text', $LANG04[107]);
$preferences->set_var ('lang_signature', $LANG04[32]);
$preferences->set_var ('lang_signature_text', $LANG04[37]);
***************
*** 119,122 ****
--- 121,125 ----
$preferences->set_var ('homepage_value',
htmlspecialchars (COM_killJS ($A['homepage'])));
+ $preferences->set_var ('location_value', htmlspecialchars ($A['location']));
$preferences->set_var ('signature_value', htmlspecialchars ($A['sig']));
***************
*** 823,826 ****
--- 826,830 ----
$A['email'] = COM_applyFilter ($A['email']);
$A['homepage'] = COM_applyFilter ($A['homepage']);
+ $A['location'] = COM_applyFilter ($A['location']);
// basic filtering only
***************
*** 883,887 ****
DB_query("UPDATE {$_TABLES['users']} SET fullname='{$A['fullname']}',email='{$A['email']}',homepage='{$A['homepage']}',sig='{$A['sig']}',cookietimeout={$A['cooktime']},photo='$filename' WHERE uid={$_USER['uid']}");
! DB_query("UPDATE {$_TABLES['userinfo']} SET pgpkey='{$A['pgpkey']}',about='{$A['about']}' WHERE uid={$_USER['uid']}");
// Call custom registration save function if enabled and exists
--- 887,891 ----
DB_query("UPDATE {$_TABLES['users']} SET fullname='{$A['fullname']}',email='{$A['email']}',homepage='{$A['homepage']}',sig='{$A['sig']}',cookietimeout={$A['cooktime']},photo='$filename' WHERE uid={$_USER['uid']}");
! DB_query("UPDATE {$_TABLES['userinfo']} SET pgpkey='{$A['pgpkey']}',about='{$A['about']}',location='{$A['location']}' WHERE uid={$_USER['uid']}");
// Call custom registration save function if enabled and exists
Index: users.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/users.php,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** users.php 5 Oct 2004 19:52:45 -0000 1.90
--- users.php 9 Oct 2004 20:18:34 -0000 1.91
***************
*** 91,95 ****
$retval = '';
! $result = DB_query("SELECT username,fullname,regdate,homepage,about,pgpkey,photo FROM {$_TABLES['userinfo']},{$_TABLES["users"]} WHERE {$_TABLES['userinfo']}.uid = {$_TABLES['users']}.uid AND {$_TABLES['users']}.uid = $user");
$nrows = DB_numRows($result);
if ($nrows == 0) { // no such user
--- 91,95 ----
$retval = '';
! $result = DB_query("SELECT username,fullname,regdate,homepage,about,location,pgpkey,photo FROM {$_TABLES['userinfo']},{$_TABLES["users"]} WHERE {$_TABLES['userinfo']}.uid = {$_TABLES['users']}.uid AND {$_TABLES['users']}.uid = $user");
$nrows = DB_numRows($result);
if ($nrows == 0) { // no such user
***************
*** 135,138 ****
--- 135,140 ----
$user_templates->set_var('lang_homepage', $LANG04[6]);
$user_templates->set_var('user_homepage', COM_killJS ($A['homepage']));
+ $user_templates->set_var('lang_location', $LANG04[106]);
+ $user_templates->set_var('user_location', $A['location']);
$user_templates->set_var('lang_bio', $LANG04[7]);
$user_templates->set_var('user_bio', nl2br(stripslashes($A['about'])));
More information about the geeklog-cvs
mailing list