Merge branch 'master' of git@gitorious.org:laconica/dev into 0.7.x

This commit is contained in:
Evan Prodromou 2009-02-02 16:46:51 -05:00
commit ab16bb876b
14 changed files with 27 additions and 13 deletions

2
README
View File

@ -618,7 +618,7 @@ subdirectory to add a new language to your system. You'll need to
compile the ".po" files into ".mo" files, however. compile the ".po" files into ".mo" files, however.
Contributions of translation information to Laconica are very easy: Contributions of translation information to Laconica are very easy:
you can use the Web interface at http://laconi.ca/entrans/ to add one you can use the Web interface at http://laconi.ca/pootle/ to add one
or a few or lots of new translations -- or even new languages. You can or a few or lots of new translations -- or even new languages. You can
also download more up-to-date .po files there, if you so desire. also download more up-to-date .po files there, if you so desire.

View File

@ -89,7 +89,7 @@ class DisfavorAction extends Action
} }
$user->blowFavesCache(); $user->blowFavesCache();
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8', true); $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head'); $this->elementStart('head');
$this->element('title', null, _('Add to favorites')); $this->element('title', null, _('Add to favorites'));
$this->elementEnd('head'); $this->elementEnd('head');

View File

@ -89,7 +89,7 @@ class FavorAction extends Action
$this->notify($notice, $user); $this->notify($notice, $user);
$user->blowFavesCache(); $user->blowFavesCache();
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8', true); $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head'); $this->elementStart('head');
$this->element('title', null, _('Disfavor favorite')); $this->element('title', null, _('Disfavor favorite'));
$this->elementEnd('head'); $this->elementEnd('head');

View File

@ -161,7 +161,7 @@ class NewnoticeAction extends Action
common_broadcast_notice($notice); common_broadcast_notice($notice);
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8', true); $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head'); $this->elementStart('head');
$this->element('title', null, _('Notice posted')); $this->element('title', null, _('Notice posted'));
$this->elementEnd('head'); $this->elementEnd('head');

View File

@ -89,7 +89,7 @@ class NudgeAction extends Action
$this->notify($user, $other); $this->notify($user, $other);
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8', true); $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head'); $this->elementStart('head');
$this->element('title', null, _('Nudge sent')); $this->element('title', null, _('Nudge sent'));
$this->elementEnd('head'); $this->elementEnd('head');

View File

@ -64,7 +64,7 @@ class SubscribeAction extends Action
} }
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8', true); $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head'); $this->elementStart('head');
$this->element('title', null, _('Subscribed')); $this->element('title', null, _('Subscribed'));
$this->elementEnd('head'); $this->elementEnd('head');

View File

@ -203,7 +203,7 @@ class TagotherAction extends Action
$action = $user->isSubscribed($this->profile) ? 'subscriptions' : 'subscribers'; $action = $user->isSubscribed($this->profile) ? 'subscriptions' : 'subscribers';
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->startHTML('text/xml'); $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head'); $this->elementStart('head');
$this->element('title', null, _('Tags')); $this->element('title', null, _('Tags'));
$this->elementEnd('head'); $this->elementEnd('head');

View File

@ -66,7 +66,7 @@ class UnsubscribeAction extends Action
} }
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
$this->startHTML('text/xml;charset=utf-8', true); $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head'); $this->elementStart('head');
$this->element('title', null, _('Unsubscribed')); $this->element('title', null, _('Unsubscribed'));
$this->elementEnd('head'); $this->elementEnd('head');

View File

@ -328,8 +328,14 @@ class Action extends HTMLOutputter // lawsuit
if ($user) { if ($user) {
$this->menuItem(common_local_url('profilesettings'), $this->menuItem(common_local_url('profilesettings'),
_('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account'); _('Account'), _('Change your email, avatar, password, profile'), false, 'nav_account');
$this->menuItem(common_local_url('imsettings'),
if (common_config('xmpp', 'enabled')) {
$this->menuItem(common_local_url('imsettings'),
_('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect'); _('Connect'), _('Connect to IM, SMS, Twitter'), false, 'nav_connect');
} else {
$this->menuItem(common_local_url('smssettings'),
_('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
}
$this->menuItem(common_local_url('logout'), $this->menuItem(common_local_url('logout'),
_('Logout'), _('Logout from the site'), false, 'nav_logout'); _('Logout'), _('Logout from the site'), false, 'nav_logout');
} else { } else {

View File

@ -130,6 +130,7 @@ class ErrorAction extends Action
{ {
$this->elementStart('div', array('id' => 'header')); $this->elementStart('div', array('id' => 'header'));
$this->showLogo(); $this->showLogo();
$this->showPrimaryNav();
$this->elementEnd('div'); $this->elementEnd('div');
} }

View File

@ -1390,7 +1390,7 @@ function common_negotiate_type($cprefs, $sprefs)
} }
$bestq = 0; $bestq = 0;
$besttype = "text/html"; $besttype = 'text/html';
foreach(array_keys($combine) as $type) { foreach(array_keys($combine) as $type) {
if($combine[$type] > $bestq) { if($combine[$type] > $bestq) {
@ -1399,6 +1399,9 @@ function common_negotiate_type($cprefs, $sprefs)
} }
} }
if ('text/html' === $besttype) {
return "text/html; charset=utf-8";
}
return $besttype; return $besttype;
} }

View File

@ -86,9 +86,13 @@ if ($cnt > 0) {
": Found $cnt new notices to send to Facebook since last run at " . ": Found $cnt new notices to send to Facebook since last run at " .
date('Y-m-d H:i:s', $since) . "\n"; date('Y-m-d H:i:s', $since) . "\n";
updateLastUpdated($current_time);
} }
#Save the last updated time. It needs to do this even if there were no
#changes made, otherwise it will never create it and thus never send
#any updates at all.
updateLastUpdated($current_time);
exit(0); exit(0);