Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
This commit is contained in:
commit
85c7b8df71
|
@ -93,7 +93,7 @@ class AllAction extends ProfileAction
|
||||||
if (common_logged_in()) {
|
if (common_logged_in()) {
|
||||||
$current_user = common_current_user();
|
$current_user = common_current_user();
|
||||||
if ($this->user->id === $current_user->id) {
|
if ($this->user->id === $current_user->id) {
|
||||||
$message .= _('Try subscribing to more people, [join a group](%%action.groups) or post something yourself.');
|
$message .= _('Try subscribing to more people, [join a group](%%action.groups%%) or post something yourself.');
|
||||||
} else {
|
} else {
|
||||||
$message .= sprintf(_('You can try to [nudge %s](../%s) from his profile or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
|
$message .= sprintf(_('You can try to [nudge %s](../%s) from his profile or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,15 +172,54 @@ class NewmessageAction extends Action
|
||||||
|
|
||||||
$this->notify($user, $this->other, $message);
|
$this->notify($user, $this->other, $message);
|
||||||
|
|
||||||
$url = common_local_url('outbox', array('nickname' => $user->nickname));
|
if ($this->boolean('ajax')) {
|
||||||
|
$this->startHTML('text/xml;charset=utf-8');
|
||||||
|
$this->elementStart('head');
|
||||||
|
$this->element('title', null, _('Message sent'));
|
||||||
|
$this->elementEnd('head');
|
||||||
|
$this->elementStart('body');
|
||||||
|
$this->element('p', array('id' => 'command_result'),
|
||||||
|
sprintf(_('Direct message to %s sent'),
|
||||||
|
$this->other->nickname));
|
||||||
|
$this->elementEnd('body');
|
||||||
|
$this->elementEnd('html');
|
||||||
|
} else {
|
||||||
|
$url = common_local_url('outbox',
|
||||||
|
array('nickname' => $user->nickname));
|
||||||
|
common_redirect($url, 303);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
common_redirect($url, 303);
|
/**
|
||||||
|
* Show an Ajax-y error message
|
||||||
|
*
|
||||||
|
* Goes back to the browser, where it's shown in a popup.
|
||||||
|
*
|
||||||
|
* @param string $msg Message to show
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
|
||||||
|
function ajaxErrorMsg($msg)
|
||||||
|
{
|
||||||
|
$this->startHTML('text/xml;charset=utf-8', true);
|
||||||
|
$this->elementStart('head');
|
||||||
|
$this->element('title', null, _('Ajax Error'));
|
||||||
|
$this->elementEnd('head');
|
||||||
|
$this->elementStart('body');
|
||||||
|
$this->element('p', array('id' => 'error'), $msg);
|
||||||
|
$this->elementEnd('body');
|
||||||
|
$this->elementEnd('html');
|
||||||
}
|
}
|
||||||
|
|
||||||
function showForm($msg = null)
|
function showForm($msg = null)
|
||||||
{
|
{
|
||||||
$this->msg = $msg;
|
if ($msg && $this->boolean('ajax')) {
|
||||||
|
$this->ajaxErrorMsg($msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->msg = $msg;
|
||||||
$this->showPage();
|
$this->showPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ VALUES
|
||||||
('deskbar','Deskbar-Applet','http://www.gnome.org/projects/deskbar-applet/', now()),
|
('deskbar','Deskbar-Applet','http://www.gnome.org/projects/deskbar-applet/', now()),
|
||||||
('Do','Gnome Do','http://do.davebsd.com/wiki/index.php?title=Microblog_Plugin', now()),
|
('Do','Gnome Do','http://do.davebsd.com/wiki/index.php?title=Microblog_Plugin', now()),
|
||||||
('Facebook','Facebook','http://apps.facebook.com/identica/', now()),
|
('Facebook','Facebook','http://apps.facebook.com/identica/', now()),
|
||||||
|
('feed2omb','feed2omb','http://projects.ciarang.com/p/feed2omb/', now()),
|
||||||
('Gwibber','Gwibber','http://launchpad.net/gwibber', now()),
|
('Gwibber','Gwibber','http://launchpad.net/gwibber', now()),
|
||||||
('HelloTxt','HelloTxt','http://hellotxt.com/', now()),
|
('HelloTxt','HelloTxt','http://hellotxt.com/', now()),
|
||||||
('identicatools','Laconica Tools','http://bitbucketlabs.net/laconica-tools/', now()),
|
('identicatools','Laconica Tools','http://bitbucketlabs.net/laconica-tools/', now()),
|
||||||
|
|
|
@ -192,10 +192,8 @@ $(document).ready(function(){
|
||||||
$("#notice_action-submit").removeClass("disabled");
|
$("#notice_action-submit").removeClass("disabled");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (document.body.id != 'inbox' && document.body.id != 'outbox') {
|
$("#form_notice").ajaxForm(PostNotice);
|
||||||
$("#form_notice").ajaxForm(PostNotice);
|
$("#form_notice").each(addAjaxHidden);
|
||||||
$("#form_notice").each(addAjaxHidden);
|
|
||||||
}
|
|
||||||
NoticeHover();
|
NoticeHover();
|
||||||
NoticeReply();
|
NoticeReply();
|
||||||
});
|
});
|
||||||
|
|
|
@ -192,7 +192,7 @@ $_config_files[] = INSTALLDIR.'/config.php';
|
||||||
$_have_a_config = false;
|
$_have_a_config = false;
|
||||||
|
|
||||||
foreach ($_config_files as $_config_file) {
|
foreach ($_config_files as $_config_file) {
|
||||||
if (file_exists($_config_file)) {
|
if (@file_exists($_config_file)) {
|
||||||
include_once($_config_file);
|
include_once($_config_file);
|
||||||
$_have_a_config = true;
|
$_have_a_config = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -980,7 +980,7 @@ function common_root_url($ssl=false)
|
||||||
function common_good_rand($bytes)
|
function common_good_rand($bytes)
|
||||||
{
|
{
|
||||||
// XXX: use random.org...?
|
// XXX: use random.org...?
|
||||||
if (file_exists('/dev/urandom')) {
|
if (@file_exists('/dev/urandom')) {
|
||||||
return common_urandom($bytes);
|
return common_urandom($bytes);
|
||||||
} else { // FIXME: this is probably not good enough
|
} else { // FIXME: this is probably not good enough
|
||||||
return common_mtrand($bytes);
|
return common_mtrand($bytes);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user