Changeset 117 for trunk/dns.cgi
- Timestamp:
- 09/01/11 15:55:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r114 r117 99 99 my $footer = HTML::Template->new(filename => "$templatedir/footer.tmpl"); 100 100 101 ## set up "URL to self" 102 # @#$%@%@#% XHTML - & in a URL must be escaped. >:( 103 my $uri_self = $ENV{REQUEST_URI}; 104 $uri_self =~ s/\&([a-z])/\&\;$1/g; 105 106 # le sigh. and we need to strip any previous action 107 $uri_self =~ s/\&action=[^&]+//g; 108 109 # and search filter options. these get stored in the session, but discarded 110 # as soon as you switch to a different page. 111 ##fixme: think about retaining these on a per-page basis, as well as offset; same as the sort-order bits 112 no warnings qw(uninitialized); 113 $uri_self =~ s/\&startwith=[a-z09-]*(\&)?/$1/g; 114 $uri_self =~ s/\&searchsubs=[a-z09-]*(\&)?/$1/g; 115 $uri_self =~ s/\&filter=[a-z09-]*(\&)?/$1/g; 116 use warnings qw(uninitialized); 117 101 118 # default 102 119 #my $perpage = 15; … … 160 177 # fiddle session-stored group data 161 178 # magic incantation to... uhhh... 179 180 # ... and the "change group" bits... 181 $uri_self =~ s/\&group=[^&]*//g; 182 162 183 $session->param('curgroup', $webvar{group}); 163 184 $curgroup = ($webvar{group} ? $webvar{group} : $session->param('curgroup')); … … 1212 1233 $page->param(groupname => groupName($dbh,$curgroup)); 1213 1234 $page->param(logingrp => groupName($dbh,$logingroup)); 1235 $page->param(logingrp_num => $logingroup); 1214 1236 1215 1237 $page->param(mayimport => $permissions{admin} || $permissions{domain_create}); … … 1225 1247 fill_grouplist("grouplist"); 1226 1248 1227 ## set up "URL to self"1228 # @#$%@%@#% XHTML - & in a URL must be escaped. >:(1229 my $tmp_ruri = $ENV{REQUEST_URI};1230 $tmp_ruri =~ s/\&([a-z])/\&\;$1/g;1231 1232 # le sigh. and we need to strip any previous action1233 $tmp_ruri =~ s/\&action=[^&]+//g;1234 1235 # and search filter options. these get stored in the session, but discarded1236 # as soon as you switch to a different page.1237 ##fixme: think about retaining these on a per-page basis, as well as offset; same as the sort-order bits1238 no warnings qw(uninitialized);1239 $tmp_ruri =~ s/\&startwith=[a-z09-]*(\&)?/$1/g;1240 $tmp_ruri =~ s/\&searchsubs=[a-z09-]*(\&)?/$1/g;1241 $tmp_ruri =~ s/\&filter=[a-z09-]*(\&)?/$1/g;1242 use warnings qw(uninitialized);1243 1244 1249 # fill in the URL-to-self 1245 $page->param(whereami => $ tmp_ruri);1250 $page->param(whereami => $uri_self); 1246 1251 } 1247 1252 … … 1292 1297 my %row; 1293 1298 $row{grpname} = groupName($dbh,$_); 1299 $row{grpnum} = $_; 1300 $row{whereami} = $uri_self; 1294 1301 # for all that HTML::Template is supposed to keep the HTML out of the Perl, this is so much more compact... 1295 $row{grpdisp} = ($_ == $cur ? "<b>$row{grpname}</b>" : $row{grpname}); 1302 # $row{grpdisp} = ($_ == $cur ? "<b>$row{grpname}</b>" : $row{grpname}); 1303 $row{curgrp} = ($_ == $cur); 1304 $row{expanded} = isParent($dbh, $_, 'group', $cur, 'group'); 1305 $row{expanded} = 1 if $_ == $cur; 1296 1306 $row{subs} = fill_grptree($_,$cur,$indent.' '); 1297 1307 $row{indent} = $indent; … … 1691 1701 my $childlist = join(',',@childgroups); 1692 1702 1703 ##fixme: need to reorder list so that we can display a pseudotree in group dropdowns 1704 1693 1705 # weesa gonna discard parent_group_id for now 1694 1706 my $sth = $dbh->prepare("SELECT group_id,parent_group_id,group_name FROM groups ".
Note:
See TracChangeset
for help on using the changeset viewer.