Ver Fonte

updated Core_AclBase::insertRef to use new version of ref table

Piotr Labudda há 9 anos atrás
pai
commit
f70151dffa
1 ficheiros alterados com 8 adições e 0 exclusões
  1. 8 0
      SE/se-lib/Core/AclBase.php

+ 8 - 0
SE/se-lib/Core/AclBase.php

@@ -673,6 +673,14 @@ class Core_AclBase {
   }
 
   public function insertRef($childName, $pk, $childPk) {// TODO: $idTransaction
+    $refTable = ACL::getRefTable($this->getNamespace(), $childName);
+    DB::getPDO()->insert($refTable, [
+      'PRIMARY_KEY' => $pk,
+      'REMOTE_PRIMARY_KEY' => $childPk
+      // TODO: 'REMOTE_TYPENAME' =>
+    ]);
+
+    // TODO: REMOVE legacy code below:
     $refTable = Core_AclHelper::getRefTable($this->getName(), $childName);
     $sqlPk = DB::getPDO()->quote($pk, PDO::PARAM_STR);
     $sqlChildPk = DB::getPDO()->quote($childPk, PDO::PARAM_STR);