Source

Kephra / lib / Kephra / API / Docs.pm

Diff from to

File lib/Kephra/API/Docs.pm

 	Kephra::Log::warning('need a ' . DOC_CLASS . " thats in stash, not $doc!", 1)
 		unless ref $doc and $doc->isa( DOC_CLASS );
 	$document{'ID'}  {$lowest_free_ID} = $doc;
-	for my $docbar (keys $doc->panel){
-		$document{'panel'} {$doc->panel->{$docbar} } = $doc if $doc->panel->{$docbar};
-		$document{'editor'}{$doc->editor->{$docbar}} = $doc if $doc->editor->{$docbar};
-	}
+	$document{'panel'}{$_} = $doc for values $doc->panel;
+	$document{'editor'}{$_} = $doc for values $doc->editor;
 	$document{'file'}{$doc->file_path} = $doc if $doc->file_path;
 	$lowest_free_ID++;
 }
 	Kephra::Log::warning('need a ' . DOC_CLASS . ' thats in stash, not $doc!', 1)
 		unless ref $doc and $doc->isa( DOC_CLASS );
 	delete $document{'ID'}{$doc->ID};
-	delete $document{'panel'}{$doc->panel}    if $doc->panel;
-	delete $document{'editor'}{$doc->editor}  if $doc->editor;
+#	delete $document{'panel'}{$_}    for values $doc->panel;
+#	delete $document{'editor'}{$_}   for values $doc->editor;
 	delete $document{'file'}{$doc->file_path} if $doc->file_path;
 #say "removed $doc ", scalar keys %{$document{'ID'}}, ' ',scalar keys %{$document{'file'}}; 
-
 }
 
-
 sub find {
 	my $any = shift;
 	Kephra::Log::warning("need a parameter!", 1) unless defined $any and $any;