Sure, i was beeing lazy :p

--- functions.php       2005-02-15 02:26:35.000000000 +0000
+++ functions.php.1     2005-02-15 02:26:26.000000000 +0000
@@ -624,6 +624,8 @@
 
 function parse_dataline($line) {
 
+    $out_array = NULL;
+
     // Strip first char
     $stripped = ereg_replace("^.", "", $line);
     $array = explode(":", $stripped);


--- domains.php 2005-02-09 19:13:06.000000000 +0000
+++ domains.php.1       2005-02-15 02:30:48.000000000 +0000
@@ -415,7 +415,7 @@
     $db->Execute($q) or die($db->ErrorMsg());
     $q = "delete from log where domain_id='".$_REQUEST['domain_id']."'";
     $db->Execute($q) or die($db->ErrorMsg());
-    $message = "Domain $domain deleted successfully";
+    $message = "Domain ".$_REQUEST['domain']." deleted successfully";
     header("Location:
$base_url&mode=domains&message=".urlencode($message));
     exit;
 
@@ -526,12 +526,12 @@
 
     $counter = 0;
     // default SOA and NS
-    if($_REQUEST['default_soa'] == "on") {
+    if(isset($_REQUEST['default_soa'])) {
         $q = "SELECT host,val FROM default_records WHERE type='S'";
         $result = $db->Execute($q) or die($db->ErrorMsg());
         $def_soa = $result->FetchRow();
     }
-    if($_REQUEST['default_ns'] == "on") {
+    if(isset($_REQUEST['default_ns'])) {
         $q = "SELECT host,val,distance,ttl FROM default_records WHERE
type='N'";
         $result = $db->Execute($q) or die($db->ErrorMsg());
         while (!$result->EOF && $l = $result->FetchRow()) {
@@ -581,11 +581,11 @@
             if($line_key != 'domain' && !ereg("^#", $value)) {
                 $result = parse_dataline($value);
                 if(is_array($result)) {
-                   if (($_REQUEST['default_soa']=="on") &&
($result['type']=='S')) {
+                   if (isset($_REQUEST['default_soa']) &&
($result['type']=='S')) {
                     $result['val']=$def_soa['val'];
                     $result['host']=$def_soa['host'];
                    }
-                   if (($_REQUEST['default_ns']!="on") ||
($result['type']!='N')) {
+                   if (!isset($_REQUEST['default_ns']) ||
($result['type']!='N')) {
                 $q = "insert into records 
                          (domain_id,host,type,val,distance,ttl) 
                          values(
@@ -600,7 +600,7 @@
                 }
             }
        }
-        if ($_REQUEST['default_ns']=="on") {
+        if (isset($_REQUEST['default_ns'])) {
         $counter=0;
          while ($ns = $def_ns[$counter]) {
          $host = ereg_replace("DOMAIN", $domain, $ns['host']);

 

> -----Original Message-----
> From: Bill Shupp [mailto:[EMAIL PROTECTED] 
> Sent: ter�a-feira, 15 de Fevereiro de 2005 2:21
> To: [email protected]
> Subject: Re: [users] VegaDNS 1.1.0 - development branch
> 
> Rodrigo Borges Pereira wrote:
> 
> >Hi Bill,
> >
> >Found some glitches when importing domains. Here's my code 
> modifications:
> >
> >  
> >
> 
> I don't quite follow the diff.  Can you do a diff -u, and 
> attach it, or maybe post it?  That will make it easier to 
> read as well.
> 
> Thanks!
> 
> Bill
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to