Home » Authentication » LiveUser » Bug #173
Chicken and Egg problem with addTranslation() and addLanguage()
Details
| Submitted | 2003-10-31 15:07 UTC |
|---|---|
| From | mfriedman at symcor dot com |
| Assigned | arnaud |
| Status | Closed |
| Package | LiveUser |
| PHP Version | 4.3.3 |
| OS | Redhat Linux |
| Roadmaps | (Not assigned) |
Comments
[2003-10-31 15:07 UTC] mfriedman at symcor dot com
Description:
------------
When you add the first language addTranslation() can't add the translation because the language doesn't exist yet. Also, addTranslation() returns boolean false when it cannot find the language but addLanguage() checks for a DB error to see if addTranslation() failed, not a boolean false. So, addTranslation() fails without alerting addLanguage(). That is, it fails silently.
As such the language table data is saved but the comment of the new language is lost and nothing is saved in the translation table.
Reproduce code:
---------------
This can be reproduced by starting with an empty live user database and using the DB admin complex api to add a new Language. Once you have added the new language, including the comment, check the database. You'll find that the comment was not saved in the translation table.
Expected result:
----------------
The comment should be saved in the translation table.