Changeset 139


Ignore:
Timestamp:
10/07/11 16:01:55 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Reduce the abuse of "actions" as a form input name; make the
domain and user list status changes use their own custom input
names to reduce the mixups when checking "global" actions

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r138 r139  
    228228# hmm.  seeing problems in some possibly-not-so-corner cases.
    229229# this currently only handles "domain on", "domain off"
    230   if (defined($webvar{action})) {
    231     my $stat = domStatus($dbh,$webvar{id},$webvar{action});
     230  if (defined($webvar{domstatus})) {
     231    my $stat = domStatus($dbh,$webvar{id},$webvar{domstatus});
    232232    logaction($webvar{id}, $session->param("username"), parentID($webvar{id}, 'dom', 'group'),
    233233        "Changed ".domainName($dbh, $webvar{id})." state to ".($stat ? 'active' : 'inactive'));
     
    797797} elsif ($webvar{page} eq 'useradmin') {
    798798
    799   if (defined($webvar{action})) {
    800     userStatus($dbh,$webvar{id},$webvar{action});
     799  if (defined($webvar{userstatus})) {
     800    userStatus($dbh,$webvar{id},$webvar{userstatus});
    801801  }
    802802
  • trunk/templates/domlist.tmpl

    r100 r139  
    3838        <td><TMPL_VAR name=status></td>
    3939        <td><TMPL_VAR name=group></td>
    40 <TMPL_IF domain_edit>   <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=domlist<TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;id=<TMPL_VAR NAME=domainid>&amp;action=<TMPL_IF NAME=mkactive>domon<TMPL_ELSE>domoff</TMPL_IF>"><TMPL_IF NAME=mkactive>activate<TMPL_ELSE>deactivate</TMPL_IF></a></td></TMPL_IF>
     40<TMPL_IF domain_edit>   <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=domlist<TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;id=<TMPL_VAR NAME=domainid>&amp;domstatus=<TMPL_IF NAME=mkactive>domon<TMPL_ELSE>domoff</TMPL_IF>"><TMPL_IF NAME=mkactive>activate<TMPL_ELSE>deactivate</TMPL_IF></a></td></TMPL_IF>
    4141<TMPL_IF domain_delete> <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=deldom&amp;id=<TMPL_VAR NAME=domainid>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td></TMPL_IF>
    4242</tr>
  • trunk/templates/useradmin.tmpl

    r100 r139  
    3636        <td><TMPL_VAR name=usertype></td>
    3737        <td><TMPL_VAR name=usergroup></td>
    38         <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=useradmin<TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;id=<TMPL_VAR NAME=userid>&amp;action=<TMPL_IF NAME=active>useroff<TMPL_ELSE>useron</TMPL_IF>"><TMPL_IF NAME=active>enabled<TMPL_ELSE>disabled</TMPL_IF></a></td>
     38        <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=useradmin<TMPL_IF NAME=offset>&amp;offset=<TMPL_VAR NAME=offset></TMPL_IF>&amp;id=<TMPL_VAR NAME=userid>&amp;userstatus=<TMPL_IF NAME=active>useroff<TMPL_ELSE>useron</TMPL_IF>"><TMPL_IF NAME=active>enabled<TMPL_ELSE>disabled</TMPL_IF></a></td>
    3939        <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=deluser&amp;id=<TMPL_VAR NAME=userid>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td>
    4040</tr>
Note: See TracChangeset for help on using the changeset viewer.