Changeset 383 for trunk/dns.cgi
- Timestamp:
- 08/13/12 17:26:35 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r381 r383 346 346 $webvar{group} = $curgroup if !$webvar{group}; 347 347 fill_grouplist("grouplist", $webvar{group}); 348 fill_loclist(); 348 349 349 350 if ($session->param('add_failed')) { … … 630 631 631 632 fill_recdata(); 633 634 if ($webvar{defrec} eq 'n') { 635 my $defloc = getZoneLocation($dbh, $webvar{revrec}, $webvar{parentid}); 636 fill_loclist($curgroup, $defloc); 637 } 632 638 633 639 } elsif ($webvar{recact} eq 'add') { … … 663 669 $page->param(id => $webvar{id}); 664 670 fill_recdata(); # populate the form... er, mostly. 671 if ($webvar{defrec} eq 'n') { 672 fill_loclist($curgroup, $webvar{location}); 673 } 665 674 } 666 675 … … 682 691 $page->param(ttl => $recdata->{ttl}); 683 692 $page->param(typelist => getTypelist($dbh, $webvar{revrec}, $recdata->{type})); 693 694 if ($webvar{defrec} eq 'n') { 695 fill_loclist($curgroup, $recdata->{location}); 696 } 684 697 685 698 } elsif ($webvar{recact} eq 'update') { … … 1638 1651 $page->param(mayrdns => 1); 1639 1652 1640 $page->param(mayloc => ($permissions{admin} || $permissions{loc _view}));1653 $page->param(mayloc => ($permissions{admin} || $permissions{location_view})); 1641 1654 1642 1655 $page->param(maydefrec => $permissions{admin}); … … 1848 1861 $rec->{record_edit} = ($permissions{admin} || $permissions{record_edit}); 1849 1862 $rec->{record_delete} = ($permissions{admin} || $permissions{record_delete}); 1863 $rec->{locname} = '' unless ($permissions{admin} || $permissions{location_view}); 1850 1864 } 1851 1865 $page->param(reclist => $foo2); … … 2101 2115 2102 2116 2117 sub fill_loclist { 2118 my $cur = shift || $curgroup; 2119 my $defloc = shift || ''; 2120 2121 return unless ($permissions{admin} || $permissions{location_view}); 2122 2123 my $loclist = getLocDropdown($dbh, $cur, $defloc); 2124 2125 $page->param(location_view => ($permissions{admin} || $permissions{location_view})); 2126 $page->param(loclist => $loclist); 2127 } # end fill_loclist() 2128 2129 2103 2130 sub list_users { 2104 2131
Note:
See TracChangeset
for help on using the changeset viewer.