aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-23 01:20:26 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-23 01:20:26 -0700
commitb8b227b32882fb511c8481a41c53637e7ce7707a (patch)
tree9116351081efa6547268a62332dc4385b1422fbd /mod
parentd850badf2b5717afe39a5fd96dabd29aa013910a (diff)
downloadvolse-hubzilla-b8b227b32882fb511c8481a41c53637e7ce7707a.tar.gz
volse-hubzilla-b8b227b32882fb511c8481a41c53637e7ce7707a.tar.bz2
volse-hubzilla-b8b227b32882fb511c8481a41c53637e7ce7707a.zip
add nicknames to contact records (going forward and retroactive)
Diffstat (limited to 'mod')
-rw-r--r--mod/dfrn_request.php10
-rw-r--r--mod/profile.php2
-rw-r--r--mod/register.php5
3 files changed, 10 insertions, 7 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index 6e8171d50..ddf495986 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -96,13 +96,14 @@ function dfrn_request_post(&$a) {
dbesc_array($parms);
- $r = q("INSERT INTO `contact` ( `uid`, `created`,`url`, `name`, `photo`, `site-pubkey`,
+ $r = q("INSERT INTO `contact` ( `uid`, `created`,`url`, `name`, `nick`, `photo`, `site-pubkey`,
`request`, `confirm`, `notify`, `poll`, `aes_allow`)
- VALUES ( %d, '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', %d)",
+ VALUES ( %d, '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d)",
intval(local_user()),
datetime_convert(),
dbesc($dfrn_url),
$parms['fn'],
+ $parms['nick'],
$parms['photo'],
$parms['key'],
$parms['dfrn-request'],
@@ -271,13 +272,14 @@ function dfrn_request_post(&$a) {
dbesc_array($parms);
- $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `name`, `issued-id`, `photo`, `site-pubkey`,
+ $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `name`, `nick`, `issued-id`, `photo`, `site-pubkey`,
`request`, `confirm`, `notify`, `poll` )
- VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
+ VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
intval($uid),
datetime_convert(),
$parms['url'],
$parms['fn'],
+ $parms['nick'],
$parms['issued-id'],
$parms['photo'],
$parms['key'],
diff --git a/mod/profile.php b/mod/profile.php
index f99a3c4f2..6c60ea8ac 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -65,7 +65,7 @@ function profile_init(&$a) {
$a->page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . (($a->profile['net-publish']) ? 'true' : 'false') . '" />' . "\r\n" ;
$a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
- $uri = urlencode('acct:' . $a->user['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
+ $uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
$a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
header('Link: <' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"');
diff --git a/mod/register.php b/mod/register.php
index 6f0469db8..52c3863eb 100644
--- a/mod/register.php
+++ b/mod/register.php
@@ -161,12 +161,13 @@ function register_post(&$a) {
intval($newuid));
return;
}
- $r = q("INSERT INTO `contact` ( `uid`, `created`, `self`, `name`, `photo`, `thumb`, `blocked`, `pending`, `url`,
+ $r = q("INSERT INTO `contact` ( `uid`, `created`, `self`, `name`, `nick`, `photo`, `thumb`, `blocked`, `pending`, `url`,
`request`, `notify`, `poll`, `confirm`, `name-date`, `uri-date`, `avatar-date` )
- VALUES ( %d, '%s', 1, '%s', '%s', '%s', 0, 0, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
+ VALUES ( %d, '%s', 1, '%s', '%s', '%s', '%s', 0, 0, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
intval($newuid),
datetime_convert(),
dbesc($username),
+ dbesc($nickname),
dbesc($a->get_baseurl() . "/photo/profile/{$newuid}.jpg"),
dbesc($a->get_baseurl() . "/photo/avatar/{$newuid}.jpg"),
dbesc($a->get_baseurl() . "/profile/$nickname"),