Index: branches/unlabeled/unlabeled-1.14.2/kernel/include/custommetadata.php =================================================================== diff -u -r8011 -r8305 --- branches/unlabeled/unlabeled-1.14.2/kernel/include/custommetadata.php (.../custommetadata.php) (revision 8011) +++ branches/unlabeled/unlabeled-1.14.2/kernel/include/custommetadata.php (.../custommetadata.php) (revision 8305) @@ -37,7 +37,8 @@ function DeleteResource($ResourceId, $main_prefix) { if (!$ResourceId) return false; - + + $this->Application->getUnitOption($main_prefix, 'TableName'); $custom_table = $this->Application->getUnitOption($main_prefix.'-cdata', 'TableName'); $sql = 'DELETE FROM '.$custom_table.' WHERE ResourceId = '.$ResourceId; @@ -46,6 +47,7 @@ function CopyResource($OldId,$NewId, $main_prefix) { + $this->Application->getUnitOption($main_prefix, 'TableName'); $custom_data =& $this->Application->recallObject($main_prefix.'-cdata.-item', null, Array('skip_autoload' => true)); $custom_data->Load($OldId, 'ResourceId'); @@ -144,7 +146,8 @@ // not e.g. bb, c, u, but CustomFieldId :) or empty at all $this->Application->reportError(get_class($this), 'CopyToEditTable'); } - + + $this->Application->getUnitOption($prefix, 'TableName'); $temp_handler =& $this->Application->recallObject($prefix.'-cdata_TempHandler', 'kTempTablesHandler'); return $temp_handler; } Index: branches/unlabeled/unlabeled-1.16.2/kernel/include/customfield.php =================================================================== diff -u -r7869 -r8305 --- branches/unlabeled/unlabeled-1.16.2/kernel/include/customfield.php (.../customfield.php) (revision 7869) +++ branches/unlabeled/unlabeled-1.16.2/kernel/include/customfield.php (.../customfield.php) (revision 8305) @@ -104,7 +104,8 @@ function LoadFieldsAndValues($ResourceId, $main_prefix, $temp_table = false) { $this->Clear(); - + + $this->Application->getUnitOption($main_prefix, 'TableName'); $table = $this->Application->getUnitOption($main_prefix.'-cdata', 'TableName'); if ($temp_table) { $table = $this->Application->GetTempName($table, 'prefix:'.$main_prefix);