Index: branches/5.2.x/core/units/custom_data/custom_data_event_handler.php =================================================================== diff -u -N -r14851 -r15012 --- branches/5.2.x/core/units/custom_data/custom_data_event_handler.php (.../custom_data_event_handler.php) (revision 14851) +++ branches/5.2.x/core/units/custom_data/custom_data_event_handler.php (.../custom_data_event_handler.php) (revision 15012) @@ -1,6 +1,6 @@ Application->getUnitOption('cdata', 'Clones'); + + $data_table = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'CustomDataTableName'); + + if ( !$data_table ) { + $data_table = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TableName') . 'CustomData'; + } + $clones[$event->MasterEvent->Prefix.'-cdata'] = Array ( 'ParentPrefix' => $event->MasterEvent->Prefix, - 'TableName' => $this->Application->getUnitOption($event->MasterEvent->Prefix, 'TableName').'CustomData', + 'TableName' => $data_table, ); $this->Application->setUnitOption('cdata', 'Clones', $clones); @@ -48,7 +55,7 @@ { static $custom_fields = Array (); - if (defined('IS_INSTALL') && IS_INSTALL && !$this->Application->TableFound('CustomField', true)) { + if (defined('IS_INSTALL') && IS_INSTALL && !$this->Application->TableFound('CustomFields', true)) { return false; } @@ -103,7 +110,7 @@ function getCustomFields() { $sql = 'SELECT * - FROM '.TABLE_PREFIX.'CustomField'; + FROM '.TABLE_PREFIX.'CustomFields'; $ret = $this->Conn->Query($sql, 'CustomFieldId'); ksort($ret);