mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
Fix syntax errors from ui_link conversion
This commit is contained in:
@@ -44,7 +44,8 @@ if (@exps) {
|
||||
$ccount = 0;
|
||||
foreach $c (@cl) {
|
||||
$dirs .= " | " if ($ccount++);
|
||||
$dirs .= &ui_link("edit_export.cgi?idx=$c->{'index'}",&describe_host($c->{'host'}))\n";
|
||||
$dirs .= &ui_link("edit_export.cgi?idx=$c->{'index'}",
|
||||
&describe_host($c->{'host'})),"\n";
|
||||
if (!$c->{'active'}) {
|
||||
$dirs .= "<font color=#ff0000>(".
|
||||
$text{'index_inactive'}.")</font>\n"
|
||||
@@ -56,14 +57,14 @@ if (@exps) {
|
||||
print &ui_columns_end();
|
||||
print &select_all_link("d"),"\n";
|
||||
print &select_invert_link("d"),"\n";
|
||||
print "<a href=\"edit_export.cgi?new=1\">$text{'index_add'}</a> <br>\n";
|
||||
print &ui_link("edit_export.cgi?new=1", $text{'index_add'}),"<br>\n";
|
||||
print &ui_form_end([ [ "delete", $text{'index_delete'} ],
|
||||
[ "disable", $text{'index_disable'} ],
|
||||
[ "enable", $text{'index_enable'} ] ]);
|
||||
}
|
||||
else {
|
||||
print "<b>$text{'index_none'}</b> <p>\n";
|
||||
print "<a href=\"edit_export.cgi?new=1\">$text{'index_add'}</a> <p>\n";
|
||||
print &ui_link("edit_export.cgi?new=1", $text{'index_add'}),"<p>\n";
|
||||
}
|
||||
|
||||
print "<hr>\n";
|
||||
|
||||
@@ -20,7 +20,8 @@ if (@secs) {
|
||||
$desc = &text('secrets_mod', "<tt>".substr($1, 0, 20)."..</tt>");
|
||||
}
|
||||
print &ui_columns_row([
|
||||
&ui_link("edit_secret.cgi?idx=$s->{'idx'}","($s->{'name'} || $text{'secrets_any'})"),
|
||||
&ui_link("edit_secret.cgi?idx=$s->{'idx'}",
|
||||
$s->{'name'} || $text{'secrets_any'}),
|
||||
$text{'secrets_'.lc($s->{'type'})} || uc($s->{'type'}),
|
||||
$desc,
|
||||
]);
|
||||
@@ -30,9 +31,9 @@ if (@secs) {
|
||||
else {
|
||||
print "<b>$text{'secrets_none'}</b><p>\n";
|
||||
}
|
||||
print &ui_link("edit_secret.cgi?new=1&type=psk",$text{'secrets_newpsk'})\n";
|
||||
print &ui_link("edit_secret.cgi?new=1&type=psk",$text{'secrets_newpsk'}),"\n";
|
||||
print " " x 2;
|
||||
print &ui_link("edit_secret.cgi?new=1&type=rsa",$text{'secrets_newrsa'})\n";
|
||||
print &ui_link("edit_secret.cgi?new=1&type=rsa",$text{'secrets_newrsa'}),"\n";
|
||||
print "<br>\n";
|
||||
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
|
||||
@@ -54,7 +54,8 @@ else {
|
||||
|
||||
# Show sub-objects
|
||||
foreach $dn (sort { lc($a->dn()) cmp lc($b->dn()) } $rv->all_entries) {
|
||||
print &ui_link("browser.cgi?base=".&urlize($dn->dn())","&html_escape($dn->dn())")<br>\n";
|
||||
print &ui_link("browser.cgi?base=".&urlize($dn->dn()),
|
||||
&html_escape($dn->dn())),"<br>\n";
|
||||
}
|
||||
if (!$rv->all_entries) {
|
||||
print "<i>$text{'browser_none'}</i><br>\n";
|
||||
|
||||
@@ -46,11 +46,11 @@ foreach $i (@images) {
|
||||
$default && $default eq $l ? "<b>$l</b>" : $l);
|
||||
push(@links, "edit_$n.cgi?idx=$i->{'index'}");
|
||||
}
|
||||
print &ui_link("edit_image.cgi?new=1",$text{'index_addk'}) \n";
|
||||
print &ui_link("edit_other.cgi?new=1",$text{'index_addp'})<br>\n";
|
||||
print &ui_link("edit_image.cgi?new=1",$text{'index_addk'})," \n";
|
||||
print &ui_link("edit_other.cgi?new=1",$text{'index_addp'}),"<br>\n";
|
||||
&icons_table(\@links, \@titles, \@icons, 4);
|
||||
print &ui_link("edit_image.cgi?new=1",$text{'index_addk'}) \n";
|
||||
print &ui_link("edit_other.cgi?new=1",$text{'index_addp'})<p>\n";
|
||||
print &ui_link("edit_image.cgi?new=1",$text{'index_addk'})," \n";
|
||||
print &ui_link("edit_other.cgi?new=1",$text{'index_addp'}),"<p>\n";
|
||||
print &ui_hr();
|
||||
|
||||
print "<table width=100%>\n";
|
||||
|
||||
@@ -16,7 +16,8 @@ if (@conns) {
|
||||
print $text{'conns_desc'},"<p>\n";
|
||||
my @grid;
|
||||
@grid = map { &ui_checkbox("d", $_)." ".
|
||||
&ui_link("view_conn.cgi?name=".&urlize($_)","&html_escape($_)") } @conns;
|
||||
&ui_link("view_conn.cgi?name=".&urlize($_),
|
||||
&html_escape($_)) } @conns;
|
||||
print &ui_form_start("mass_conns.cgi", "post");
|
||||
my @links = ( &select_all_link("d"),
|
||||
&select_invert_link("d") );
|
||||
|
||||
@@ -19,7 +19,8 @@ if (keys %$playtime) {
|
||||
foreach my $u (sort { $playtime->{$b} <=> $playtime->{$a} }
|
||||
keys %$playtime) {
|
||||
print &ui_columns_row([
|
||||
&ui_link("view_conn.cgi?name=".&urlize($u)","&html_escape($u)"),
|
||||
&ui_link("view_conn.cgi?name=".&urlize($u),
|
||||
&html_escape($u)),
|
||||
&nice_seconds($playtime->{$u}),
|
||||
&nice_seconds($limit_playtime->{$u} || 0),
|
||||
&indexof($u, @conns) >= 0 ?
|
||||
|
||||
@@ -38,16 +38,16 @@ if (@qfiles) {
|
||||
$e = $in{'start'} + $config{'perpage'} - 1;
|
||||
$e = @qfiles-1 if ($e >= @qfiles);
|
||||
if ($s) {
|
||||
printf &ui_link("mailq.cgi?start=%d","%s")\n",
|
||||
$s - $config{'perpage'},
|
||||
"<img src=/images/left.gif border=0 align=middle>";
|
||||
print &ui_link("mailq.cgi?start=".
|
||||
($s - $config{'perpage'}),
|
||||
"<img src=/images/left.gif border=0 align=middle>");
|
||||
}
|
||||
print "<font size=+1>",&text('mail_pos', $s+1, $e+1,
|
||||
scalar(@qfiles)),"</font>\n";
|
||||
if ($e < @qfiles-1) {
|
||||
printf &ui_link("mailq.cgi?start=%d","%s")\n",
|
||||
$s + $config{'perpage'},
|
||||
"<img src=/images/right.gif border=0 align=middle>";
|
||||
print &ui_link("mailq.cgi?start=".
|
||||
($s + $config{'perpage'}),
|
||||
"<img src=/images/right.gif border=0 align=middle>");
|
||||
}
|
||||
print "</center>\n";
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ else {
|
||||
else {
|
||||
print "<b>$text{'index_none'}</b><p>\n";
|
||||
}
|
||||
print &ui_link("edit.cgi?new=1",$text{'index_add'})<p>\n";
|
||||
print &ui_link("edit.cgi?new=1",$text{'index_add'}),"<p>\n";
|
||||
|
||||
print &ui_hr();
|
||||
print "<table width=100%>\n";
|
||||
|
||||
@@ -7,13 +7,14 @@ $access{'auths'} || &error($text{'auths_ecannot'});
|
||||
|
||||
$auths = &list_auth_attrs();
|
||||
if (@$auths) {
|
||||
print &ui_link("edit_auth.cgi?new=1",$text{'auths_add'})<br>\n";
|
||||
print &ui_link("edit_auth.cgi?new=1",$text{'auths_add'}),"<br>\n";
|
||||
print &ui_columns_start(
|
||||
[ $text{'auths_name'},
|
||||
$text{'auths_desc'} ]);
|
||||
foreach $a (sort { $a->{'name'} cmp $b->{'name'} } @$auths) {
|
||||
print &ui_columns_row(
|
||||
[ &ui_link("edit_auth.cgi?idx=$a->{'index'}",$a->{'name'}),
|
||||
[ &ui_link("edit_auth.cgi?idx=$a->{'index'}",
|
||||
$a->{'name'}),
|
||||
&rbac_help_link($a, $a->{'short'} || $a->{'desc'}),
|
||||
]);
|
||||
}
|
||||
@@ -22,7 +23,7 @@ if (@$auths) {
|
||||
else {
|
||||
print "<b>$text{'auths_none'}</b><p>\n";
|
||||
}
|
||||
print &ui_link("edit_auth.cgi?new=1",$text{'auths_add'})<br>\n";
|
||||
print &ui_link("edit_auth.cgi?new=1",$text{'auths_add'}),"<br>\n";
|
||||
|
||||
&ui_print_footer("", $text{"index_return"});
|
||||
|
||||
|
||||
@@ -7,14 +7,15 @@ $access{'execs'} || &error($text{'execs_ecannot'});
|
||||
|
||||
$execs = &list_exec_attrs();
|
||||
if (@$execs) {
|
||||
print &ui_link("edit_exec.cgi?new=1",$text{'execs_add'})<br>\n";
|
||||
print &ui_link("edit_exec.cgi?new=1",$text{'execs_add'}),"<br>\n";
|
||||
print &ui_columns_start(
|
||||
[ $text{'execs_name'},
|
||||
$text{'execs_policy'},
|
||||
$text{'execs_id'} ]);
|
||||
foreach $e (sort { $a->{'name'} cmp $b->{'name'} } @$execs) {
|
||||
print &ui_columns_row(
|
||||
[ &ui_link("edit_exec.cgi?idx=$e->{'index'}",$e->{'name'}),
|
||||
[ &ui_link("edit_exec.cgi?idx=$e->{'index'}",
|
||||
$e->{'name'}),
|
||||
$text{'execs_p'.$e->{'policy'}},
|
||||
$e->{'id'} eq '*' ? $text{'execs_all'} : $e->{'id'},
|
||||
]);
|
||||
@@ -24,7 +25,7 @@ if (@$execs) {
|
||||
else {
|
||||
print "<b>$text{'execs_none'}</b><p>\n";
|
||||
}
|
||||
print &ui_link("edit_exec.cgi?new=1",$text{'execs_add'})<br>\n";
|
||||
print &ui_link("edit_exec.cgi?new=1",$text{'execs_add'}),"<br>\n";
|
||||
|
||||
&ui_print_footer("", $text{"index_return"});
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ $access{'profs'} || &error($text{'profs_ecannot'});
|
||||
|
||||
$profs = &list_prof_attrs();
|
||||
if (@$profs) {
|
||||
print &ui_link("edit_prof.cgi?new=1",$text{'profs_add'})<br>\n"
|
||||
print &ui_link("edit_prof.cgi?new=1",$text{'profs_add'}),"<br>\n"
|
||||
if ($access{'profs'} == 1);
|
||||
print &ui_columns_start(
|
||||
[ $text{'profs_name'},
|
||||
@@ -16,7 +16,8 @@ if (@$profs) {
|
||||
foreach $p (sort { $a->{'name'} cmp $b->{'name'} } @$profs) {
|
||||
print &ui_columns_row(
|
||||
[ $access{'profs'} == 1 ?
|
||||
&ui_link("edit_prof.cgi?idx=$p->{'index'}",$p->{'name'}) :
|
||||
&ui_link("edit_prof.cgi?idx=$p->{'index'}",
|
||||
$p->{'name'}) :
|
||||
$p->{'name'},
|
||||
&rbac_help_link($p, $p->{'desc'}),
|
||||
&nice_comma_list($p->{'attr'}->{'auths'}),
|
||||
@@ -27,7 +28,7 @@ if (@$profs) {
|
||||
else {
|
||||
print "<b>$text{'profs_none'}</b><p>\n";
|
||||
}
|
||||
print &ui_link("edit_prof.cgi?new=1",$text{'profs_add'})<br>\n"
|
||||
print &ui_link("edit_prof.cgi?new=1",$text{'profs_add'}),"<br>\n"
|
||||
if ($access{'profs'} == 1);
|
||||
|
||||
&ui_print_footer("", $text{"index_return"});
|
||||
|
||||
@@ -8,7 +8,7 @@ require './rbac-lib.pl';
|
||||
$projects = &list_projects();
|
||||
@canprojects = @$projects;
|
||||
if (@canprojects) {
|
||||
print &ui_link("edit_project.cgi?new=1",$text{'projects_add'})<br>\n";
|
||||
print &ui_link("edit_project.cgi?new=1",$text{'projects_add'}),"<br>\n";
|
||||
print &ui_columns_start(
|
||||
[ $text{'projects_name'},
|
||||
$text{'projects_desc'},
|
||||
@@ -16,7 +16,8 @@ if (@canprojects) {
|
||||
$text{'projects_groups'} ]);
|
||||
foreach $p (sort { $a->{'name'} cmp $b->{'name'} } @canprojects) {
|
||||
print &ui_columns_row(
|
||||
[ &ui_link("edit_project.cgi?idx=$p->{'index'}",$p->{'name'}),
|
||||
[ &ui_link("edit_project.cgi?idx=$p->{'index'}",
|
||||
$p->{'name'}),
|
||||
$p->{'desc'},
|
||||
&nice_user_list("users", $p->{'users'}),
|
||||
&nice_user_list("groups", $p->{'groups'}),
|
||||
@@ -27,7 +28,7 @@ if (@canprojects) {
|
||||
else {
|
||||
print "<b>$text{'projects_none'}</b><p>\n";
|
||||
}
|
||||
print &ui_link("edit_project.cgi?new=1",$text{'projects_add'})<br>\n";
|
||||
print &ui_link("edit_project.cgi?new=1",$text{'projects_add'}),"<br>\n";
|
||||
|
||||
&ui_print_footer("", $text{"index_return"});
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ require './rbac-lib.pl';
|
||||
$users = &list_user_attrs();
|
||||
@canusers = grep { &can_edit_user($_) } @$users;
|
||||
if (@canusers) {
|
||||
print &ui_link("edit_user.cgi?new=1",$text{'users_add'})<br>\n";
|
||||
print &ui_link("edit_user.cgi?new=1",$text{'users_add'}),"<br>\n";
|
||||
print &ui_columns_start(
|
||||
[ $text{'users_user'},
|
||||
$text{'users_type'},
|
||||
@@ -32,6 +32,6 @@ if (@canusers) {
|
||||
else {
|
||||
print "<b>$text{'users_none'}</b><p>\n";
|
||||
}
|
||||
print &ui_link("edit_user.cgi?new=1",$text{'users_add'})<br>\n";
|
||||
print &ui_link("edit_user.cgi?new=1",$text{'users_add'}),"<br>\n";
|
||||
|
||||
&ui_print_footer("", $text{"index_return"});
|
||||
|
||||
@@ -42,7 +42,8 @@ elsif ($in{'run'}) {
|
||||
print "</pre>\n";
|
||||
if ($rv && -r "$lconf->{'dir'}/index.html") {
|
||||
print "<b>$text{'gen_done'}</b><p>\n";
|
||||
print &ui_link("view_log.cgi/".&urlize(urlize($in{'file'})).$text{'gen_view'}."<p>\n";
|
||||
print &ui_link("view_log.cgi/".&urlize(&urlize($in{'file'})),
|
||||
$text{'gen_view'})."<p>\n";
|
||||
}
|
||||
elsif ($rv) {
|
||||
print "<b>$text{'gen_nothing'}</b><p>\n";
|
||||
|
||||
Reference in New Issue
Block a user