File manager - Edit - /home/c14075/dragmet-ural.ru/www/Element.tar
Back
Select.pm 0000644 00000003676 15142350015 0006331 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Select; use strict; use Debconf::Log ':all'; use Debconf::Gettext; use base qw(Debconf::Element); use Debconf::Encoding qw(to_Unicode); sub visible { my $this=shift; my @choices=$this->question->choices_split; if (@choices > 1) { return 1; } else { debug 'developer' => 'Not displaying select list '. $this->question->name.' with '. (@choices+0).' choice'.((@choices == 0) ? 's' : ''); return 0; } } sub translate_default { my $this=shift; my @choices=$this->question->choices_split; $this->question->template->i18n(''); my @choices_c=$this->question->choices_split; $this->question->template->i18n(1); my $c_default=''; $c_default=$this->question->value if defined $this->question->value; foreach (my $x=0; $x <= $#choices; $x++) { return $choices[$x] if $choices_c[$x] eq $c_default; } return ''; } sub translate_to_C { my $this=shift; my $value=shift; my @choices=$this->question->choices_split; $this->question->template->i18n(''); my @choices_c=$this->question->choices_split; $this->question->template->i18n(1); for (my $x=0; $x <= $#choices; $x++) { return $choices_c[$x] if $choices[$x] eq $value; } debug developer => sprintf(gettext("Input value, \"%s\" not found in C choices! This should never happen. Perhaps the templates were incorrectly localized."), $value); return ''; } sub translate_to_C_uni { my $this=shift; my $value=shift; my @choices=$this->question->choices_split; $this->question->template->i18n(''); my @choices_c=$this->question->choices_split; $this->question->template->i18n(1); for (my $x=0; $x <= $#choices; $x++) { return $choices_c[$x] if to_Unicode($choices[$x]) eq $value; } debug developer => sprintf(gettext("Input value, \"%s\" not found in C choices! This should never happen. Perhaps the templates were incorrectly localized."), $value); return ''; } 1 Multiselect.pm 0000644 00000001624 15142350015 0007373 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Multiselect; use strict; use base qw(Debconf::Element::Select); sub order_values { my $this=shift; my %vals=map { $_ => 1 } @_; $this->question->template->i18n(''); my @ret=grep { $vals{$_} } $this->question->choices_split; $this->question->template->i18n(1); return @ret; } sub visible { my $this=shift; my @choices=$this->question->choices_split; return ($#choices >= 0); } sub translate_default { my $this=shift; my @choices=$this->question->choices_split; $this->question->template->i18n(''); my @choices_c=$this->question->choices_split; $this->question->template->i18n(1); my @ret; foreach my $c_default ($this->question->value_split) { foreach (my $x=0; $x <= $#choices; $x++) { push @ret, $choices[$x] if $choices_c[$x] eq $c_default; } } return @ret; } 1 Gnome/Progress.pm 0000644 00000002131 15142350015 0007744 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Gnome::Progress; use strict; use Gtk3; use utf8; use Debconf::Encoding qw(to_Unicode); use base qw(Debconf::Element::Gnome); sub _fraction { my $this=shift; return (($this->progress_cur() - $this->progress_min()) / ($this->progress_max() - $this->progress_min())); } sub start { my $this=shift; my $description=to_Unicode($this->question->description); my $frontend=$this->frontend; $this->SUPER::init(@_); $this->multiline(1); $this->expand(1); $frontend->title($description); $this->widget(Gtk3::ProgressBar->new()); $this->widget->show; $this->widget->set_text(' '); $this->addwidget($this->widget); $this->addhelp; } sub set { my $this=shift; my $value=shift; $this->progress_cur($value); $this->widget->set_fraction($this->_fraction); return 1; } sub info { my $this=shift; my $question=shift; $this->widget->set_text(to_Unicode($question->description)); return 1; } sub stop { my $this=shift; my $frontend=$this->frontend; $frontend->title($frontend->requested_title); } 1; Gnome/Error.pm 0000644 00000002216 15142350015 0007235 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Gnome::Error; use strict; use Debconf::Gettext; use Gtk3; use utf8; use Debconf::Encoding qw(to_Unicode); use base qw(Debconf::Element::Gnome); sub init { my $this=shift; my $extended_description = to_Unicode($this->question->extended_description); $this->SUPER::init(@_); $this->multiline(1); $this->fill(1); $this->expand(1); $this->widget(Gtk3::HBox->new(0, 0)); my $image = Gtk3::Image->new_from_stock("gtk-dialog-error", "dialog"); $image->show; my $text = Gtk3::TextView->new(); my $textbuffer = $text->get_buffer; $text->show; $text->set_wrap_mode ("word"); $text->set_editable (0); my $scrolled_window = Gtk3::ScrolledWindow->new(); $scrolled_window->show; $scrolled_window->set_policy('automatic', 'automatic'); $scrolled_window->set_shadow_type('in'); $scrolled_window->add ($text); $this->widget->show; $this->widget->pack_start($image, 0, 0, 6); $this->widget->pack_start($scrolled_window, 1, 1, 0); $textbuffer->set_text($extended_description); $this->widget->show; $this->adddescription; $this->addwidget($this->widget); } 1 Gnome/Select.pm 0000644 00000001716 15142350015 0007367 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Gnome::Select; use strict; use Gtk3; use utf8; use Debconf::Encoding qw(to_Unicode); use base qw(Debconf::Element::Gnome Debconf::Element::Select); sub init { my $this=shift; my $default=$this->translate_default; my @choices=$this->question->choices_split; $this->SUPER::init(@_); $this->widget(Gtk3::ComboBoxText->new); $this->widget->show; foreach my $choice (@choices) { $this->widget->append_text(to_Unicode($choice)); } $this->widget->set_active(0); for (my $choice=0; $choice <= $#choices; $choice++) { if ($choices[$choice] eq $default) { $this->widget->set_active($choice); last; } } $this->adddescription; $this->addwidget($this->widget); $this->tip( $this->widget ); $this->addhelp; } sub value { my $this=shift; return $this->translate_to_C_uni($this->widget->get_active_text); } *visible = \&Debconf::Element::Select::visible; 1 Gnome/String.pm 0000644 00000001211 15142350015 0007404 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Gnome::String; use strict; use Gtk3; use utf8; use Debconf::Encoding qw(to_Unicode); use base qw(Debconf::Element::Gnome); sub init { my $this=shift; $this->SUPER::init(@_); $this->widget(Gtk3::Entry->new); $this->widget->show; my $default=''; $default=$this->question->value if defined $this->question->value; $this->widget->set_text(to_Unicode($default)); $this->adddescription; $this->addwidget($this->widget); $this->tip( $this->widget ); $this->addhelp; } sub value { my $this=shift; return $this->widget->get_chars(0, -1); } 1 Gnome/Multiselect.pm 0000644 00000004655 15142350015 0010447 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Gnome::Multiselect; use strict; use Gtk3; use utf8; use Debconf::Encoding qw(to_Unicode); use base qw(Debconf::Element::Gnome Debconf::Element::Multiselect); use constant SELECTED_COLUMN => 0; use constant CHOICES_COLUMN => 1; sub init { my $this=shift; my @choices = map { to_Unicode($_) } $this->question->choices_split; my %default=map { to_Unicode($_) => 1 } $this->translate_default; $this->SUPER::init(@_); $this->multiline(1); $this->adddescription; $this->widget(Gtk3::ScrolledWindow->new); $this->widget->show; $this->widget->set_policy('automatic', 'automatic'); my $list_store = Gtk3::ListStore->new('Glib::Boolean', 'Glib::String'); $this->list_view(Gtk3::TreeView->new($list_store)); $this->list_view->set_headers_visible(0); my $renderer_toggle = Gtk3::CellRendererToggle->new; $renderer_toggle->signal_connect(toggled => sub { my $path_string = $_[1]; my $model = $_[2]; my $iter = $model->get_iter_from_string($path_string); $model->set($iter, SELECTED_COLUMN, not $model->get($iter, SELECTED_COLUMN)); }, $list_store); $this->list_view->append_column( Gtk3::TreeViewColumn->new_with_attributes('Selected', $renderer_toggle, 'active', SELECTED_COLUMN)); $this->list_view->append_column( Gtk3::TreeViewColumn->new_with_attributes('Choices', Gtk3::CellRendererText->new, 'text', CHOICES_COLUMN)); $this->list_view->show; $this->widget->add($this->list_view); for (my $i=0; $i <= $#choices; $i++) { my $iter = $list_store->append(); $list_store->set($iter, CHOICES_COLUMN, $choices[$i]); if ($default{$choices[$i]}) { $list_store->set($iter, SELECTED_COLUMN, 1); } } $this->addwidget($this->widget); $this->tip($this->list_view); $this->addhelp; $this->fill(1); $this->expand(1); } sub value { my $this=shift; my $list_view = $this->list_view; my $list_store = $list_view->get_model(); my ($ret, $val); my @vals; $this->question->template->i18n(''); my @choices=$this->question->choices_split; $this->question->template->i18n(1); my $iter = $list_store->get_iter_first(); for (my $i=0; $i <= $#choices; $i++) { if ($list_store->get($iter, SELECTED_COLUMN)) { push @vals, $choices[$i]; } $list_store->iter_next($iter) or last; } return join(', ', $this->order_values(@vals)); } *visible = \&Debconf::Element::Multiselect::visible; 1 Gnome/Text.pm 0000644 00000000442 15142350015 0007067 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Gnome::Text; use strict; use Debconf::Gettext; use utf8; use base qw(Debconf::Element::Gnome); sub init { my $this=shift; $this->SUPER::init(@_); $this->adddescription; # yeah, that's all } 1 Gnome/Note.pm 0000644 00000002064 15142350015 0007052 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Gnome::Note; use strict; use Debconf::Gettext; use Gtk3; use utf8; use Debconf::Encoding qw(to_Unicode); use Debconf::Element::Noninteractive::Note; use base qw(Debconf::Element::Gnome); sub init { my $this=shift; my $extended_description = to_Unicode($this->question->extended_description); $this->SUPER::init(@_); $this->multiline(1); $this->fill(1); $this->expand(1); $this->widget(Gtk3::HBox->new(0, 0)); my $text = Gtk3::TextView->new(); my $textbuffer = $text->get_buffer; $text->show; $text->set_wrap_mode ("word"); $text->set_editable (0); my $scrolled_window = Gtk3::ScrolledWindow->new(); $scrolled_window->show; $scrolled_window->set_policy('automatic', 'automatic'); $scrolled_window->set_shadow_type('in'); $scrolled_window->add ($text); $this->widget->show; $this->widget->pack_start($scrolled_window, 1, 1, 0); $textbuffer->set_text($extended_description); $this->widget->show; $this->adddescription; $this->addwidget($this->widget); } 1 Gnome/Password.pm 0000644 00000001104 15142350015 0007741 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Gnome::Password; use strict; use Gtk3; use utf8; use base qw(Debconf::Element::Gnome); sub init { my $this=shift; $this->SUPER::init(@_); $this->adddescription; $this->widget(Gtk3::Entry->new); $this->widget->show; $this->widget->set_visibility(0); $this->addwidget($this->widget); $this->tip( $this->widget ); $this->addhelp; } sub value { my $this=shift; my $text = $this->widget->get_chars(0, -1); $text = $this->question->value if $text eq ''; return $text; } 1 Gnome/Boolean.pm 0000644 00000001254 15142350015 0007524 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Gnome::Boolean; use strict; use Gtk3; use utf8; use Debconf::Encoding qw(to_Unicode); use base qw(Debconf::Element::Gnome); sub init { my $this=shift; my $description=to_Unicode($this->question->description); $this->SUPER::init(@_); $this->widget(Gtk3::CheckButton->new($description)); $this->widget->show; $this->widget->set_active(($this->question->value eq 'true') ? 1 : 0); $this->addwidget($this->widget); $this->tip( $this->widget ); $this->addhelp; } sub value { my $this=shift; if ($this->widget->get_active) { return "true"; } else { return "false"; } } 1 Web/Progress.pm 0000644 00000000347 15142350015 0007423 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Web::Progress; use strict; use base qw(Debconf::Element); sub start { } sub set { return 1; } sub info { return 1; } sub stop { } 1; Web/Error.pm 0000644 00000000240 15142350015 0006700 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Web::Error; use strict; use base qw(Debconf::Element::Web::Text); 1 Web/Select.pm 0000644 00000001555 15142350015 0007040 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Web::Select; use strict; use base qw(Debconf::Element::Select); sub show { my $this=shift; $_=$this->question->extended_description; s/\n/\n<br>\n/g; $_.="\n<p>\n"; my $default=$this->translate_default; my $id=$this->id; $_.="<b>".$this->question->description."</b>\n<select name=\"$id\">\n"; my $c=0; foreach my $x ($this->question->choices_split) { if ($x ne $default) { $_.="<option value=".$c++.">$x\n"; } else { $_.="<option value=".$c++." selected>$x\n"; } } $_.="</select>\n"; return $_; } sub value { my $this=shift; return $this->SUPER::value() unless @_; my $value=shift; $this->question->template->i18n(''); my @choices=$this->question->choices_split; $this->question->template->i18n(1); $this->SUPER::value($choices[$value]); } 1 Web/String.pm 0000644 00000000723 15142350015 0007063 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Web::String; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $_=$this->question->extended_description; s/\n/\n<br>\n/g; $_.="\n<p>\n"; my $default=''; $default=$this->question->value if defined $this->question->value; my $id=$this->id; $_.="<b>".$this->question->description."</b><input name=\"$id\" value=\"$default\">\n"; return $_; } 1 Web/Multiselect.pm 0000644 00000001676 15142350015 0010117 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Web::Multiselect; use strict; use base qw(Debconf::Element::Multiselect); sub show { my $this=shift; $_=$this->question->extended_description; s/\n/\n<br>\n/g; $_.="\n<p>\n"; my %value = map { $_ => 1 } $this->translate_default; my $id=$this->id; $_.="<b>".$this->question->description."</b>\n<select multiple name=\"$id\">\n"; my $c=0; foreach my $x ($this->question->choices_split) { if (! $value{$x}) { $_.="<option value=".$c++.">$x\n"; } else { $_.="<option value=".$c++." selected>$x\n"; } } $_.="</select>\n"; return $_; } sub value { my $this=shift; return $this->SUPER::value() unless @_; my @values=@_; $this->question->template->i18n(''); my @choices=$this->question->choices_split; $this->question->template->i18n(1); $this->SUPER::value(join(', ', $this->order_values(map { $choices[$_] } @values))); } 1 Web/Text.pm 0000644 00000000473 15142350015 0006543 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Web::Text; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $_=$this->question->extended_description; s/\n/\n<br>\n/g; $_.="\n<p>\n"; return "<b>".$this->question->description."</b>$_<p>"; } 1 Web/Note.pm 0000644 00000000237 15142350015 0006522 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Web::Note; use strict; use base qw(Debconf::Element::Web::Text); 1 Web/Password.pm 0000644 00000000743 15142350015 0007421 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Web::Password; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $_=$this->question->extended_description; s/\n/\n<br>\n/g; $_.="\n<p>\n"; my $default=''; $default=$this->question->value if defined $this->question->value; my $id=$this->id; $_.="<b>".$this->question->description."</b><input type=password name=\"$id\" value=\"$default\">\n"; return $_; } 1 Web/Boolean.pm 0000644 00000001224 15142350015 0007171 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Web::Boolean; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $_=$this->question->extended_description; s/\n/\n<br>\n/g; $_.="\n<p>\n"; my $default=''; $default=$this->question->value if defined $this->question->value; my $id=$this->id; $_.="<input type=checkbox name=\"$id\"". ($default eq 'true' ? ' checked' : ''). ">\n<b>". $this->question->description."</b>"; return $_; } sub value { my $this=shift; return $this->SUPER::value() unless @_; my $value=shift; $this->SUPER::value($value eq 'on' ? 'true' : 'false'); } 1 Noninteractive/Progress.pm 0000644 00000000402 15142350015 0011666 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Noninteractive::Progress; use strict; use base qw(Debconf::Element::Noninteractive); sub start { } sub set { return 1; } sub info { return 1; } sub stop { } 1; Noninteractive/Error.pm 0000644 00000003202 15142350015 0011154 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Noninteractive::Error; use strict; use Text::Wrap; use Debconf::Gettext; use Debconf::Config; use Debconf::Log ':all'; use Debconf::Path; use base qw(Debconf::Element::Noninteractive); sub show { my $this=shift; if ($this->question->flag('seen') ne 'true') { $this->sendmail(gettext("Debconf is not confident this error message was displayed, so it mailed it to you.")); $this->frontend->display($this->question->description."\n\n". $this->question->extended_description."\n"); } $this->value(''); } sub sendmail { my $this=shift; my $footer=shift; return unless length Debconf::Config->admin_email; if (Debconf::Path::find("mail")) { debug user => "mailing a note"; my $title=gettext("Debconf").": ". $this->frontend->title." -- ". $this->question->description; unless (open(MAIL, "|-")) { # child exec("mail", "-s", $title, Debconf::Config->admin_email) or return ''; } my $old_columns=$Text::Wrap::columns; $Text::Wrap::columns=75; if ($this->question->extended_description ne '') { print MAIL wrap('', '', $this->question->extended_description); } else { print MAIL wrap('', '', $this->question->description); } print MAIL "\n\n"; my $hostname=`hostname -f 2>/dev/null`; if (! defined $hostname) { $hostname="unknown system"; } print MAIL "-- \n", sprintf(gettext("Debconf, running at %s"), $hostname, "\n"); print MAIL "[ ", wrap('', '', $footer), " ]\n" if $footer; close MAIL or return ''; $Text::Wrap::columns=$old_columns; $this->question->flag('seen', 'true'); return 1; } } 1 Noninteractive/Select.pm 0000644 00000001132 15142350015 0011302 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Noninteractive::Select; use strict; use base qw(Debconf::Element::Noninteractive); sub show { my $this=shift; $this->question->template->i18n(''); my @choices=$this->question->choices_split; $this->question->template->i18n(1); my $value=$this->question->value; $value='' unless defined $value; my $inlist=0; map { $inlist=1 if $_ eq $value } @choices; if (! $inlist) { if (@choices) { $this->value($choices[0]); } else { $this->value(''); } } else { $this->value($value); } } 1 Noninteractive/String.pm 0000644 00000000261 15142350015 0011333 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Noninteractive::String; use strict; use base qw(Debconf::Element::Noninteractive); 1 Noninteractive/Multiselect.pm 0000644 00000000266 15142350015 0012364 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Noninteractive::Multiselect; use strict; use base qw(Debconf::Element::Noninteractive); 1 Noninteractive/Text.pm 0000644 00000000342 15142350015 0011011 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Noninteractive::Text; use strict; use base qw(Debconf::Element::Noninteractive); sub show { my $this=shift; $this->value(''); } 1 Noninteractive/Note.pm 0000644 00000000257 15142350015 0010777 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Noninteractive::Note; use strict; use base qw(Debconf::Element::Noninteractive); 1 Noninteractive/Password.pm 0000644 00000000263 15142350015 0011671 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Noninteractive::Password; use strict; use base qw(Debconf::Element::Noninteractive); 1 Noninteractive/Boolean.pm 0000644 00000000262 15142350015 0011445 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Noninteractive::Boolean; use strict; use base qw(Debconf::Element::Noninteractive); 1 Editor/Progress.pm 0000644 00000000353 15142350015 0010131 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Editor::Progress; use strict; use base qw(Debconf::Element); sub start { } sub set { return 1; } sub info { return 1; } sub stop { } 1; Editor/Error.pm 0000644 00000000245 15142350015 0007416 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Editor::Error; use strict; use base qw(Debconf::Element::Editor::Text); 1 Editor/Select.pm 0000644 00000001502 15142350015 0007541 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Editor::Select; use strict; use Debconf::Gettext; use base qw(Debconf::Element::Select); sub show { my $this=shift; my $default=$this->translate_default; my @choices=$this->question->choices_split; $this->frontend->comment($this->question->extended_description."\n\n". "(".gettext("Choices").": ".join(", ", @choices).")\n". $this->question->description."\n"); $this->frontend->item($this->question->name, $default); } sub value { my $this=shift; return $this->SUPER::value() unless @_; my $value=shift; my %valid=map { $_ => 1 } $this->question->choices_split; if ($valid{$value}) { return $this->SUPER::value($this->translate_to_C($value)); } else { return $this->SUPER::value($this->question->value); } } 1 Editor/String.pm 0000644 00000000667 15142350015 0007603 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Editor::String; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $this->frontend->comment($this->question->extended_description."\n\n". $this->question->description."\n"); my $default=''; $default=$this->question->value if defined $this->question->value; $this->frontend->item($this->question->name, $default); } 1 Editor/Multiselect.pm 0000644 00000001624 15142350015 0010621 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Editor::Multiselect; use strict; use Debconf::Gettext; use base qw(Debconf::Element::Multiselect); sub show { my $this=shift; my @choices=$this->question->choices_split; $this->frontend->comment($this->question->extended_description."\n\n". "(".gettext("Choices").": ".join(", ", @choices).")\n". gettext("(Enter zero or more items separated by a comma followed by a space (', ').)")."\n". $this->question->description."\n"); $this->frontend->item($this->question->name, join ", ", $this->translate_default); } sub value { my $this=shift; return $this->SUPER::value() unless @_; my @values=split(',\s+', shift); my %valid=map { $_ => 1 } $this->question->choices_split; $this->SUPER::value(join(', ', $this->order_values( map { $this->translate_to_C($_) } grep { $valid{$_} } @values))); } 1 Editor/Text.pm 0000644 00000000474 15142350015 0007255 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Editor::Text; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $this->frontend->comment($this->question->extended_description."\n\n". $this->question->description."\n\n"); $this->value(''); } 1 Editor/Note.pm 0000644 00000000244 15142350015 0007231 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Editor::Note; use strict; use base qw(Debconf::Element::Editor::Text); 1 Editor/Password.pm 0000644 00000000253 15142350015 0010126 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Editor::Password; use strict; use base qw(Debconf::Element::Editor::String); 1 Editor/Boolean.pm 0000644 00000001761 15142350015 0007710 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Editor::Boolean; use strict; use Debconf::Gettext; use base qw(Debconf::Element); sub show { my $this=shift; $this->frontend->comment($this->question->extended_description."\n\n". "(".gettext("Choices").": ".join(", ", gettext("yes"), gettext("no")).")\n". $this->question->description."\n"); my $default=''; $default=$this->question->value if defined $this->question->value; if ($default eq 'true') { $default=gettext("yes"); } elsif ($default eq 'false') { $default=gettext("no"); } $this->frontend->item($this->question->name, $default); } sub value { my $this=shift; return $this->SUPER::value() unless @_; my $value=shift; if ($value eq 'yes' || $value eq gettext("yes")) { return $this->SUPER::value('true'); } elsif ($value eq 'no' || $value eq gettext("no")) { return $this->SUPER::value('false'); } else { return $this->SUPER::value($this->question->value); } } 1 Noninteractive.pm 0000644 00000000526 15142350015 0010071 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Noninteractive; use strict; use base qw(Debconf::Element); sub visible { my $this=shift; return; } sub show { my $this=shift; my $default=''; $default=$this->question->value if defined $this->question->value; $this->value($default); } 1 Gnome.pm 0000644 00000005467 15142350015 0006157 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Gnome; use strict; use utf8; use Gtk3; use Debconf::Gettext; use Debconf::Encoding qw(to_Unicode); use base qw(Debconf::Element); sub init { my $this=shift; $this->hbox(Gtk3::VBox->new(0, 10)); $this->hline1(Gtk3::HBox->new(0, 10)); $this->hline1->show; $this->line1(Gtk3::VBox->new(0, 10)); $this->line1->show; $this->line1->pack_end ($this->hline1, 1, 1, 0); $this->hline2(Gtk3::HBox->new(0, 10)); $this->hline2->show; $this->line2(Gtk3::VBox->new(0, 10)); $this->line2->show; $this->line2->pack_end ($this->hline2, 1, 1, 0); $this->vbox(Gtk3::VBox->new(0, 5)); $this->vbox->pack_start($this->line1, 0, 0, 0); $this->vbox->pack_start($this->line2, 1, 1, 0); $this->vbox->show; $this->hbox->pack_start($this->vbox, 1, 1, 0); $this->hbox->show; $this->fill(0); $this->expand(0); $this->multiline(0); } sub addwidget { my $this=shift; my $widget=shift; if ($this->multiline == 0) { $this->hline1->pack_start($widget, 1, 1, 0); } else { $this->hline2->pack_start($widget, 1, 1, 0); } } sub adddescription { my $this=shift; my $description=to_Unicode($this->question->description); my $label=Gtk3::Label->new($description); $label->show; $this->line1->pack_start($label, 0, 0, 0); } sub addbutton { my $this=shift; my $text = shift; my $callback = shift; my $button = Gtk3::Button->new_with_mnemonic(to_Unicode($text)); $button->show; $button->signal_connect("clicked", $callback); my $vbox = Gtk3::VBox->new(0, 0); $vbox->show; $vbox->pack_start($button, 1, 0, 0); $this->hline1->pack_end($vbox, 0, 0, 0); } sub create_message_dialog { my $this = shift; my $type = shift; my $title = shift; my $text = shift; my $dialog = Gtk3::Dialog->new_with_buttons(to_Unicode($title), undef, "modal", "gtk-close", "close"); $dialog->set_border_width(3); my $hbox = Gtk3::HBox->new(0); $dialog->get_content_area->pack_start($hbox, 1, 1, 5); $hbox->show; my $alignment = Gtk3::Alignment->new(0.5, 0.0, 1.0, 0.0); $hbox->pack_start($alignment, 1, 1, 3); $alignment->show; my $image = Gtk3::Image->new_from_stock($type, "dialog"); $alignment->add($image); $image->show; my $label = Gtk3::Label->new(to_Unicode($text)); $label->set_line_wrap(1); $hbox->pack_start($label, 1, 1, 2); $label->show; $dialog->run; $dialog->destroy; } sub addhelp { my $this=shift; my $help=$this->question->extended_description; return unless length $help; $this->addbutton(gettext("_Help"), sub { $this->create_message_dialog("gtk-dialog-info", gettext("Help"), to_Unicode($help)); }); if (defined $this->tip ){ $this->tip->set_tooltip_text(to_Unicode($help)); } } sub value { my $this=shift; return ''; } 1 Dialog/Progress.pm 0000644 00000003466 15142350015 0010112 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Dialog::Progress; use strict; use base qw(Debconf::Element); sub _communicate { my $this=shift; my $data=shift; my $dialoginput = $this->frontend->dialog_input_wtr; print $dialoginput $data; } sub _percent { my $this=shift; use integer; return (($this->progress_cur() - $this->progress_min()) * 100 / ($this->progress_max() - $this->progress_min())); } sub start { my $this=shift; $this->frontend->title($this->question->description); my ($text, $lines, $columns); if (defined $this->_info) { ($text, $lines, $columns)=$this->frontend->sizetext($this->_info->description); } else { ($text, $lines, $columns)=$this->frontend->sizetext(' '); } if ($this->frontend->screenwidth - $this->frontend->columnspacer > $columns) { $columns = $this->frontend->screenwidth - $this->frontend->columnspacer; } my @params=('--gauge'); push @params, $this->frontend->dashsep if $this->frontend->dashsep; push @params, ($text, $lines + $this->frontend->spacer, $columns, $this->_percent); $this->frontend->startdialog($this->question, 1, @params); $this->_lines($lines); $this->_columns($columns); } sub set { my $this=shift; my $value=shift; $this->progress_cur($value); $this->_communicate($this->_percent . "\n"); return 1; } sub info { my $this=shift; my $question=shift; $this->_info($question); my ($text, $lines, $columns)=$this->frontend->sizetext($question->description); if ($lines > $this->_lines or $columns > $this->_columns) { $this->stop; $this->start; } $this->_communicate( sprintf("XXX\n%d\n%s\nXXX\n%d\n", $this->_percent, $text, $this->_percent)); return 1; } sub stop { my $this=shift; $this->frontend->waitdialog; $this->frontend->title($this->frontend->requested_title); } 1 Dialog/Error.pm 0000644 00000000513 15142350015 0007365 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Dialog::Error; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $this->frontend->showtext($this->question, $this->question->description."\n\n". $this->question->extended_description ); $this->value(''); } 1 Dialog/Select.pm 0000644 00000003230 15142350015 0007512 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Dialog::Select; use strict; use base qw(Debconf::Element::Select); use Debconf::Encoding qw(width); use Debconf::Log qw(debug); sub show { my $this=shift; my ($text, $lines, $columns)= $this->frontend->makeprompt($this->question, -2); my $screen_lines=$this->frontend->screenheight - $this->frontend->spacer; my $default=$this->translate_default; my @params=(); my @choices=$this->question->choices_split; my $menu_height=$#choices + 1; if ($lines + $#choices + 2 >= $screen_lines) { $menu_height = $screen_lines - $lines - 4; } $lines=$lines + $menu_height + $this->frontend->spacer; my $c=1; my $selectspacer = $this->frontend->selectspacer; my %unellipsized; foreach (@choices) { my $choice = $this->frontend->ellipsize($_); if (exists $unellipsized{$choice}) { debug 'developer' => sprintf 'Ambiguous ellipsized choice "%s": "%s" or "%s". Overflow.', $choice, $unellipsized{$choice}, $_; $choice = $_; } $unellipsized{$choice} = $_; push @params, $choice, ''; if ($columns < width($choice) + $selectspacer) { $columns = width($choice) + $selectspacer; } } if ($this->frontend->dashsep) { unshift @params, $this->frontend->dashsep; } @params=('--default-item', $default, '--menu', $text, $lines, $columns, $menu_height, @params); my $value=$this->frontend->showdialog($this->question, @params); if (defined $value) { $this->value($this->translate_to_C($unellipsized{$value})); } else { my $default=''; $default=$this->question->value if defined $this->question->value; $this->value($default); } } 1 Dialog/String.pm 0000644 00000001424 15142350015 0007544 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Dialog::String; use strict; use base qw(Debconf::Element); sub show { my $this=shift; my ($text, $lines, $columns)= $this->frontend->makeprompt($this->question); my $default=''; $default=$this->question->value if defined $this->question->value; my @params=('--inputbox'); push @params, $this->frontend->dashsep if $this->frontend->dashsep; push @params, ($text, $lines + $this->frontend->spacer, $columns, $default); my $value=$this->frontend->showdialog($this->question, @params); if (defined $value) { $this->value($value); } else { my $default=''; $default=$this->question->value if defined $this->question->value; $this->value($default); } } 1 Dialog/Multiselect.pm 0000644 00000004214 15142350015 0010570 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Dialog::Multiselect; use strict; use base qw(Debconf::Element::Multiselect); use Debconf::Encoding qw(width); use Debconf::Log qw(debug); sub show { my $this=shift; my ($text, $lines, $columns)= $this->frontend->makeprompt($this->question, -2); my $screen_lines=$this->frontend->screenheight - $this->frontend->spacer; my @params=(); my @choices=$this->question->choices_split; my %value = map { $_ => 1 } $this->translate_default; my $menu_height=$#choices + 1; if ($lines + $#choices + 2 >= $screen_lines) { $menu_height = $screen_lines - $lines - 4; if ($menu_height < 3 && $#choices + 1 > 2) { $this->frontend->showtext($this->question, $this->question->extended_description); ($text, $lines, $columns)=$this->frontend->sizetext($this->question->description); $menu_height=$#choices + 1; if ($lines + $#choices + 2 >= $screen_lines) { $menu_height = $screen_lines - $lines - 4; } } } $lines=$lines + $menu_height + $this->frontend->spacer; my $selectspacer = $this->frontend->selectspacer; my $c=1; my %unellipsized; foreach (@choices) { my $choice = $this->frontend->ellipsize($_); if (exists $unellipsized{$choice}) { debug 'developer' => sprintf 'Ambiguous ellipsized choice "%s": "%s" or "%s". Overflow.', $choice, $unellipsized{$choice}, $_; $choice = $_; } $unellipsized{$choice} = $_; push @params, ($choice, ""); push @params, ($value{$_} ? 'on' : 'off'); if ($columns < width($choice) + $selectspacer) { $columns = width($choice) + $selectspacer; } } if ($this->frontend->dashsep) { unshift @params, $this->frontend->dashsep; } @params=('--separate-output', '--checklist', $text, $lines, $columns, $menu_height, @params); my $value=$this->frontend->showdialog($this->question, @params); if (defined $value) { $this->value(join(", ", $this->order_values( map { $this->translate_to_C($unellipsized{$_}) } split(/\n/, $value)))); } else { my $default=''; $default=$this->question->value if defined $this->question->value; $this->value($default); } } 1 Dialog/Text.pm 0000644 00000000512 15142350015 0007217 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Dialog::Text; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $this->frontend->showtext($this->question, $this->question->description."\n\n". $this->question->extended_description ); $this->value(''); } 1 Dialog/Note.pm 0000644 00000000512 15142350015 0007200 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Dialog::Note; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $this->frontend->showtext($this->question, $this->question->description."\n\n". $this->question->extended_description ); $this->value(''); } 1 Dialog/Password.pm 0000644 00000001262 15142350015 0010100 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Dialog::Password; use strict; use base qw(Debconf::Element); sub show { my $this=shift; my ($text, $lines, $columns)= $this->frontend->makeprompt($this->question); my @params=('--passwordbox'); push @params, $this->frontend->dashsep if $this->frontend->dashsep; push @params, ($text, $lines + $this->frontend->spacer, $columns); my $ret=$this->frontend->showdialog($this->question, @params); if (! defined $ret || $ret eq '') { my $default=''; $default=$this->question->value if defined $this->question->value; $this->value($default); } else { $this->value($ret); } } 1 Dialog/Boolean.pm 0000644 00000001331 15142350015 0007652 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Dialog::Boolean; use strict; use base qw(Debconf::Element); sub show { my $this=shift; my @params=('--yesno'); push @params, $this->frontend->dashsep if $this->frontend->dashsep; push @params, $this->frontend->makeprompt($this->question, 1); if (defined $this->question->value && $this->question->value eq 'false') { unshift @params, '--defaultno'; } my ($ret, $value)=$this->frontend->showdialog($this->question, @params); if (defined $ret) { $this->value($ret eq 0 ? 'true' : 'false'); } else { my $default=''; $default=$this->question->value if defined $this->question->value; $this->value($default); } } 1 Teletype/Progress.pm 0000644 00000001445 15142350015 0010501 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Teletype::Progress; use strict; use base qw(Debconf::Element); sub start { my $this=shift; $this->frontend->title($this->question->description); $this->frontend->display(''); $this->last(0); } sub set { my $this=shift; my $value=shift; $this->progress_cur($value); use integer; my $new = ($this->progress_cur() - $this->progress_min()) * 100 / ($this->progress_max() - $this->progress_min()); $this->last(0) if $new < $this->last; return if $new / 10 == $this->last / 10; $this->last($new); $this->frontend->display("..$new%"); return 1; } sub info { return 1; } sub stop { my $this=shift; $this->frontend->display("\n"); $this->frontend->title($this->frontend->requested_title); } 1; Teletype/Error.pm 0000644 00000000252 15142350015 0007761 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Teletype::Error; use strict; use base qw(Debconf::Element::Teletype::Text); 1 Teletype/Select.pm 0000644 00000006334 15142350015 0010116 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Teletype::Select; use strict; use Debconf::Config; use POSIX qw(ceil); use base qw(Debconf::Element::Select); sub expandabbrev { my $this=shift; my $input=shift; my @choices=@_; if (Debconf::Config->terse eq 'false' and $input=~m/^[0-9]+$/ and $input ne '0' and $input <= @choices) { return $choices[$input - 1]; } my @matches=(); foreach (@choices) { return $_ if /^\Q$input\E$/; push @matches, $_ if /^\Q$input\E/; } return $matches[0] if @matches == 1; if (! @matches) { foreach (@choices) { return $_ if /^\Q$input\E$/i; push @matches, $_ if /^\Q$input\E/i; } return $matches[0] if @matches == 1; } return ''; } sub printlist { my $this=shift; my @choices=@_; my $width=$this->frontend->screenwidth; my $choice_min=length $choices[0]; map { $choice_min = length $_ if length $_ < $choice_min } @choices; my $max_cols=int($width / (2 + length(scalar(@choices)) + 2 + $choice_min)) - 1; $max_cols = $#choices if $max_cols > $#choices; my $max_lines; my $num_cols; COLUMN: for ($num_cols = $max_cols; $num_cols >= 0; $num_cols--) { my @col_width; my $total_width; $max_lines=ceil(($#choices + 1) / ($num_cols + 1)); next if ceil(($#choices + 1) / $max_lines) - 1 < $num_cols; foreach (my $choice=1; $choice <= $#choices + 1; $choice++) { my $choice_length=2 + length(scalar(@choices)) + 2 + length($choices[$choice - 1]); my $current_col=ceil($choice / $max_lines) - 1; if (! defined $col_width[$current_col] || $choice_length > $col_width[$current_col]) { $col_width[$current_col]=$choice_length; $total_width=0; map { $total_width += $_ } @col_width; next COLUMN if $total_width > $width; } } last; } my $line=0; my $max_len=0; my $col=0; my @output=(); for (my $choice=0; $choice <= $#choices; $choice++) { $output[$line] .= " ".($choice+1).". " . $choices[$choice]; if (length $output[$line] > $max_len) { $max_len = length $output[$line]; } if (++$line >= $max_lines) { if ($col++ != $num_cols) { for (my $l=0; $l <= $#output; $l++) { $output[$l] .= ' ' x ($max_len - length $output[$l]); } } $line=0; $max_len=0; } } @output = map { s/\s+$//; $_ } @output; map { $this->frontend->display_nowrap($_) } @output; } sub show { my $this=shift; my $default=$this->translate_default; my @choices=$this->question->choices_split; my @completions=@choices; $this->frontend->display($this->question->extended_description."\n"); if (Debconf::Config->terse eq 'false') { for (my $choice=0; $choice <= $#choices; $choice++) { if ($choices[$choice] eq $default) { $default=$choice + 1; last; } } $this->printlist(@choices); $this->frontend->display("\n"); push @completions, 1..@choices; } my $value; while (1) { $value=$this->frontend->prompt( prompt => $this->question->description, default => $default ? $default : '', completions => [@completions], question => $this->question, ); return unless defined $value; $value=$this->expandabbrev($value, @choices); last if $value ne ''; } $this->frontend->display("\n"); $this->value($this->translate_to_C($value)); } 1 Teletype/String.pm 0000644 00000001075 15142350015 0010142 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Teletype::String; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $this->frontend->display( $this->question->extended_description."\n"); my $default=''; $default=$this->question->value if defined $this->question->value; my $value=$this->frontend->prompt( prompt => $this->question->description, default => $default, question => $this->question, ); return unless defined $value; $this->frontend->display("\n"); $this->value($value); } 1 Teletype/Multiselect.pm 0000644 00000004306 15142350015 0011166 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Teletype::Multiselect; use strict; use Debconf::Gettext; use Debconf::Config; use base qw(Debconf::Element::Multiselect Debconf::Element::Teletype::Select); sub expand_ranges { my @ranges = @_; my @accumulator; for my $item (@ranges) { if ($item =~ /\A(\d+)-(\d+)\Z/) { my ($begin, $end) = ($1, $2); for (my $i = $begin; $i <= $end; $i++) { push @accumulator, $i; } } else { push @accumulator, $item; } } return @accumulator; } sub show { my $this=shift; my @selected; my $none_of_the_above=gettext("none of the above"); my @choices=$this->question->choices_split; my %value = map { $_ => 1 } $this->translate_default; if ($this->frontend->promptdefault && $this->question->value ne '') { push @choices, $none_of_the_above; } my @completions=@choices; my $i=1; my %choicenum=map { $_ => $i++ } @choices; $this->frontend->display($this->question->extended_description."\n"); my $default; if (Debconf::Config->terse eq 'false') { $this->printlist(@choices); $this->frontend->display("\n(".gettext("Enter the items or ranges you want to select, separated by spaces.").")\n"); push @completions, 1..@choices; $default=join(" ", map { $choicenum{$_} } grep { $value{$_} } @choices); } else { $default=join(" ", grep { $value{$_} } @choices); } while (1) { $_=$this->frontend->prompt( prompt => $this->question->description, default => $default, completions => [@completions], completion_append_character => " ", question => $this->question, ); return unless defined $_; @selected=split(/[ ,]+/, $_); @selected=expand_ranges(@selected); @selected=map { $this->expandabbrev($_, @choices) } @selected; next if grep { $_ eq '' } @selected; if ($#selected > 0) { map { next if $_ eq $none_of_the_above } @selected; } last; } $this->frontend->display("\n"); if (defined $selected[0] && $selected[0] eq $none_of_the_above) { $this->value(''); } else { my %selected=map { $_ => 1 } @selected; $this->value(join(', ', $this->order_values( map { $this->translate_to_C($_) } keys %selected))); } } 1 Teletype/Text.pm 0000644 00000000473 15142350015 0007621 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Teletype::Text; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $this->frontend->display($this->question->description."\n\n". $this->question->extended_description."\n"); $this->value(''); } 1 Teletype/Note.pm 0000644 00000000623 15142350015 0007577 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Teletype::Note; use strict; use base qw(Debconf::Element); sub visible { my $this=shift; return (Debconf::Config->terse eq 'false'); } sub show { my $this=shift; $this->frontend->display($this->question->description."\n\n". $this->question->extended_description."\n"); $this->value(''); } 1 Teletype/Password.pm 0000644 00000001165 15142350015 0010476 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Teletype::Password; use strict; use base qw(Debconf::Element); sub show { my $this=shift; $this->frontend->display( $this->question->extended_description."\n"); my $default=''; $default=$this->question->value if defined $this->question->value; my $value=$this->frontend->prompt_password( prompt => $this->question->description, default => $default, question => $this->question, ); return unless defined $value; if ($value eq '') { $value=$default; } $this->frontend->display("\n"); $this->value($value); } 1 Teletype/Boolean.pm 0000644 00000002254 15142350015 0010253 0 ustar 00 #!/usr/bin/perl -w # This file was preprocessed, do not edit! package Debconf::Element::Teletype::Boolean; use strict; use Debconf::Gettext; use base qw(Debconf::Element); sub show { my $this=shift; my $y=gettext("yes"); my $n=gettext("no"); $this->frontend->display($this->question->extended_description."\n"); my $default=''; $default=$this->question->value if defined $this->question->value; if ($default eq 'true') { $default=$y; } elsif ($default eq 'false') { $default=$n; } my $description=$this->question->description; if (Debconf::Config->terse eq 'false') { $description.=" [$y/$n]"; } my $value=''; while (1) { $_=$this->frontend->prompt( default => $default, completions => [$y, $n], prompt => $description, question => $this->question, ); return unless defined $_; if (substr($y, 0, 1) ne substr($n, 0, 1)) { $y=substr($y, 0, 1); $n=substr($n, 0, 1); } if (/^\Q$y\E/i) { $value='true'; last; } elsif (/^\Q$n\E/i) { $value='false'; last; } if (/^y/i) { $value='true'; last; } elsif (/^n/i) { $value='false'; last; } } $this->frontend->display("\n"); $this->value($value); } 1
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings