|
|
@@ -632,7 +632,7 @@ class Core_AclBase {
|
|
|
}
|
|
|
|
|
|
public function _insertRef($childName, $pk, $childPk) {// TODO: $idTransaction
|
|
|
- $refTable = $this->createRefTable($childName);
|
|
|
+ $refTable = $this->createRefTable($this->getName(), $childName);
|
|
|
$sqlPk = DB::getPDO()->quote($pk, PDO::PARAM_STR);
|
|
|
$sqlChildPk = DB::getPDO()->quote($childPk, PDO::PARAM_STR);
|
|
|
DB::getPDO()->exec("
|
|
|
@@ -642,7 +642,7 @@ class Core_AclBase {
|
|
|
}
|
|
|
|
|
|
public function _cleanRefs($childName, $pk) {// TODO: $idTransaction
|
|
|
- $refTable = $this->createRefTable($childName);
|
|
|
+ $refTable = $this->createRefTable($this->getName(), $childName);
|
|
|
$sqlPk = DB::getPDO()->quote($pk, PDO::PARAM_STR);
|
|
|
DB::getPDO()->exec("
|
|
|
update `{$refTable}` set `A_STATUS` = 'DELETED'
|
|
|
@@ -650,9 +650,8 @@ class Core_AclBase {
|
|
|
");
|
|
|
}
|
|
|
|
|
|
- public function createRefTable($childName) {// TODO: $idTransaction
|
|
|
+ public function createRefTable($objectName, $childName) {
|
|
|
static $cacheRefTables = array();
|
|
|
- $objectName = $this->getName();
|
|
|
$refTable = "{$objectName}__#REF__{$childName}";
|
|
|
if (in_array($refTable, $cacheRefTables)) return $refTable;
|
|
|
DB::getPDO()->exec("
|