read database name from config
[irspy-moved-to-github.git] / web / htdocs / details / edit.mc
index be35470..3ee62b4 100644 (file)
@@ -32,7 +32,8 @@ duplicate ID.
 die "op = new but id defined" if $op eq "new" && defined $id;
 die "op != new but id undefined" if $op ne "new" && !defined $id;
 
-my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1", 0,
+my $db = ZOOM::IRSpy::connect_to_registry();
+my $conn = new ZOOM::Connection($db, 0,
                                user => "admin", password => "fruitbat",
                                elementSetName => "zeerex");
 
@@ -352,7 +353,7 @@ if ($update && @changedFields) {
                                             "e:metaInfo/e:dateModified" ] },
                                { dateModified => isodate(time()) });
     die "Didn't set dateModified!" if !@x;
-    ZOOM::IRSpy::_really_rewrite_record($conn, $xc->getContextNode(),
+    ZOOM::IRSpy::_rewrite_zeerex_record($conn, $xc->getContextNode(),
                                        $op eq "edit" ? $id : undef);
 }