Projects ⇒ Bugs ⇒ #672: Topic Reply Notification in wrong language ⇒ CPG Dragonfly™ CMS
Bug #672 Topic Reply Notification in wrong language
Project: Dragonfly 9.0.3 -> 9.3 Category: Cookie / Session
Submitted: Wednesday, November 23, 2005 (07:43:05) Modified: Thursday, September 28, 2006 (10:42:14)
Status: Closed Assigned to: NanoCaiordo
PHP Version: Irrelevant HTTPD Server: Apache 1.3
Votes: 1
Vote results:
Avg. Score: 5.0 ± 0.0 Reproduced: 1 of 1 (100.0%)
Same PHP Version: 0 (0.0%) Same HTTPD Server: 0 (0.0%)

View/Vote Add Comment

by: NanoCaiordo
Description:
------------
As posted here.

Reproduce code:
---------------
File: includes/phpBB/functions_post.php
Line: 345
$Id: functions_post.php,v 9.9

$sql = "SELECT u.user_id, u.user_email, u.user_lang

Expected result:
----------------
Send notification to users using they coosen language.

Actual result:
--------------
Always send notification to users in english.
Table field is never updated.

### FIX ###
File: includes/functions/language.php

Line: 288
setcookie('lang',$currentlang,gmtime()+31536000, $MAIN_CFG['cookie']['path']);

Below add:
if (is_user() && ($_COOKIE['lang'] != $userinfo['user_lang'])) {
$updatecurrent = array('user_lang'=>$currentlang);
$db->sql_update($user_prefix.'_users',$updatecurrent,'user_id='.$userinfo['user_id']);
}
by: NanoCaiordo
probably unset($updatecurrent) after the db update will be good
by: NanoCaiordo
The belove code should be faster then the above:

if (is_user() && ($currentlang != $userinfo['user_lang'])) {
$db->sql_update($user_prefix.'_users',array('user_lang'=>$currentlang),'user_id='.$userinfo['user_id']);
}
by: NanoCaiordo
fixed, will be active for next release
User Info

Welcome Anonymous



(Register)
Community

Support for DragonflyCMS in a other languages:

Deutsch
Español