Index: trunk/kernel/include/custommetadata.php =================================================================== diff -u -N -r8009 -r8397 --- trunk/kernel/include/custommetadata.php (.../custommetadata.php) (revision 8009) +++ trunk/kernel/include/custommetadata.php (.../custommetadata.php) (revision 8397) @@ -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; }