sarvan75 / yii-user-management

Automatically exported from code.google.com/p/yii-user-management
0 stars 0 forks source link

Table name personalization fails on Translation Table #162

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install from scratch customizing all the tables
2. Set all the table names 
3. Run the module and go to Translation link

What is the expected output? What do you see instead?
Table "translation" was not found error

What version of the product are you using? On what operating system?
YUM0.8rc5

Please provide any additional information below.
In file protected/modulkes/user/models/YumTranslation.php, modify:
class YumTranslation extends CActiveRecord{
  //I don't know why, but I had to declare it
    public $_tableName;
  ....

    public function tableName()
    {//copied/adapted from YumUser
       if (isset(Yum::module()->translationTable))
          $this->_tableName = Yum::module()->translationTable;
       elseif (isset(Yii::app()->modules['user']['translationTable']))
          $this->_tableName = Yii::app()->modules['user']['translationTable'];
       else
          $this->_tableName = '{{translation}}'; // fallback if nothing is set

       return Yum::resolveTableName($this->_tableName, $this->getDbConnection());
    }
...

Original issue reported on code.google.com by dgeape...@gmail.com on 12 Sep 2011 at 5:01

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r404.

Original comment by thyseus on 17 Sep 2011 at 9:45