Pman.js
[Pman.Core] / RooPostTrait.php
index ba64ecb..456aa7a 100644 (file)
@@ -170,7 +170,8 @@ trait Pman_Core_RooPostTrait {
         
         $affects  = array();
         
-        $all_links = $GLOBALS['_DB_DATAOBJECT']['LINKS'][$x->_database];
+        $all_links = $x->databaseLinks();
+        
         foreach($all_links as $tbl => $links) {
             foreach($links as $col => $totbl_col) {
                 $to = explode(':', $totbl_col);
@@ -313,7 +314,7 @@ trait Pman_Core_RooPostTrait {
     function update($x, $req,  $with_perm_check = true)
     {
         if ( $with_perm_check && !$this->checkPerm($x,'E', $req) )  {
-            $this->jerr("PERMISSION DENIED - No Edit permissions on this element???");
+            $this->jerr("PERMISSION DENIED - No Edit permissions on this element");
         }
        
         // check any locks..