Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
This commit is contained in:
commit
13713a09bb
|
@ -99,7 +99,7 @@ class OauthconnectionssettingsAction extends ConnectSettingsAction
|
||||||
|
|
||||||
$application = $profile->getApplications($offset, $limit);
|
$application = $profile->getApplications($offset, $limit);
|
||||||
|
|
||||||
$cnt == 0;
|
$cnt = 0;
|
||||||
|
|
||||||
if (!empty($application)) {
|
if (!empty($application)) {
|
||||||
$al = new ApplicationList($application, $user, $this, true);
|
$al = new ApplicationList($application, $user, $this, true);
|
||||||
|
@ -112,7 +112,7 @@ class OauthconnectionssettingsAction extends ConnectSettingsAction
|
||||||
|
|
||||||
$this->pagination($this->page > 1, $cnt > APPS_PER_PAGE,
|
$this->pagination($this->page > 1, $cnt > APPS_PER_PAGE,
|
||||||
$this->page, 'connectionssettings',
|
$this->page, 'connectionssettings',
|
||||||
array('nickname' => $this->user->nickname));
|
array('nickname' => $user->nickname));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -277,8 +277,8 @@ class SiteAdminPanelForm extends AdminForm
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
$this->li();
|
$this->li();
|
||||||
$this->out->dropdown('language', _('Language'),
|
$this->out->dropdown('language', _('Default language'),
|
||||||
get_nice_language_list(), _('Default site language'),
|
get_nice_language_list(), _('Site language when autodetection from browser settings is not available'),
|
||||||
false, $this->value('language'));
|
false, $this->value('language'));
|
||||||
$this->unli();
|
$this->unli();
|
||||||
|
|
||||||
|
|
|
@ -253,6 +253,7 @@ function main()
|
||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
|
|
||||||
// initialize language env
|
// initialize language env
|
||||||
|
common_log(LOG_DEBUG, "XXX: WAIII");
|
||||||
|
|
||||||
common_init_language();
|
common_init_language();
|
||||||
|
|
||||||
|
|
|
@ -171,6 +171,24 @@ class AdminPanelAction extends Action
|
||||||
$this->showForm();
|
$this->showForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* show human-readable instructions for the page, or
|
||||||
* a success/failure on save.
|
* a success/failure on save.
|
||||||
|
|
|
@ -40,7 +40,8 @@ $default =
|
||||||
'logdebug' => false,
|
'logdebug' => false,
|
||||||
'fancy' => false,
|
'fancy' => false,
|
||||||
'locale_path' => INSTALLDIR.'/locale',
|
'locale_path' => INSTALLDIR.'/locale',
|
||||||
'language' => 'en_US',
|
'language' => 'en',
|
||||||
|
'langdetect' => true,
|
||||||
'languages' => get_all_languages(),
|
'languages' => get_all_languages(),
|
||||||
'email' =>
|
'email' =>
|
||||||
array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : null,
|
array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : null,
|
||||||
|
|
|
@ -105,12 +105,14 @@ function common_language()
|
||||||
|
|
||||||
// Otherwise, find the best match for the languages requested by the
|
// Otherwise, find the best match for the languages requested by the
|
||||||
// user's browser...
|
// user's browser...
|
||||||
|
if (common_config('site', 'langdetect')) {
|
||||||
$httplang = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : null;
|
$httplang = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : null;
|
||||||
if (!empty($httplang)) {
|
if (!empty($httplang)) {
|
||||||
$language = client_prefered_language($httplang);
|
$language = client_prefered_language($httplang);
|
||||||
if ($language)
|
if ($language)
|
||||||
return $language;
|
return $language;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Finally, if none of the above worked, use the site's default...
|
// Finally, if none of the above worked, use the site's default...
|
||||||
return common_config('site', 'language');
|
return common_config('site', 'language');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user