common_log_db_error($user, 'UPDATE', __FILE__);
common_server_error(_('Couldn\'t update user.'));
return;
+ } else {
+ # Re-initialize language environment if it changed
+ common_init_language();
}
}
common_debug('Adding rememberme cookie for ' . $nickname);
common_rememberme($user);
}
+ # Re-init language env in case it changed (not yet, but soon)
+ common_init_language();
$this->show_success();
} else {
$this->show_form(_('Invalid username or password.'));
require_once(INSTALLDIR . "/lib/common.php");
+# get and cache current user
+
+$user = common_current_user();
+
+# initialize language env
+
+common_init_language();
+
$action = $_REQUEST['action'];
if (!$action || !preg_match('/^[a-zA-Z0-9_-]*$/', $action)) {
$xw->flush();
}
-define('PAGE_TYPE_PREFS', 'text/html,application/xhtml+xml,application/xml;q=0.3,text/xml;q=0.2');
-
-function common_show_header($pagetitle, $callable=NULL, $data=NULL, $headercall=NULL) {
- global $config, $xw;
-
+function common_init_language() {
$language = common_language();
# So we don't have to make people install the gettext locales
putenv('LANGUAGE='.$language);
bindtextdomain("laconica", $config['site']['locale_path']);
bind_textdomain_codeset("laconica", "UTF-8");
textdomain("laconica");
-
+}
+
+define('PAGE_TYPE_PREFS', 'text/html,application/xhtml+xml,application/xml;q=0.3,text/xml;q=0.2');
+
+function common_show_header($pagetitle, $callable=NULL, $data=NULL, $headercall=NULL) {
+ global $config, $xw;
+
$httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : NULL;
# XXX: allow content negotiation for RDF, RSS, or XRDS