Merge conflicts and kill a whole lot of trailing whitespace on lines.

darcs-hash:20080709224630-533db-b5399baef280133858dac9b89c2cd6a2aba9f861.gz
This commit is contained in:
Mike Cochrane 2008-07-09 18:46:30 -04:00
parent 67921b1c18
commit 4b656f47df
31 changed files with 120 additions and 114 deletions

View File

@ -40,7 +40,7 @@ class LoginAction extends Action {
if (common_check_user($nickname, $password)) { if (common_check_user($nickname, $password)) {
# success! # success!
if (!common_set_user($nickname)) { if (!common_set_user($nickname)) {
common_server_error(_t('Error setting user.')); common_server_error(_('Error setting user.'));
return; return;
} }
common_real_login(true); common_real_login(true);
@ -60,7 +60,14 @@ class LoginAction extends Action {
} }
common_redirect($url); common_redirect($url);
} else { } else {
$this->show_form(_t('Incorrect username or password.')); $this->show_form(_('Incorrect username or password.'));
return;
}
# success!
if (!common_set_user($user)) {
common_server_error(_t('Error setting user.'));
return;
} }
common_real_login(true); common_real_login(true);
@ -102,7 +109,7 @@ class LoginAction extends Action {
} }
function get_instructions() { function get_instructions() {
return _t('Login with your username and password. ' . return _('Login with your username and password. ' .
'Don\'t have a username yet? ' . 'Don\'t have a username yet? ' .
'[Register](%%action.register%%) a new account, or ' . '[Register](%%action.register%%) a new account, or ' .
'try [OpenID](%%action.openidlogin%%). '); 'try [OpenID](%%action.openidlogin%%). ');

View File

@ -90,7 +90,14 @@ class NewnoticeAction extends Action {
function show_form($msg=NULL) { function show_form($msg=NULL) {
$content = $this->trimmed('status_textarea'); $content = $this->trimmed('status_textarea');
common_show_header(_t('New notice'), NULL, $content, if (!$content) {
$replyto = $this->trimmed('replyto');
$profile = Profile::staticGet('nickname', $replyto);
if ($profile) {
$content = '@' . $profile->nickname . ' ';
}
}
common_show_header(_('New notice'), NULL, $content,
array($this, 'show_top')); array($this, 'show_top'));
if ($msg) { if ($msg) {
common_element('p', 'error', $msg); common_element('p', 'error', $msg);

View File

@ -82,7 +82,7 @@ class RegisterAction extends Action {
} }
common_redirect(common_local_url('profilesettings')); common_redirect(common_local_url('profilesettings'));
} else { } else {
$this->show_form(_t('Invalid username or password.')); $this->show_form(_('Invalid username or password.'));
} }
} }

View File

@ -375,14 +375,6 @@ class ShowstreamAction extends StreamAction {
'href' => $noticeurl, 'href' => $noticeurl,
'title' => common_exact_date($notice->created)), 'title' => common_exact_date($notice->created)),
common_date_string($notice->created)); common_date_string($notice->created));
if ($notice->reply_to) {
$replyurl = common_local_url('shownotice', array('notice' => $notice->reply_to));
common_text(' (');
common_element('a', array('class' => 'inreplyto',
'href' => $replyurl),
_t('in reply to...'));
common_text(')');
}
common_element_start('a', common_element_start('a',
array('href' => common_local_url('newnotice', array('href' => common_local_url('newnotice',
array('replyto' => $profile->nickname)), array('replyto' => $profile->nickname)),

View File

@ -34,7 +34,6 @@ class Notice extends DB_DataObject
public $profile_id; // int(4) not_null public $profile_id; // int(4) not_null
public $uri; // varchar(255) unique_key public $uri; // varchar(255) unique_key
public $content; // varchar(140) public $content; // varchar(140)
public $rendered; // text()
public $url; // varchar(255) public $url; // varchar(255)
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP

View File

@ -31,12 +31,12 @@ class Profile extends DB_DataObject
public $__table = 'profile'; // table name public $__table = 'profile'; // table name
public $id; // int(4) primary_key not_null public $id; // int(4) primary_key not_null
public $nickname; // varchar(64) multiple_key not_null public $nickname; // varchar(64) not_null
public $fullname; // varchar(255) multiple_key public $fullname; // varchar(255)
public $profileurl; // varchar(255) public $profileurl; // varchar(255)
public $homepage; // varchar(255) multiple_key public $homepage; // varchar(255)
public $bio; // varchar(140) multiple_key public $bio; // varchar(140)
public $location; // varchar(255) multiple_key public $location; // varchar(255)
public $created; // datetime() not_null public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP

View File

@ -12,6 +12,7 @@ class Reply extends DB_DataObject
public $__table = 'reply'; // table name public $__table = 'reply'; // table name
public $notice_id; // int(4) primary_key not_null public $notice_id; // int(4) primary_key not_null
public $profile_id; // int(4) primary_key not_null public $profile_id; // int(4) primary_key not_null
public $replied_id; // int(4)
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
public $replied_id; // int(4) public $replied_id; // int(4)

View File

@ -20,8 +20,8 @@
# Abort if called from a web server # Abort if called from a web server
if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
print "This script must be run from the command line\n"; print "This script must be run from the command line\n";
exit(); exit();
} }
define('INSTALLDIR', dirname(__FILE__)); define('INSTALLDIR', dirname(__FILE__));
@ -35,6 +35,6 @@ $notice = new Notice();
$cnt = $notice->find(); $cnt = $notice->find();
while ($notice->fetch()) { while ($notice->fetch()) {
common_log(LOG_INFO, 'Getting replies for notice #' . $notice->id); common_log(LOG_INFO, 'Getting replies for notice #' . $notice->id);
common_save_replies($notice); common_save_replies($notice);
} }