]> granicus.if.org Git - pdns/commitdiff
actually insert the comments
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 25 Apr 2014 07:28:58 +0000 (09:28 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 25 Apr 2014 07:28:58 +0000 (09:28 +0200)
pdns/zone2sql.cc

index 02cd8e07fa6d7c006abcf61bf7c50c7d17831024..544330ed5bfb5e8215c548744e101521f044ac5c 100644 (file)
@@ -188,6 +188,12 @@ static void emitRecord(const string& zoneName, const string &qname, const string
         sqlstr(qtype)<<", "<<
         sqlstr(stripDotContent(content))<<", "<<ttl<<", "<<prio<<", 0"<<
         " from domains where name="<<toLower(sqlstr(zoneName))<<";\n";
+
+      if(!recordcomment.empty()) {
+        cout<<"insert into comments (domain_id,name,type,modified_at, comment) select id, "<<toLower(sqlstr(zoneName))<<", "<<sqlstr(qtype)<<", "<<time(0)<<", "<<sqlstr(recordcomment)<<" from domains where name="<<toLower(sqlstr(zoneName))<<";\n";
+       
+      }
+
     } else
     {
       cout<<"insert into records (domain_id, name, ordername, auth, type,content,ttl,prio,disabled) select id ,"<<