a.binder 8 lat temu
rodzic
commit
827f0b9361
1 zmienionych plików z 8 dodań i 8 usunięć
  1. 8 8
      SE/se-lib/Route/WfsBiAudit.php

+ 8 - 8
SE/se-lib/Route/WfsBiAudit.php

@@ -59,7 +59,7 @@ public function objectStructView($item) {
 		}
 		foreach($item['field'] as $ind=>$refs) {
 			
-			$return['refs'][]=$refs['fieldNamespace'];
+			$return['refs']				  []=$refs['fieldNamespace'];
 			$return['refs__rootTableName'][]=$refs['_rootTableName'];
 			$return['refs__objectNamespace'][]=$refs['objectNamespace'];
 
@@ -106,7 +106,7 @@ public function objectStructView($item) {
 	    if (in_array($ID, $this->path)) return;
 		$this->path[] = $ID;
 		
-		foreach($BaseStruct['objectNamespace'] as $ind=>$refs){
+		foreach($BaseStruct['refs__objectNamespace'] as $ind=>$refs){
 				$getRefTable=ACL::getRefTable('default_db/'.$table.'/'.$table,$refs);
 				
 				$query = "select `REMOTE_PRIMARY_KEY`  from `".$getRefTable."` where `PRIMARY_KEY` = {$ID}";
@@ -118,23 +118,23 @@ public function objectStructView($item) {
 							 self::throwServiceException("Błąd danych #102 findRelations_base");
 						}*/
 				
-				if (!in_array($BaseStruct[$ind]['_rootTableName'], $this->tablesUsed)) $this->tablesUsed[] = $BaseStruct[$ind]['_rootTableName'];
+				if (!in_array($BaseStruct['_rootTableName'][$ind], $this->tablesUsed)) $this->tablesUsed[] = $BaseStruct['_rootTableName'][$ind];
 				}
 				
 				if ($resolveDepth) {
-					$feature = $this->addChild($node, $BaseStruct[$ind]['refs']);
-					$this->addAttribute($feature, 'fid', $BaseStruct[$ind]['_rootTableName'].$row['REMOTE_PRIMARY_KEY']);
-					$this->addChild($feature, "default_db__x3A__".$BaseStruct[$ind]['_rootTableName'].":ID", $row['REMOTE_PRIMARY_KEY']);
+					$feature = $this->addChild($node, $BaseStruct['refs'][$ind]);
+					$this->addAttribute($feature, 'fid', $BaseStruct['_rootTableName'][$ind].$row['REMOTE_PRIMARY_KEY']);
+					$this->addChild($feature, "default_db__x3A__".$BaseStruct['_rootTableName'][$ind].":ID", $row['REMOTE_PRIMARY_KEY']);
 					if ($relation) $this->addChild($feature, "relation_from", $this->relationName($relation));
 					//$query = "select `ID2` from `BI_audit_ALL_ref` where `ID1` = {$ID}";
 					//$where = $relation ? "and ({$relation} & `RELATION_ID`) != {$relation}" : "";
-					$RefBaseStruct=$this->objectStructureAction($BaseStruct[$ind]['objectNamespace']); 
+					$RefBaseStruct=$this->objectStructureAction($BaseStruct['objectNamespace'][$ind]); 
 					
 					$query = "select `".$RefBaseStruct['primaryKey']."` from `".$RefBaseStruct['table']."` where `".$RefBaseStruct['primaryKey']."` = ".$row['REMOTE_PRIMARY_KEY'] ;
 					$result = DB::getPDO()->fetchAll($query);
 					foreach ($result as $row) $this->findRelations($feature, $row['REMOTE_PRIMARY_KEY'], $resolveDepth - 1, null,$BaseStruct['table'],$RefBaseStruct['table']);
 				} else {
-					$xlink = $this->addChild($node, $BaseStruct[$ind]['fieldNamespace']);
+					$xlink = $this->addChild($node, $BaseStruct['refs'][$ind]);
 					$this->addAttribute($xlink, 'xlink:href', "https://biuro.biall-net.pl/wfs/default_db/{$RefBaseStruct['table']}?BI_audit_ALL_ref_RELATIONS={$relation}#{$RefBaseStruct['table']}.{$row['REMOTE_PRIMARY_KEY']}");
 				}
 		array_pop($this->path);