summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/adminpanelaction.php18
-rw-r--r--lib/default.php3
-rw-r--r--lib/util.php12
3 files changed, 27 insertions, 6 deletions
diff --git a/lib/adminpanelaction.php b/lib/adminpanelaction.php
index 536d97cdf..9ea4fe206 100644
--- a/lib/adminpanelaction.php
+++ b/lib/adminpanelaction.php
@@ -172,6 +172,24 @@ class AdminPanelAction extends Action
}
/**
+ * Show content block. Overrided just to add a special class
+ * to the content div to allow styling.
+ *
+ * @return nothing
+ */
+ function showContentBlock()
+ {
+ $this->elementStart('div', array('id' => 'content', 'class' => 'admin'));
+ $this->showPageTitle();
+ $this->showPageNoticeBlock();
+ $this->elementStart('div', array('id' => 'content_inner'));
+ // show the actual content (forms, lists, whatever)
+ $this->showContent();
+ $this->elementEnd('div');
+ $this->elementEnd('div');
+ }
+
+ /**
* show human-readable instructions for the page, or
* a success/failure on save.
*
diff --git a/lib/default.php b/lib/default.php
index 7b50242ae..b7216045c 100644
--- a/lib/default.php
+++ b/lib/default.php
@@ -40,7 +40,8 @@ $default =
'logdebug' => false,
'fancy' => false,
'locale_path' => INSTALLDIR.'/locale',
- 'language' => 'en_US',
+ 'language' => 'en',
+ 'langdetect' => true,
'languages' => get_all_languages(),
'email' =>
array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : null,
diff --git a/lib/util.php b/lib/util.php
index 46be920fa..da2799d4f 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -105,11 +105,13 @@ function common_language()
// Otherwise, find the best match for the languages requested by the
// user's browser...
- $httplang = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : null;
- if (!empty($httplang)) {
- $language = client_prefered_language($httplang);
- if ($language)
- return $language;
+ if (common_config('site', 'langdetect')) {
+ $httplang = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : null;
+ if (!empty($httplang)) {
+ $language = client_prefered_language($httplang);
+ if ($language)
+ return $language;
+ }
}
// Finally, if none of the above worked, use the site's default...