save profile url

darcs-hash:20080517202132-84dde-78c7fe9f22aa28f33e9e00432f5cf6436b64e6b5.gz
This commit is contained in:
Evan Prodromou 2008-05-17 16:21:32 -04:00
parent 7ee294de75
commit 1950efda80
4 changed files with 10 additions and 2 deletions

View File

@ -78,6 +78,7 @@ class ProfilesettingsAction extends SettingsAction {
$profile->homepage = $this->arg('homepage'); $profile->homepage = $this->arg('homepage');
$profile->bio = $this->arg('bio'); $profile->bio = $this->arg('bio');
$profile->location = $this->arg('location'); $profile->location = $this->arg('location');
$profile->profileurl = common_profile_url($nickname);
if (!$profile->update()) { if (!$profile->update()) {
common_server_error(_t('Couldnt save profile.')); common_server_error(_t('Couldnt save profile.'));

View File

@ -81,6 +81,7 @@ class RegisterAction extends Action {
# TODO: wrap this in a transaction! # TODO: wrap this in a transaction!
$profile = new Profile(); $profile = new Profile();
$profile->nickname = $nickname; $profile->nickname = $nickname;
$profile->profileurl = common_profile_url($nickname);
$profile->created = DB_DataObject_Cast::dateTime(); # current time $profile->created = DB_DataObject_Cast::dateTime(); # current time
$id = $profile->insert(); $id = $profile->insert();
if (!$id) { if (!$id) {

View File

@ -23,6 +23,7 @@
+ new notice redirects to notice page + new notice redirects to notice page
+ date in shown notice links to notice page + date in shown notice links to notice page
+ common_redirect() + common_redirect()
+ configuration system ($config)
+ release 0.1 + release 0.1
- doc action - doc action
- default to doc, title = main - default to doc, title = main
@ -30,11 +31,12 @@
- default HTML type - default HTML type
- set Content-Type - set Content-Type
- show current values in profile settings - show current values in profile settings
- save profile URL in profilesettings
- save profile URL on registration
- require valid nicknames - require valid nicknames
- store canonical username for comparison and fetch - store canonical username for comparison and fetch
- use only canonical usernames - use only canonical usernames
- use only canonical email addresses - use only canonical email addresses
- configuration system ($config)
- RSS 1.0 feeds of a user's notices - RSS 1.0 feeds of a user's notices
- RSS 1.0 dump of a user's notices - RSS 1.0 dump of a user's notices
- RSS 1.0 feed of all public notices - RSS 1.0 feed of all public notices

View File

@ -317,6 +317,10 @@ function common_broadcast_notices($id) {
return true; return true;
} }
function common_profile_url($nickname) {
return common_local_url('showstream', array('nickname' => $nickname));
}
// XXX: set up gettext // XXX: set up gettext
function _t($str) { function _t($str) {