]> wagnertech.de Git - mfinanz.git/blobdiff - scripts/migrate_menu.pl
Debug-Modus bei Kontoauszugsverbuchung ausgeschaltet
[mfinanz.git] / scripts / migrate_menu.pl
index a0cdae80d79a1f4c12538da50bad46f853c7a0d5..89e5abe17da45555dd686fe730a644512183a226 100644 (file)
@@ -64,6 +64,13 @@ sub translate_to_yaml {
       delete $item->{submenu};
     }
 
+    #sanitize those stupid menu inlinks
+    if ($item->{module} eq 'menu.pl') {
+      delete $item->{module};
+      delete $item->{action};
+      delete $item->{target};
+    }
+
     # sanitize INSTANCE_CONF
     if ($item->{INSTANCE_CONF}) {
       my $instance_conf = delete $item->{INSTANCE_CONF};
@@ -143,9 +150,9 @@ sub yaml_dump {
     my $first = 0;
     for my $key (@order) {
       next unless exists $node->{$key};
-      $yaml .= ($first++ ? '  ' : '- ') . $key . ": ";
+      $yaml .= ($first++ ? '  ' : '- ') . $key . ":";
       if (!ref $node->{$key}) {
-        $yaml .= $node->{$key} . "\n";
+        $yaml .= ' ' . $node->{$key} . "\n";
       } else {
         $yaml .= "\n";
         for ('action', grep !/^action$/, keys %{ $node->{$key} }) {