LSrelation : fix check right on relation with specific object
authorBenjamin Renard <brenard@easter-eggs.com>
Fri, 28 Apr 2017 15:05:48 +0000 (17:05 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Fri, 28 Apr 2017 15:05:48 +0000 (17:05 +0200)
public_html/includes/class/class.LSrelation.php

index 226e546..8eb2373 100644 (file)
@@ -108,6 +108,7 @@ class LSrelation {
   }
 
   public function canEditRelationWithObject($objRel) {
   }
 
   public function canEditRelationWithObject($objRel) {
+    if (!$this -> canEdit()) return;
     if (isset($this -> config['canEdit_function'])) {
       if (method_exists($objRel,$this -> config['canEdit_function'])) {
         return call_user_func(array($objRel, $this -> config['canEdit_function']));
     if (isset($this -> config['canEdit_function'])) {
       if (method_exists($objRel,$this -> config['canEdit_function'])) {
         return call_user_func(array($objRel, $this -> config['canEdit_function']));