]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
save profile url
authorEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 20:21:32 +0000 (16:21 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 20:21:32 +0000 (16:21 -0400)
darcs-hash:20080517202132-84dde-78c7fe9f22aa28f33e9e00432f5cf6436b64e6b5.gz

actions/profilesettings.php
actions/register.php
doc/TODO
lib/common.php

index 7779379b12018de7dba784ff63355fc8d2911a38..fff6e3bd9a078d8e1c46a51f976d9bacc116d83e 100644 (file)
@@ -78,7 +78,8 @@ class ProfilesettingsAction extends SettingsAction {
                $profile->homepage = $this->arg('homepage');
                $profile->bio = $this->arg('bio');
                $profile->location = $this->arg('location');
-
+               $profile->profileurl = common_profile_url($nickname);
+               
                if (!$profile->update()) {
                        common_server_error(_t('Couldnt save profile.'));
                        return;
index 5c30fa1b36e91b4d517927bc8aca8db5f6bf22c0..fcf371d3a26f4234c0eb581fac7c66124935612e 100644 (file)
@@ -81,6 +81,7 @@ class RegisterAction extends Action {
                # TODO: wrap this in a transaction!
                $profile = new Profile();
                $profile->nickname = $nickname;
+               $profile->profileurl = common_profile_url($nickname);
                $profile->created = DB_DataObject_Cast::dateTime(); # current time
                $id = $profile->insert();
                if (!$id) {
index ea703c3fe99ee85bbbd4416e5d8f147e93fcfc3e..13186779f4e0ecd37684237fd39c93ecd6e7422a 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -23,6 +23,7 @@
 + new notice redirects to notice page
 + date in shown notice links to notice page
 + common_redirect()
++ configuration system ($config)
 + release 0.1
 - doc action
 - default to doc, title = main
 - default HTML type
 - set Content-Type
 - show current values in profile settings
+- save profile URL in profilesettings
+- save profile URL on registration
 - require valid nicknames
 - store canonical username for comparison and fetch
 - use only canonical usernames
 - use only canonical email addresses
-- configuration system ($config)
 - RSS 1.0 feeds of a user's notices
 - RSS 1.0 dump of a user's notices
 - RSS 1.0 feed of all public notices
index 85654d3064248eb63ff849deced14182763a3e58..e8a7ac6aed2d6b772fb6047bc241c4f4b9a796a5 100644 (file)
@@ -317,6 +317,10 @@ function common_broadcast_notices($id) {
        return true;
 }
 
+function common_profile_url($nickname) {
+       return common_local_url('showstream', array('nickname' => $nickname));
+}
+
 // XXX: set up gettext
 
 function _t($str) {