summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-02 16:46:51 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-02-02 16:46:51 -0500
commitab16bb876b895c16f3a7da8eb658e68dc9a9eb24 (patch)
treeaef498307290afc2ffc3fafe8dd554923335c73f /lib
parentdaa5797809ec9315db463c5ecc721f1273c0d17e (diff)
parentb6f0f72a0992596f68f5aa1d4513e6bd3884a2c0 (diff)
Merge branch 'master' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php8
-rw-r--r--lib/clienterroraction.php2
-rw-r--r--lib/error.php1
-rw-r--r--lib/servererroraction.php2
-rw-r--r--lib/util.php5
5 files changed, 14 insertions, 4 deletions
diff --git a/lib/action.php b/lib/action.php
index 4d4c3d4c9..587d2ab13 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -328,8 +328,14 @@ class Action extends HTMLOutputter // lawsuit
if ($user) {
$this->menuItem(common_local_url('profilesettings'),
_('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');
+ } else {
+ $this->menuItem(common_local_url('smssettings'),
+ _('Connect'), _('Connect to SMS, Twitter'), false, 'nav_connect');
+ }
$this->menuItem(common_local_url('logout'),
_('Logout'), _('Logout from the site'), false, 'nav_logout');
} else {
diff --git a/lib/clienterroraction.php b/lib/clienterroraction.php
index ef6fd51df..5019dc06d 100644
--- a/lib/clienterroraction.php
+++ b/lib/clienterroraction.php
@@ -70,7 +70,7 @@ class ClientErrorAction extends ErrorAction
417 => 'Expectation Failed');
$this->default = 400;
}
-
+
// XXX: Should these error actions even be invokable via URI?
function handle($args)
diff --git a/lib/error.php b/lib/error.php
index 9842053d8..03065bc70 100644
--- a/lib/error.php
+++ b/lib/error.php
@@ -130,6 +130,7 @@ class ErrorAction extends Action
{
$this->elementStart('div', array('id' => 'header'));
$this->showLogo();
+ $this->showPrimaryNav();
$this->elementEnd('div');
}
diff --git a/lib/servererroraction.php b/lib/servererroraction.php
index a39886591..80a3fdd7b 100644
--- a/lib/servererroraction.php
+++ b/lib/servererroraction.php
@@ -67,7 +67,7 @@ class ServerErrorAction extends ErrorAction
$this->default = 500;
}
-
+
// XXX: Should these error actions even be invokable via URI?
function handle($args)
diff --git a/lib/util.php b/lib/util.php
index d7af3f204..07e124811 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1390,7 +1390,7 @@ function common_negotiate_type($cprefs, $sprefs)
}
$bestq = 0;
- $besttype = "text/html";
+ $besttype = 'text/html';
foreach(array_keys($combine) as $type) {
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;
}