Changeset 516 for trunk/dns.cgi


Ignore:
Timestamp:
05/24/13 16:58:49 (11 years ago)
Author:
Kris Deugau
Message:

/trunk

Tune up location/view handling on zone add. See #10.

Domains and revzones added with a location specified will actually use
that location. Documentation note: Zones specifying a location on
creation will only be visible to that location, because the SOA record
will be created with that location. A zone should be created with no
location set if records must be visible across multiple locations, or
publicly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r513 r516  
    394394  $webvar{group} = $curgroup if !$webvar{group};
    395395  fill_grouplist("grouplist", $webvar{group});
    396   fill_loclist();
     396  fill_loclist($curgroup, $webvar{defloc} ? $webvar{defloc} : '');
    397397
    398398  if ($session->param('add_failed')) {
     
    420420  $webvar{makeactive} = 0 if !defined($webvar{makeactive});
    421421
    422   my ($code,$msg) = $dnsdb->addDomain($webvar{domain}, $webvar{group}, ($webvar{makeactive} eq 'on' ? 1 : 0));
     422  my ($code,$msg) = $dnsdb->addDomain($webvar{domain}, $webvar{group}, ($webvar{makeactive} eq 'on' ? 1 : 0),
     423        $webvar{defloc});
    423424
    424425  if ($code eq 'OK') {
     
    430431    $session->param('add_failed', 1);
    431432##fixme:  domain a security risk for XSS?
    432     changepage(page => "newdomain", domain => $webvar{domain}, errmsg => $msg,
    433         makeactive => ($webvar{makeactive} ? 'y' : 'n'), group => $webvar{group});
     433    changepage(page => "newdomain", errmsg => $msg, domain => $webvar{domain},
     434        group => $webvar{group}, makeactive => ($webvar{makeactive} ? 'y' : 'n'), defloc => $webvar{defloc});
    434435  }
    435436
Note: See TracChangeset for help on using the changeset viewer.