do some commits

darcs-hash:20080619033212-84dde-2f7227fe16c7015b03121424520ebd74d4b96762.gz
This commit is contained in:
Evan Prodromou 2008-06-18 23:32:12 -04:00
parent 0620e9f668
commit 4aedce6864
4 changed files with 13 additions and 6 deletions

View File

@ -122,7 +122,9 @@ class ProfilesettingsAction extends SettingsAction {
common_debug('Updating, nickname ="'.$user->nickname.'" and email ="'.$user->email.'"'); common_debug('Updating, nickname ="'.$user->nickname.'" and email ="'.$user->email.'"');
common_debug('Original, nickname ="'.$original->nickname.'" and email ="'.$original->email.'"'); common_debug('Original, nickname ="'.$original->nickname.'" and email ="'.$original->email.'"');
if (FALSE === $user->update($original)) { $result = $user->update($original);
if (!$result) {
common_server_error(_t('Couldnt update user.')); common_server_error(_t('Couldnt update user.'));
return; return;
} }
@ -138,12 +140,16 @@ class ProfilesettingsAction extends SettingsAction {
$profile->location = $location; $profile->location = $location;
$profile->profileurl = common_profile_url($nickname); $profile->profileurl = common_profile_url($nickname);
if (FALSE === $profile->update($orig_profile)) { $result = $profile->update($orig_profile);
if (!$result) {
common_server_error(_t('Couldnt save profile.')); common_server_error(_t('Couldnt save profile.'));
return; return;
} }
common_broadcast_profile($profile); common_broadcast_profile($profile);
$user->query('COMMIT');
$this->show_form(_t('Settings saved.'), TRUE); $this->show_form(_t('Settings saved.'), TRUE);
} }

0
classes/stoica.links.ini Normal file
View File

View File

@ -8,3 +8,4 @@ class_prefix =
db_driver = DB #Use this if you wish to use MDB2 as the driver db_driver = DB #Use this if you wish to use MDB2 as the driver
quote_identifiers = 0 quote_identifiers = 0
generator_exclude_regex = /oid_.*/ generator_exclude_regex = /oid_.*/
generate_links = 1

View File

@ -51,15 +51,15 @@ function oid_link_user($id, $canonical, $display) {
$oid->display = $display; $oid->display = $display;
$oid->created = DB_DataObject_Cast::dateTime(); $oid->created = DB_DataObject_Cast::dateTime();
common_debug('oid = '.print_r($oid, TRUE), __FILE__);
if (!$oid->insert()) { if (!$oid->insert()) {
$err = PEAR::getStaticProperty('DB_DataObject','lastError'); $err = PEAR::getStaticProperty('DB_DataObject','lastError');
common_debug('DB error ' . $err->code . ': ' . $err->message, __FILE__); common_debug('DB error ' . $err->code . ': ' . $err->message, __FILE__);
return false; return false;
} }
common_debug('oid = '.print_r($oid, TRUE), __FILE__); # For some reason, autocommit is turned off
$oid->query('COMMIT');
return true; return true;
} }