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

View File

@ -90,7 +90,14 @@ class NewnoticeAction extends Action {
function show_form($msg=NULL) {
$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'));
if ($msg) {
common_element('p', 'error', $msg);

View File

@ -82,7 +82,7 @@ class RegisterAction extends Action {
}
common_redirect(common_local_url('profilesettings'));
} 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,
'title' => common_exact_date($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',
array('href' => common_local_url('newnotice',
array('replyto' => $profile->nickname)),

View File

@ -34,7 +34,6 @@ class Notice extends DB_DataObject
public $profile_id; // int(4) not_null
public $uri; // varchar(255) unique_key
public $content; // varchar(140)
public $rendered; // text()
public $url; // varchar(255)
public $created; // datetime() not_null
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 $id; // int(4) primary_key not_null
public $nickname; // varchar(64) multiple_key not_null
public $fullname; // varchar(255) multiple_key
public $nickname; // varchar(64) not_null
public $fullname; // varchar(255)
public $profileurl; // varchar(255)
public $homepage; // varchar(255) multiple_key
public $bio; // varchar(140) multiple_key
public $location; // varchar(255) multiple_key
public $homepage; // varchar(255)
public $bio; // varchar(140)
public $location; // varchar(255)
public $created; // datetime() not_null
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 $notice_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 $replied_id; // int(4)

View File

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