From 13c7c5accc09aa5441a551cb96eb7a1d3763a8e0 Mon Sep 17 00:00:00 2001 From: Nawawi Jamili Date: Sun, 15 Dec 2013 00:51:19 +0800 Subject: [PATCH 1/6] Malaysian translation update --- apache/lang/ms_MY | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/apache/lang/ms_MY b/apache/lang/ms_MY index 67a0e529b..8868dcfed 100644 --- a/apache/lang/ms_MY +++ b/apache/lang/ms_MY @@ -607,12 +607,52 @@ mod_apachessl_ecacheport=Ralat pada Nombor port atau fail soket mod_apachessl_ecacherundir=Hilang direktori dimana gcache dijalankan dalam mod_apachessl_ecdnfile=Hilang fail terhadap pelanggan DN yang diperiksa mod_apachessl_eramdomfileb=Bait mestilah integer +mod_apachessl_eramdomfilef=Fail/Soket untuk beban beberapa rawak hilang mod_apachessl_esesstimeout=Masa dalam saat mestilah integer mod_apachessl_exportcert=Sijil pelanggan eksport dan rantaian sijil di belakang mereka untuk CGIs +mod_apachessl_forcessl=Paksa capaian SSL/notSSL? +mod_apachessl_notssl=Nafikan capaian SSL +mod_apachessl_nov2=Nyah-aktifkan SSL versi 2 +mod_apachessl_ramdomfile=Fail/Soket untuk beban beberapa rawak +mod_apachessl_ramdomfilee=Soket +mod_apachessl_ramdomfilef=Fail +mod_apachessl_sesstimeout=Masa dalam saat yang kunci sesi akan dicache +mod_auth_auth=Pengesahan fail teks +mod_auth_basic_dbm=Pangkalan data DBM +mod_auth_basic_file=Fail teks +mod_auth_dbm_auth=Pengesahan fail DBM +mod_auth_dbm_default=Format lalai DBM +mod_auth_dbm_egfile=Nama fail grup DBM tidak sah +mod_auth_dbm_eufile=Nama fail pengguna DBM tidak sah +mod_auth_dbm_gfile=Fail grup DBM +mod_auth_dbm_gtype=Jenis grup pangkalan data DBM +mod_auth_dbm_type=Jenis pangkalan data DBM +mod_auth_dbm_ufile=Fail pengguna DBM +mod_auth_egfile=Nama fail teks grup tidak sah +mod_auth_eufile=Nama fail teks pengguna tidak sah +mod_auth_gedit=Sunting grup +mod_auth_gfile=Fail teks grup +mod_auth_uedit=Sunting pengguna +mod_auth_ufile=Fail teks pengguna +mod_autoindex_asc=Menaik +mod_autoindex_date=Tarikh +mod_autoindex_default=Lalai +mod_autoindex_desc=Penerangan +mod_autoindex_descend=Menurun +mod_autoindex_name=Nama +mod_autoindex_size=Saiz +mod_autoindex_sort=Indeks direktori disusun mengikut +mod_band_all=Semua +mod_band_bandwidth=Had jalur lebar klien +mod_band_bw=Had (bait/saat) +mod_band_client=Untuk klien +mod_band_ebw='$1' bukanlah had jalur lebar yang sah mod_band_ent=IP atau domain mod_band_size=Saiz fail maksimum mod_cern_meta_default=Lalai mod_cern_meta_default2=Lalai +mod_cgi_default=Lalai +mod_cgi_none=Tiada mod_env_clear=Bersihkan mod_env_default=Lalai mod_env_evalue='$1' bukanlah nilai pembolehubah yang sah @@ -667,6 +707,7 @@ mod_mime_clangs=Bahasa kandungan mod_mime_default=Lalai mod_mime_deflang=Fail bahasa lalai mod_mime_enc=Pengekodan +mod_mime_lang=Bahasa mod_mime_magic_none=Tiada mod_mime_none=Tiada mod_mime_type=Jenis @@ -677,6 +718,7 @@ mod_php_value_header=Nilai mod_proxy_all=Semua mod_proxy_default=Lalai mod_proxy_domain=Domain +mod_ssl_default=Lalai mod_ssl_proto=Protokol SSL mod_ssl_req=Diperlukan mod_userdir_default=Lalai From 764bad68f380eaeb2fb4b446cb8522b88b55e10b Mon Sep 17 00:00:00 2001 From: Nawawi Jamili Date: Sun, 15 Dec 2013 01:20:48 +0800 Subject: [PATCH 2/6] fix typo that cause error --- dhcpd/index.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dhcpd/index.cgi b/dhcpd/index.cgi index 4f5eed16a..8f97785c7 100755 --- a/dhcpd/index.cgi +++ b/dhcpd/index.cgi @@ -445,7 +445,7 @@ if ($config{'dhcpd_version'} >= 3 && $access{'zones'}) { @zones = sort { $a->{'values'}->[0] <=> $b->{'values'}->[0] } @zones; if (@zones) { # display zones - print &ui_link("edit_zones.cgi?new=1",$text{'index_addzone'})."  "\n" if $access{'c_sub'}; + print &ui_link("edit_zones.cgi?new=1",$text{'index_addzone'})."  \n" if $access{'c_sub'}; foreach $z (@zones) { # print "ZONE: $z->{'value'}
"; push(@zlinks, "edit_zones.cgi?idx=$z->{'index'}"); @@ -464,7 +464,7 @@ if ($config{'dhcpd_version'} >= 3 && $access{'zones'}) { else { print "$text{'index_nozones'}

\n"; } - print &ui_link("edit_zones.cgi?new=1",$text{'index_addzone'})."  "\n" if $access{'c_sub'}; + print &ui_link("edit_zones.cgi?new=1",$text{'index_addzone'})."  \n" if $access{'c_sub'}; print &ui_hr(); } From 59a52bc675de897bf8b7ae42f8ec5a60c3307916 Mon Sep 17 00:00:00 2001 From: Nawawi Jamili Date: Mon, 16 Dec 2013 00:14:30 +0800 Subject: [PATCH 3/6] wrong print, should be variable --- dhcpd/index.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dhcpd/index.cgi b/dhcpd/index.cgi index 8f97785c7..186669a78 100755 --- a/dhcpd/index.cgi +++ b/dhcpd/index.cgi @@ -72,7 +72,7 @@ if ($st[7] != $config{'dhcpd_size'} || $st[9] != $config{'dhcpd_mtime'}) { # Create lookup type HTML # XXX change text, add to lookup_* -print ui_select("match", undef, [ [0,$text{'index_match0'},"selected"], +$matches = ui_select("match", undef, [ [0,$text{'index_match0'},"selected"], [1,$text{'index_match1'},""], [2,$text{'index_match2'},""] ]); From 76aba63a335c9816cd5d1cf6218ec9938742c61c Mon Sep 17 00:00:00 2001 From: Nawawi Jamili Date: Mon, 16 Dec 2013 01:21:42 +0800 Subject: [PATCH 4/6] ui-lib conversion dhcpd/edit_subnet.cgi - not finish yet --- dhcpd/edit_subnet.cgi | 98 ++++++++++++++++++++++--------------------- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/dhcpd/edit_subnet.cgi b/dhcpd/edit_subnet.cgi index e08ab9691..5dff24ddb 100755 --- a/dhcpd/edit_subnet.cgi +++ b/dhcpd/edit_subnet.cgi @@ -35,56 +35,54 @@ foreach $s (&find("shared-network", $conf)) { } } -print "

\n"; -print "\n"; -print "\n"; -print "\n"; -print "
$text{'esub_tabhdr'}
\n"; +print &ui_form_start("save_subnet.cgi", "post"); +print &ui_hidden("ret",$in{'ret'}); +print &ui_table_start($text{'esub_tabhdr'}, "width=100%", 4); -print "\n"; -printf "\n", - $sub ? &html_escape($sub->{'comment'}) : ""; +print "\n"; +print ""; +print ""; -print "\n"; -printf "\n", - $sub ? $sub->{'values'}->[0] : ""; +print "\n"; +print ""; -print "\n"; -printf "\n", - $sub ? $sub->{'values'}->[2] : ""; +print "\n"; +print ""; +print ""; @range = $sub ? &find("range", $sub->{'members'}) : (); -print "\n"; +print "\n"; if (!defined($in{'ret'})) { - print "\n"; - print "\n"; + print "\n"; + print "\n"; } else { - print "{'index'}>\n"; - print "\n"; + print ""; + print "\n"; } &display_params($sconf, "subnet"); @@ -112,8 +110,8 @@ foreach $s (&find("subnet", $mems)) { @host = sort { $a->{'values'}->[0] cmp $b->{'values'}->[0] } @host; # @group = sort { @{$a->{'members'}} <=> @{$b->{'members'}} } @group; -print "\n"; -print "\n"; +print "\n"; print "\n"; -print "
$text{'esub_desc'}
$text{'esub_desc'}"; +print &ui_textbox("desc", ( $sub ? &html_escape($sub->{'comment'}) : "" ), 60); +print "
$text{'esub_naddr'}
$text{'esub_naddr'}"; +print &ui_textbox("network", ( $sub ? $sub->{'values'}->[0] : "" ), 25); +print "$text{'esub_nmask'}
$text{'esub_nmask'}"; +print &ui_textbox("netmask", ( $sub ? $sub->{'values'}->[2] : "" ), 25); +print "
$text{'esub_arange'} \n"; +print "
$text{'esub_arange'}\n"; for($i=0; $i<=@range; $i++) { $r = $range[$i]; - local $dyn = ($r->{'values'}->[0] eq "dynamic-bootp"); - printf " - \n", - $r->{'values'}->[$dyn]; - printf " \n", - $r->{'values'}->[$dyn+1]; - printf "\n", - $dyn ? "checked" : ""; - print "$text{'esub_dbooptpq'}
\n"; + my $dyn = ($r->{'values'}->[0] eq "dynamic-bootp"); + print &ui_textbox("range_low_".$i, $r->{'values'}->[$dyn], 15); + print " - "; + print &ui_textbox("range_hi_".$i, $r->{'values'}->[$dyn+1], 15); + print " "; + print &ui_checkbox("range_dyn_".$i, 1, $text{'esub_dbooptpq'}, ($dyn ? 1 : 0 ) ); } -print "
$text{'esub_shnet'}
$text{'esub_shnet'}"; + my @shn; + push(@shn, [ "", "<$text{'esub_none'}>", ( $s_parent ? "" : "selected" ) ]); + foreach $s (&find("shared-network", $conf)) { + push(@shn, [ $s->{'index'}, ( &can('rw', \%access, $s) ? $s->{'values'}->[0] : "" ), ( $s eq $s_parent ? "" : "selected" ) ]); + } + print &ui_select("parent", undef, \@shn); + print "
   
".&ui_hidden("parent",$s_parent->{'index'})."  
$text{'esub_hosts'}
$text{'esub_hosts'}$text{'esub_groups'}{'index'},$sub->{'index'}\" type=hidden>\n"; + print &ui_hidden("hosts","$h->{'index'},$sub->{'index'}"); + #print "{'index'},$sub->{'index'}\" type=hidden>\n"; } } # inaccessible groups in this subnet foreach $g (@group) { if (!&can('r', \%access, $g) && $insubn{$g} eq $sub->{'index'}) { - print "{'index'},$sub->{'index'}\" type=hidden>\n"; + print &ui_hidden("groups","$g->{'index'},$sub->{'index'}"); + #print "{'index'},$sub->{'index'}\" type=hidden>\n"; } } } -print "
\n"; -print "\n"; +print &ui_table_end(); +print &ui_hidden("sidx", $in{'sidx'}); + if (!$in{'new'}) { # Show buttons for existing subnet - print "\n"; + print &ui_hidden("idx", $in{'idx'}); print "\n"; print "\n" if &can('rw', \%access, $sub); @@ -180,7 +181,7 @@ if (!$in{'new'}) { } else { # Show create button for new subnet - print "\n"; + print &ui_hidden("new", "1"); print "\n"; } @@ -205,7 +206,8 @@ if ($config{'dhcpd_version'} >= 3 && !$in{'new'}) { "$text{'esub_pooladd'}
\n"; } -print "\n"; +print &ui_form_end(); + if ($in{'ret'} eq "shared") { &ui_print_footer("edit_shared.cgi?idx=$in{'sidx'}", $text{'esub_retshar'}); } From 8f6e9cec967c122da82db08a8fa57ca9a92d4f49 Mon Sep 17 00:00:00 2001 From: Nawawi Jamili Date: Mon, 16 Dec 2013 03:26:08 +0800 Subject: [PATCH 5/6] ui-lib conversion dhcpd/edit_shared.cgi - not finish yet --- dhcpd/edit_shared.cgi | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/dhcpd/edit_shared.cgi b/dhcpd/edit_shared.cgi index 295e48013..bfa5018f0 100755 --- a/dhcpd/edit_shared.cgi +++ b/dhcpd/edit_shared.cgi @@ -23,23 +23,23 @@ else { # display &ui_print_header(undef, $in{'new'} ? $text{'esh_crheader'} : $text{'esh_eheader'}, ""); +print &ui_form_start("save_shared.cgi", "post"); +print &ui_table_start($text{'esh_tabhdr'}, "width=100%", 4); -print "
\n"; -print "
\n"; -print "\n"; -print "
$text{'esh_tabhdr'}
\n"; +print "\n"; +print ""; +print ""; -print "\n"; -printf "\n", - $sha ? &html_escape($sha->{'comment'}) : ""; - -print "\n"; -printf "\n", - $sha ? $sha->{'values'}->[0] : ""; +print "\n"; +print ""; &display_params($sconf, "shared-network"); -print "
$text{'esh_desc'}"; +print &ui_textbox("desc", ( $sha ? &html_escape($sha->{'comment'}) : "" ), 60); +print "
$text{'esh_desc'}
$text{'esh_netname'}
$text{'esh_netname'}"; +print &ui_textbox("name", ( $sha ? $sha->{'values'}->[0] : "" ), 15); +print "
\n"; +print "\n"; -print "
\n"; foreach $h (&find("host", $conf)) { push(@host, $h) if &can('r', \%access, $h); } @@ -129,7 +129,8 @@ if (!$in{'new'}) { } print "
\n"; +print &ui_table_end(); + if (!$in{'new'}) { print "\n"; print "\n"; @@ -178,6 +179,6 @@ if ($config{'dhcpd_version'} >= 3 && !$in{'new'}) { "$text{'esub_pooladd'}
\n"; } -print "\n"; +print &ui_form_end(); &ui_print_footer("", $text{'esh_return'}); From aab3382878654a77100b44a411d71c5ef448e9df Mon Sep 17 00:00:00 2001 From: Nawawi Jamili Date: Mon, 16 Dec 2013 03:26:38 +0800 Subject: [PATCH 6/6] ui-lib conversion dhcpd --- dhcpd/dhcpd-lib.pl | 17 +++++++----- dhcpd/edit_subnet.cgi | 61 ++++++++++++++++++++----------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/dhcpd/dhcpd-lib.pl b/dhcpd/dhcpd-lib.pl index ddbf0c7cd..d5845bce7 100755 --- a/dhcpd/dhcpd-lib.pl +++ b/dhcpd/dhcpd-lib.pl @@ -302,14 +302,17 @@ sub opt_input { local($v, $rv); $v = &find($_[1], $_[2]); -$rv = "\n", - $v ? $v->{'value'} : ""; +$rv .= &ui_radio($_[1]."_def", ( $v ? 0 : 1 ), [ [ 1, $_[3] ], [ 0, " " ] ]); +$rv .= &ui_textbox($_[1], ( $v ? $v->{'value'} : "" ), $_[4])." ".$_[5]; +$rv .= ""; +#$rv .= sprintf " $_[3]\n", +# $v ? "" : "checked"; +#$rv .= sprintf " ", +# $v ? "checked" : ""; +#$rv .= sprintf " $_[5]\n", +# $v ? $v->{'value'} : ""; return $rv; } diff --git a/dhcpd/edit_subnet.cgi b/dhcpd/edit_subnet.cgi index 5dff24ddb..59b05c72f 100755 --- a/dhcpd/edit_subnet.cgi +++ b/dhcpd/edit_subnet.cgi @@ -111,30 +111,28 @@ foreach $s (&find("subnet", $mems)) { # @group = sort { @{$a->{'members'}} <=> @{$b->{'members'}} } @group; print "\n"; -print "\n"; +print &ui_select("hosts", undef, \@esub_hosts_sel, 3, 1); +print "\n"; print "\n"; -print "\n"; +print &ui_select("groups", undef, \@esub_groups_sel, 3, 1); +print "\n"; if (!$in{'new'}) { # inaccessible hosts in this subnet @@ -160,29 +158,29 @@ if (!$in{'new'}) { # Show buttons for existing subnet print &ui_hidden("idx", $in{'idx'}); print "
$_[0] 30 ? " colspan=3>\n" : ">\n"; -$rv .= sprintf " $_[3]\n", - $v ? "" : "checked"; -$rv .= sprintf " ", - $v ? "checked" : ""; -$rv .= sprintf " $_[5]
$text{'esub_hosts'}"; +my @esub_hosts_sel; foreach $h (@host) { next if !&can('r', \%access, $h); - printf "\n", - $h->{'index'}, $insubn{$h}, - (!$in{'new'}) && $insubn{$h} eq $sub->{'index'} ? "selected" : "", - $h->{'values'}->[0]; + push(@esub_hosts_sel, [$h->{'index'}.",".$insubn{$h}, $h->{'values'}->[0], ( (!$in{'new'}) && $insubn{$h} eq $sub->{'index'} ? "selected" : "" ) ] ); } -print "$text{'esub_groups'}"; +my @esub_groups_sel; foreach $g (@group) { - local $gm = 0; + my $gm = 0; next if !&can('r', \%access, $g); foreach $h (@{$g->{'members'}}) { if ($h->{'name'} eq "host") { $gm++; } } - printf "\n", - $g->{'index'}, $insubn{$g}, - (!$in{'new'}) && $insubn{$g} eq $sub->{'index'} ? "selected" : "", - &group_name($gm, $g); + push(@esub_groups_sel, [$g->{'index'}.",".$insubn{$g}, &group_name($gm, $g), ( (!$in{'new'}) && $insubn{$g} eq $sub->{'index'} ? "selected" : "" ) ] ); } -print "
\n"; - print "\n" - if &can('rw', \%access, $sub); - print "\n"; + print ""; + print ""; if ($access{'r_leases'}) { - print "\n"; + print ""; } - print "\n" if &can('rw', \%access, $sub, 1); + print ""; print "
"; + print &ui_submit($text{'save'}) if &can('rw', \%access, $sub); + print ""; + print &ui_submit( (&can('rw', \%access, $sub) ? $text{'butt_eco'} : $text{'butt_vco'} ), "options"); + print ""; + print &ui_submit($text{'butt_leases'},"leases"); + print ""; + print &ui_submit($text{'delete'}, "delete") if &can('rw', \%access, $sub, 1); + print "
\n"; - print "$text{'index_addhst'}  \n" - if &can('rw', \%access, $sub); - print "$text{'index_addhstg'}

\n" - if &can('rw', \%access, $sub); + print &ui_link("edit_host.cgi?new=1&sidx=$in{'sidx'}&uidx=$in{'idx'}&ret=subnet", $text{'index_addhst'})."  " if &can('rw', \%access, $sub); + print &ui_link("edit_group.cgi?new=1&sidx=$in{'sidx'}&uidx=$in{'idx'}&ret=subnet", $text{'index_addhstg'}) if &can('rw', \%access, $sub); } else { # Show create button for new subnet print &ui_hidden("new", "1"); - print "\n"; + print "
"; + print &ui_submit($text{'create'}); } if ($config{'dhcpd_version'} >= 3 && !$in{'new'}) { @@ -202,12 +200,11 @@ if ($config{'dhcpd_version'} >= 3 && !$in{'new'}) { else { &icons_table(\@links, \@titles, \@icons, 5); } - print "", - "$text{'esub_pooladd'}
\n"; + print &ui_link("edit_pool.cgi?uidx=$in{'idx'}&sidx=$in{'sidx'}&new=1",$text{'esub_pooladd'}); } print &ui_form_end(); - +print "
"; if ($in{'ret'} eq "shared") { &ui_print_footer("edit_shared.cgi?idx=$in{'sidx'}", $text{'esub_retshar'}); }